CS 387: Game AI
Procedural Content Generation in A4Engine v2.3
The goal of this project is to learn how to implement Procedural Content Generation techniques, which are becoming more and more popular in recent games, specially in the emergent genre of rogue-likes (or even rogue-like-likes)
In this project you will work with the A4Engine, a very simple engine for browser-based action RPG games written in JavaScript. If you want to see an example of the type of games the A4Engine supports, you can play a small game created with it here
In this project, you will have to implement a procedural map generator for generating maps for the A4Engine. You can choose whether you want to implement a generator that generates dungeons, one that generates outdoors maps (with grass, rivers, trees, rocks, paths, etc.), or one that generates in-door maps (like houses with rooms, furniture, carpets, etc.). Your method will have to generate a playable level that can be loaded with the A4Engine. You do not need to add any enemies or items to the map, but make sure it's playable. Thus, notice that your method will have to generate a tmx file (which is basically an xml file). You can see many examples of actual maps in the Aventura 4 game that comes as an example with the engine. But if you need more information, TMX is the map format used by the TILED map editor, more information here. The tmx format used by the A4Engine is an extension of the base TMX format. For a more in-depth explanation of the file format, please see the reference.
Specific Project Tasks:
- Download the A4Engine:
- For Linux (precompiled for Debian 64bit): here
- For Mac: here
- For Windows: here
- Set it up in your machine to make sure you can run it (you should see the example game that comes with it). In Mac/Linux you might need to install the SDL2, SDL2_image, and SDL2_mixer libraries if you don't have them in your system. For installing those, each OS does it in a different way (e.g., apt-get in Debian, MacPorts or Brew in Mac, etc.)
- Locate the game files of the example game that comes with it (in the "games" folder). In the Mac version, right click on the bundle and "show package contents" to access to the game files.
- Create a new folder inside of the "games" folder, and place this example game there (unzipped). Then, change the configuration file "A4config.xml" to run this example game instead of the default game that comes with the engine.
- Write a method in any language you choose (C, C++, Java, Lisp, etc.) that can generate new versions of the map.tmx file that comes with the engine using one of the algorithms we saw in class. Make sure that when you replace the file map.tmx in the example game with the ones generated by your system, the game is still playable. (70 points)
- Create a short 3 minute video demoing your project, and send it to the instructor (do not send the video file! please just send a link (e.g., DropBox link, Youtube link, etc.). You will have to present this video in class. (20 points)
- Turn in the source-code of your project, plus a 1-2 page description (10 points) of what you did before midnight the due date. Submissions will be done via Blackboard.
Notes:
The goal of the project is to learn about procedural content generation. You do not need to implement a method that can generate a full level including enemies, items, etc. (but you are welcome to try!). It is enough with implementing one of the methods we covered in class (tell the instructor what you are going to implement before doing so, for approval).
Extra credit (20 extra points): generate a game that: 1) has more than one map (the player should be able to navigate from one map to the next via the use of "bridges"), 2) has enemies, 3) has an ending. For completing this extra credit, please refer to the "Aventura 4" game or to the engine reference for the necessary syntax to add enemies, bridges and a game ending. Extra credit will only be granted if the main part of the project is completed successfully (i.e., no extra credit on unfinished or non-working projects).