ASCII Game Engine - Very simple Ascii maze generatior. Exports Standalone 2d,3d htmls and ZX Spectrum BASIC code.
AGE is a minimal game engine that I made because I wanted something extremely light and suitable for very small ages. I used bitsy in the past and it is very good. I just wanted something simpler.
So, A.G.E. was born.
Put the files html_game_engine.html and htmlTemplate.html to your root of your server.
If you wish, rename the html_game_engine.html to index.html.
You must open with your browser myserver.com/html_game_engine.html.
The template file is used when you export the game.
In the main grid you select a symbol from the drop down menu.
Symbols are eg Player "p", Enemy "E" , End goal "&" , Gold "G" and Wall "W" etc.
You place the symbols in the grid and you create the game area.
You can you can visit from the drop down a site with free icons (like flaticon.com).
When you find the image you like right click on it and select "Copy Image adress". Paste this URL to the textbox you want.
Select the grid and you will see that the symbol is now replaced by the image.
I suggest you use images/icons URLs that have size 32,64 or 128pixels.
ZX Spectrum BASIC export: instead of image URL you can enter UDG data for an 8x8bit sprite (ZX Spectrum). For example entering 56,120,16,57,254,60,126,36 is a girl icon . In the exported BASIC file you will get UDG code. In 2d and 3d tempaltes you will get a black image or the defaulr ascii character.
*Note*: No image is stored in the game file. The game file just stores URLs. If you don't want to rely in external sites you could use/download the images you want and store them in a subfolder. You can then modify all the URLs to point to your subfolder (eg img/pirateship.png).
When you are happy with the game press export or export3d. A html file will be saved in your computer.
You can drag and drop that game in your browser to play it.
The exported file can be used stand alone.
This will export a ZX Spectrum BASIC source file. File will contain DATA entries for generating the UDG (User Defined Graphics) that you entered. Sample entries for entering (instead of URLs) : 56,120,16,57,254,60,126,36 (girl) and 7,7,7,7,255,124,56,56 (toilet). 0,0,0,124,188,124,60,60 (coffee mug) and 97,102,102,255,66,66,66,66 (table). In 2d and 3d tempaltes you will get a black image or the defaulr ascii character.
-You can import any game that was made with this engine. The import function searches only for specific parts inside the game file. This means that you can use your own modified template file as long as you keep these parts intact. At this point the parts used are the grid map and the image sources.
-To get started you can try to import and modify one of the demos.
-You can also import/export a game to update it to the latest template version.
- Goal of the game is to use this for a class lesson.
- If you want something more complex ,try bitsy.
- If you find something simpler and usable leave a comment and I will have a look.
- I wanted it to run in a very old browser (that is used to run native flash/swf educational games). usually I test this in an old Chromium v61 browser.
- The script does not need a server to run but CORS policies restrict it.
Why ASCII Game Engine?
ASCII : The engine uses ASCII characters and symbols as its foundation, which was the initial idea behind it. The images are simply replacements for those symbols.
Engine: Technically, it's not really an engine; it's more of a designer. However, the initials "AGD" were already taken (by the ZX Spectrum Arcade Game Designer).
So if you don't like the name, feel free to focus on the middle part: "Game." It definitely has something to do with gaming! :)
To refresh the template images you must click inside the grid. Then the images will get updated.
-Add item as requirement to handle enemy or to bypass obstacle (eg sword for monster or key for door). Nothing complex.
-Add translation (this is a priority since the goal is to be used in a school class ). {Translation is done and working. Just need to decide if I will keep text placeholders or switch (back) to plain english text in the main template.}
-Maybe custom grid size (or not squared).Or maybe add 2-3 hidden rooms near the 20x20 grid . These could be inside of house,cave etc.
-I could use an API to select icons directly from the drop box without visiting another page and copy/paste the URL but I don't know if it is practical + I don't like external dependecies.
-Associate text with grid coordnates. This will help storytelling,give clues etc. (This will be done by adding a placeholder in the templateFile for gridText.).
-Win condition option: Collect only one end game item or all (or specific number).
- Per grid tile : Background color or bg image
- Dynamic external JS script loading- load the script only if file exists (simple plug-in system)
- Add template for generating games forvarious retro machines (eg export ZX Spectrum Basic code). This is a side project which will be quite easy (I think).
- ZX Spectrum BASIC template. Seems to work - UDG implemented
Icons used are from flaticon.com. No file is stored in the game file. Only the URLs are saved.
Some icons were saved locally here because AGE game was designed to be used in a local computer lab environment. The icons saved are from flaticon.com. Note in itch.io the icons are removed.