August 24th-27th 2012 :: Theme: Evolution
Fantasy Map Tactics - McFunkypants - 48 Hour Compo Entry
FANTASY MAP TACTICS
Viva la evolution!
The evil red science-denier armies are slowly roaming the land looking for blood.
You control three green unarmed bards intent on swiftly spreading the word about science to the Mapletree kingdom.
Capture 15 cities to rule the kingdom while avoiding any bloodshed!
I've always loved the "fantasy maps" that you find at the beginning of all fantasy novels (LOTR, Game of Thrones, etc). There's something exciting about seeing the map, with all sorts of interesting looking places just begging to be explored. I thought it would be fun to make a turn-based strategy tactics wargame based on this visual style.
I created my game in HTML5 using jquery, because something like this doesn't need 3d rendering performance, and because it is very easy to turn the game into a mobile (android, ios and ouya) app using phonegap.
I started by first drawing some typical fantasy map icons using marker on paper. After scanning in the images and creating a spritesheet, I wrote a simple random map grid creation class. It uses deterministic random procedurally-generated terrain (a seeded mersenne twister PRNG) so that a complex map can be recalled with a single integer seed value (no need to save a huge array to disk/cookie/localstorage). I then add extra water tiles around the edges by varying the shoreline randomly.
Finally, I scatter hamlets, towns, cities, forts and castles in non-blocked tiles and give them random location names by combining two syllables from an array of three-letter strings.
This results in a fantasy book-style map with scattered forests, mountains, hills, swamps, and deserts that hold a plethora of interesting-sounding locations.
Finally, I implemented an A-Star pathfinding algorithm that can navigate a character around obstacles to get to any waypoint on the map (the green and red dots: green is how far you will move in a single turn before running out of "energy").
I also coded a line-of-sight (LOS) algorithm for use in the combat, which means that eventually projectiles and magic spells could be cast in a straight line but would be blocked by mountains or towns. The white dots are tiles that you are able to "see" - but in this version you control peace-loving bards with no attack skills.
HOW TO PLAY:
This game is more like CHESS or a puzzle game than a typical tactics title like Final Fantasy Tactics or Fire Emblem.
Drag with the mouse button held down to scroll the map. You can zoom in and out with the + and - buttons.
If you want to restart with a completely different random map, enter any number into the box in the top left and click the world button.
Your green bards move very fast but die instantly if touched by a red army (unless you are really lucky). The red enemies move very slowly, but you are vastly outnumbered.
Choose which army you want to control by clicking the buttons on the bottom in the middle.
Click the location you want to move to and advance the turn (bottom left button) to start moving.
You only get ONE order per turn, so choose wisely.
Post Compo (JAM) edition: featuring enhanced terrain generation and new sprites for proper shorelines!
You must sign in to comment.