The game can be translated by editing the text files text_credits.lua and text_translated.lua. These are Lua files that will be loaded by the game to fetch the translated text. Additional instructions for the translation can be found as comments at the beginning of these files.
NOTE: there are files with the same names inside the game.zip archive. These should not be modified, and the game.zip file should only be used for advanced things (see next section).
There are two sprites in the game that include text: the title screen and a poster in the collector's timeline. Participant can choose to provide a translated version of these images as follows by replacing them inside the game.zip archive, which contains the assets used by the game.
The files to be replaced are assets/single_sprites/poster_translated.png and assets/single_sprites/title_translated.png. There is also the English version of these images in the same folder, which should non be changed.
Adventurous participants can choose to take their entry to the next level by making changes to the source code of the game itself. Some examples of things that can be done:
- Changing the font used by the game in order to translate to a language unsupported by the current font
- Adding lines of dialogue, creating/expanding scenes
- Adding new puzzles
- Modifing any sprite in the game
- Changing the way the engine works
The possiblities are endless, but note that no support will be provided (I may be able to help if you ask on the LocJAM forum, but I make no promises). The source code was not meant to be read by other people and I cannot guarantee that it will make any sense to anybody other than me. You have been warned!
The entirety of the game source code and assets is in the game.zip archive. The game loads the source code dynamically, so you can just modify code and assets and have the changes appear in the game when you start it.
The source code for the game is written in Lua. However, note that the game was actually programmed in a different language called MoonScript, which was then converted to Lua. The game.zip archive contains both the original Moonscript files (with extension .moon) and the converted Lua files (with extension .lua).
You have three options for making changes to the source code:
- Modify the MoonScript source directly. In this case you will need to use the MoonScript compiler to transform them to Lua and overwrite the relevant
.luafiles in the game archive. You can do this by installing the MoonScript compiler on your machine or by using the online compiler. The advantage of this options is that the MoonScript files are (arguably) easier to understand as they were written by a human and include (some) comments. - Modify the
.luafiles only. In this case no compilation is necessary and the game will just pick up the changes. the downside is that these files are generated by a compiler and contain no comments, have some programmatically named variables, and are generally just more difficult to understand. - The last option is to take the best of both worlds: read the
.moonfiles to understand what the code is doing, look at the.luafiles to figure out how the code was translated, and then modify the Lua files directly.