I have been casually learning Panda3d for a while now in my spare time, and I recently decided that the goals that I had set for myself in my first project were a bit lofty for my knowledge/skills. I have put that on the back-burner for now to work on smaller projects to learn from.
As the subject would lead you to believe I have started on a tower defense game. I am using the game to become comfortable with collisions, file parsing & I/O, and creating a basic level editor to reuse in later projects.
I don’t normally visit the Showcase section of the forums and I just noticed another Tower Defense thread, but I do not think they will be very much alike.
Enough of an introduction onto the good parts…
Concept: 2.5D Isometric Tower Defense
–Toggle a tile from dirt to grass or vice versa
–Save maps to files
–Load maps from files
–Waypoint system for attackers to follow
Here are a few screenshots showing my progress:
Basic Main Menu:
Level Editor Menu:
Randomly Generated Map:
Tile art with editor:
That dark square is a highlighted tile…
Will release code later in development. It isn’t much to look at now.
Save maps to files
Load maps from files
Created waypoint system for attackers to follow
There are three actions that can be performed on the map tiles now…
*Toggle from grass to dirt or dirt to grass
*Add a waypoint to a dirt tile
*Remove a waypoint from a dirt tile that currently has a waypoint
The waypoints are given numbers in order that they are placed zero-whatever. When a waypoint is removed it iterates through the tiles and adjusts all of the other waypoint numbers to reflect the change.
Example Level with Waypoints:
New Level Editor Menu
New Level Editor Menu Toggle Animation
New Level Editor Controls
Made Waypoint markers smaller
–Not much in the way of functionality, but I made the level editor more intuitive and easier/faster/more efficient to work with. It now raises from (or lowers to) the bottom of the screen when the right mouse button is clicked. You can select what action you wish to take on the map.
–I have started adding menu options for wave attributes as well.
–I got tired of looking at the boring old font so I found a free font to snaz the place up a bit.
–I reduced the size of waypoint markers in the level editor because they were too large and obscured the terrain when several were placed close together.
The only thing left for the level editor functionality is the ability to save/load wave attributes to the map files. The maps will store information with regards to number of waves, types of attackers in the waves, delay between waves, etc.
The menu will procedurally propagate itself with labels and buttons to adjust wave attributes based upon the number of waves input. These will be stored into a dict and then iterated through when saved to a file.
After that I will either polish the menus a bit or start working on actual game play. I haven’t decided which yet.
New Menu Toggle Animation:
(kind of lame, but that it the menu slinking back down out of sight instead of using frame.hide() to blink it out of existence)