Mokoi Games are a Platform Neutral Video Games Format. Currently only one working implementation has been made ("Lux Engine"), though 2 more in development (Lightbulb and "HTML5")
Mokoi Gaming uses similar formats for Games, Packages and Patches files. Each has a unique header followed with each individual files/
uint16_t filename_length; uint8_t * filename; //Uses filename_length for size uint32_t file_size_length; uint32_t compressed_size_length; uint8_t * data; //Uses compressed_size_length for size
uint8_t[8] magic = {137, 'M', 'o', 'k', 'o', 'i', '1', 10}; // - magic[6] stores the file version uint8_t[256] name; uint32_t id; uint32_t logo_length; // png logo length uint8_t * logo; // png logo data uint32_t CRC; // Not Used yet
Store in the root folder, game.mokoi is a INI-like format, that stores the game setting.
[Mokoi] project.title=Mokoi Test Game project.id=testgame player.number=1 map.width=512 map.height=384 screen.width=320 screen.height=240 project.language=en
Map Section are a Tabbed Separated Values (TSV) text file, which stores map locations on a grid.
Values for the TSV are 'Map', 'Grid X', 'Grid Y'
Tabs may not be visible
title 0 0 display 2 0 camera 4 0 input 6 0 collision 8 0 entity 10 0 audio 12 0 save 14 0
Strings are stored on a individual line. An '\n' can be use if you require a line break.
Files are name with the two letter language code, with 00.txt acting as a Key file which is also exported to a script routine.
Ogg Vorbis is used for audio dialog. Note: To be replace with Opus in future version
Map files are in a XML format.
<map xmlns="http://mokoi.info/projects/mokoi"> <settings> <dimensions width="1" height="1" /> <color red="0" blue="4" green="96" mode="0" /> <option name="name" value="" type="" /> </settings> <object value="Inline Text" type="text"> <position x="2" y="2" w="84" h="9" z="4000" l="4" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="number" value="-1" /> </object> <object value="Language String 0" type="text"> <position x="8" y="208" w="51" h="7" z="4000" l="4" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="number" value="0" /> </object> <object value="planetcute.png:1" type="sprite"> <position x="248" y="32" w="48" h="80" z="2000" l="2" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="id" value="" type="hidden"/> <setting key="global" value="false" type="hidden"/> <setting key="entity" value="random-colour.mps" type="hidden"/> <entity value="random-colour" /> </object> <object value="" type="rect"> <position x="96" y="40" w="46" h="47" z="1000" l="1" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="id" value="*" type="hidden"/> <setting key="global" value="false" type="hidden"/> <entity value="random-colour" /> <setting key="entity" value="random-colour.mps" type="hidden"/> </object> <object value="" type="line"> <position x="24" y="40" w="54" h="87" z="0" l="0" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="id" value="" type="hidden"/> <setting key="global" value="false" type="hidden"/> <entity value="random-colour" /> <setting key="entity" value="random-colour.mps" type="hidden"/> </object> <object value="" type="circle"> <position x="352" y="32" w="33" h="47" z="0" l="0" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="id" value="" type="hidden"/> <setting key="global" value="false" type="hidden"/> <entity value="random-colour" /> <setting key="entity" value="random-colour.mps" type="hidden"/> </object> <object value="player1.png:front" type="sprite"> <position x="404" y="134" w="32" h="40" z="1000" l="1" r="0" f="0"/> <color red="255" blue="255" green="255" alpha="255" /> <setting key="id" value="" type="hidden"/> <entity value="follow_path" /> <setting key="entity" value="follow_path.mps" type="hidden"/> <setting key="global" value="false" type="hidden"/> <path> <point x="404" y="134" ms="10"/> <point x="600" y="24" ms="10"/> <point x="608" y="448" ms="10"/> <point x="72" y="448" ms="10"/> <point x="73" y="105" ms="10"/> </path> </object> <object value="" type="polygon"> <position x="200" y="200" w="75" h="72" z="0" l="0" r="0" f="0"/> <color red="255" blue="0" green="255" alpha="255" /> <option points="5"/> <point x="50" y="25"/> <point x="75" y="40"/> <point x="60" y="60"/> <point x="40" y="60"/> <point x="25" y="40"/> </object> </map>
Custom mask will be stored in binary portable graymap file format, 0 or black will represents transparency
Mokoi uses sprite sheets, which are images that contain many sprites, and a XML to hold the sprite information. They also hold simple animation info.
Supported Format: PNG
<sheet xmlns="http://mokoi.info/format/sheet"> <sprite name="process_0" hidden="hidden" mask="" entity=""> <position x="74" y="38" w="16" h="16" /> </sprite> <sprite name="process_1" mask="" entity=""> <position x="74" y="38" w="16" h="16" /> <child name="process_0" position="top-left" scroll="0"/> <collision id="0" x="0" y="0" w="16" h="16"/> </sprite> <animation name="process" hidden="hidden" mask="" entity=""> <frame sprite="process_0" x="0" y="0" ms="100"/> <frame sprite="process_1" x="0" y="0" ms="100"/> <frame sprite="process_2" x="0" y="0" ms="100"/> </animation> </sheet>
Supported Format (both): Ogg Vorbis Note: To be replace with Opus in future version
Supported Format (music): it, mod
Supported Format (effects): wav
Comming Soon