Very performant fantasy console with lots of features and multiple languages

bzt 202b10ddfe Updated binaries před 2 dny
docs b45cdbcc75 AdvGame 2.0 import před 2 dny
platform 4a55c11b11 Minor UI tweaks před 1 týdnem
public 202b10ddfe Updated binaries před 2 dny
src b45cdbcc75 AdvGame 2.0 import před 2 dny
tests b45cdbcc75 AdvGame 2.0 import před 2 dny
.gitignore 21be4cad23 Replaced syslinux with simpleboot, mtools or root privileges not needed any more před 1 rokem
.gitlab-ci.yml 51385fe50a Renamed pages to public because gitlab otherwise doesn't work před 1 rokem
LICENSE 1a7bbcfce7 Initial commit před 1 rokem
README.md b45cdbcc75 AdvGame 2.0 import před 2 dny

README.md

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, MEG-4 Adventure Games, 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 standalone WebAssembly, Windows and Linux executables with just your game in them, 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 would tell).

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, nics_le for the German, Openovchik for the Russian, Johnny for the Polish, and Andreas for the Swedish translation fixes!

Social and Newsroom

Mirrors

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.

To Do

  • 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

  • most of the built-in helps are machine translated, they really could use some fix from a native speaker contributor

Cheers, bzt