Skip to content

Very performant fantasy console with lots of features and multiple languages

License

Notifications You must be signed in to change notification settings

relector-tuxnix/meg4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEG-4

MEG-4 (pronouned as "MEGA", ˈmegə) is my take on the virtual fantasy game console genre, similar to PICO-8 and TIC-80, but simpler to use, lot more featureful, and much more performant. So it is actually fun to use :-) You can find more details, example floppies and an emulator running in your browser on the website.

To get the feeling: if those other consoles were the NES, then MEG-4 would be the Amiga. :-)

Installation

This is not all, just the ones I provide as binary release too. Check out the platform directory for more!

Platform Link
Windows meg4-i686-win-sdl.zip
Linux meg4-x86_64-linux-sdl.tgz
meg4-x86_64-linux-glfw.tgz
meg4-x86_64-linux-fbdev.tgz
Ubuntu meg4_0.0.1-amd64.deb
RaspiOS meg4_0.0.1-armhf.deb
Web meg4-wasm-emscripten.zip
MEG-4 OS meg4-x86_64.iso.tgz

Extract to: /usr (Linux, BSDs), C:\Program Files (Windows); or in a webserver's public folder (Emscripten).

This is a portable executable, no installation required. Alternatively if you've downloaded a deb file then you can install that with

sudo dpkg -i meg4_*.deb

The MEG-4 OS is a bare metal solution, which does not need any Operating System. You can flash that .iso to a storage and boot it, or you can try it out in a virtual machine with

qemu-system-x86_64 -m 256 -drive file=meg4.iso,format=raw -device virtio-mouse -serial stdio

Compilation

Go into one of the subdirectories under platform and run make. Yeah, it is really that simple. Some Makefiles have additional rules to download optional libraries and compile those statically in, but a plain simple make will always work.

The build system is created in a way that you can simply remove or add repo directories to enable or disable features. For example just rename src/lua to src/lua.disabled to remove Lua support (and cut overall compilation time in half). Having platform/sdl/SDL3 will statically link with SDL3, rename it to SDL3.disabled to link dynamically.

Documentation

File Formats

MEG-4 stores programs in "floppy disks". These are simple PNG images with additional data. For convenience, there's also a project format, which is an archive file containing the console's data in only common and well-known Open Source file formats, usable by many third party tools (one of the test cases, the converter can convert PNG floppies into this project archive format from command line).

Otherwise lots of other formats are supported, among others Tiled maps, MIDI music, PICO-8 and TIC-80 cartridges, etc. Just drag'n'drop these files to the MEG-4 screen to import.

License

The MEG-4 virtual fantasy console is a Free and Open Source software, licensed under GPLv3 or any later version of that license.

MEG-4 PRO

The proprietary MEG-4 PRO version offers extra functionality over the GPL'd version: it stores the author's name into the floppies, and it can also export a standalone WebAssembly binary with just your game in it, without the built-in editors. These look like genuine games, no-one can tell they were created with MEG-4 (assuming your game doesn't crash because the error screen will tell).

Known Bugs

Hopefully none. Please use the issue tracker if you find any.

Should compile and work on big-endian machines too (I mean, in theory all the necessary htoleX and leXtoh macros are in place, but in practice I probably missed a few spots). Since there's exactly zero big-endian machines in my vicinity, this is totally untested.

To avoid dependencies and provide proper integration, the C and BASIC compilers were implemented by me from scratch. Should you find any issues with these languages, please report it.

On the other hand Lua is 3rd party. Most of its error messages aren't and can't be translated, and the faulting line might be correctly returned, or might be not; it also might segfault and crash MEG-4... These aren't bugs in MEG-4. Do not report these. I surely could, but it's not my job to fix Lua. Address your complaints to Pontifical Catholic University of Rio de Janeiro. On the other hand contributions for Lua workarounds are always welcome.

Contributors

I would like to say thanks to Mátyás Jani for thorough testing and making suggestions on useful features, and Tony Wang for the Chinese, and nics_le for the German translation fixes!

To Do

  • Undo / Redo works everywhere except I had to remove history in the Sounds and Music Editors (I'll have to come up with some clever history compression algorithm because it eats up the entire memory pretty quickly otherwise). Undo in the Wave Editor works though.

  • Sprite, Map and Font Editors have plenty of sophisticated tools already, but they currently lack "draw line". I'll probably add this soon with Shift + Paint, just like in GIMP.

  • Visual Editor is unfinished (see TirNanoG Editor's event handlers to get a glimpse of what I'm planning here).

  • struct/union support in the C compiler

  • ELSEIF and SELECT CASE in the BASIC compiler

  • the BASIC compiler isn't as throughfully tested (yet) as the C compiler

Cheers, bzt

About

Very performant fantasy console with lots of features and multiple languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published