2D Tile-Mapping Engine

This application was made using XNA, and is coded in C#, HLSL, and custom script.  It is used to create interactive backgrounds using scrolling linear tiles.  I've created a demonstration of its current capabilities in the style of an older role playing game (inspired by games like Legend of Zelda, Chrono Trigger and Earthbound).  Initially, I created an application similar to this in C++ using DirecDraw 7, but that was awhile ago.

Demo Notes

This demo has a player that can run around and explore a number of large 2D maps.  The player can talk to characters and enter other areas and houses.  Some of the maps are harder to find, but no harder than a game.  Use the arrow keys to run, the space bar to interact with characters, the w or s keys to select a response for dialogue questions, and you have to hit Escape twice to exit.  You can also fly around as a different sprite if you press P, but you have to be careful because it is not player-proof, and you can easily get lost off the map. If this happens just restart. Enjoy. 

To Download Demo
If you have XNA 3.1 Framework Redistributable installed Download Demo Executable,


If you do not have the XNA 3.1 Framework, or aren't sure, Download Demo Setup,  Execute the setup.exe file.  The install will most likely prompt a download for the required framework. Once the framework is installed, the game will be automatically installed.

Demo Features Include:
- Dynamic Lighting
- Flickering Light Effects
- Day/Night Cycle (sped up for demonstration's sake)
- Bloom Effects (a bit intense at the moment)
- Particle Objects (created using another project of mine)
- Character Action Sequencing (for things like moving around, attacking, dying, etc...)
- Character Animations (part of the action sequences)
- Character Particle Objects (could be used for spells, press z a few times for some basic examples)
- Evolving Character Dialogue (press w and/or s for responding to a character's question)
- Initiated/Automated Dialogue and Dialogue Reactions (characters can talk to each other, and perform actions based on these reactions)
- In-Game Map Editor (there is currently no documentation, thus it's not useful to anyone but me. Press M then T, for the gist)
- Background Music (mp3s)
- Menu/Window System (at the menu screen, press T for the menu to bleed/fade into the background)
- Tile Animations (moving flowers and mushrooms)
- Tile Group Animations (waterfalls and other map alterations)
- 2D Sprite physics (press p to fly a ship around, and p again to stop)

It is also worth mentioning: the particle effect and menu/window mechanisms are older projects, which I've implemented in this demo.

Short Application Description

The tiles are both locations on the map, and source locations within a source bitmap.  Each tile can have multiple layers as well as multiple attributes per layer. In the images below, the player is behind a tree that is partially behind the house and the player is also colliding with the wall of the house; the point: you can not see the player because of the tile attributes (layer-depth and collision attributes).

Tile Attributes Include:
- Layer-depth
- Animation
- Grouped animations
- Collision (clunky at the moment)
- Particle object
- Map change flag
- And any logical combination of these attributes

As you can see, from the screenshot below, in the map editor these attributes are shown using colors.  For example the red tiles are collision (albiet very clunky), and the green are tiles that are drawn on top of the player.  The user can only see the attributes of the layer being edited.

Another feature of this application is the sprite management mechanism.  The characters have the ability to react to specific dialogue states or actions performed by other characters. These reactions are all scripted using text files and a custom script.  In the demo, if you talk to an older lady on the porch, another woman will arrive and they will have a "conversation" about a missing child.  Once the conversation ends, the woman will walk all the way home, and both women will be at new dialogue states.  It's a fairly flexible system.

My main goal was to create an application that would make it easy and fun to develop interesting 2D games.  There were only a few resources (images for tiles and sprites) when I started this project.  Having so little to work with (not that these images aren't appreciated, because they are very much appreciated) I wanted to build the program so that it could make up for any limitations with lighting, particle objects, interactive sprites and tiles, bloom effects, etc...

Maps like the inside of a house (depicted below) take less than 15 minutes to create, using the map editor. Although I am experienced.

Jason Myelin,
Jun 6, 2012, 3:22 PM
Jason Myelin,
Jun 6, 2012, 2:54 PM