pygame is
Simple DirectMedia Layer is
Site Swing

PyTowerDefense - 0.4.6

Marco Baxemyr (phelerox)



An early-stage Open Source Tower Defense Game developed with Python and Pygame. Admittedly it's very unbalanced and rough, but it allows for an impression and I would be grateful for feedback. I am doing this game in a project-course in school, so I will keep working on it at least until Summer 2010.


The game should be quite challenging now. You're forced to maze, and maze well. Although I make no claims that it's well-balanced.

The Fire tower now has an image of its own.

Added three new waves of enemies - vampire lieutenants, Quite Dead Men (yeah, uh, lol!), and an Armored Zombie Boss.

Added Pygame-Console. Really cool! Press Ctrl+W to display it. (although, it falls back to 0.5 in the windows binary - 0.7 looks way cooler)

Terminated some poor bugs. *evil laugh*


Home Page:


click to view original size


PyTowerDefense - 0.5 - Mar 13, 2010
PyTowerDefense - 0.4.6 - Nov 25, 2009
PyTowerDefense - 0.4.5 - Nov 21, 2009
PyTowerDefense - 0.4.4 - Nov 20, 2009
PyTowerDefense - 0.4.2 - Nov 19, 2009
PyTowerDefense - 0.4.1 - Nov 18, 2009 account Comments

If you wish to leave a comment with your account, please sign in first.

February 3, 2011 4:23pm - Don Polettone - nickname: (donpolettone)
I kinda always get a C++ runtime error after some time (10 min or so)... is that due to x64? But I must admit: This game is promising! Go on!

October 29, 2010 5:10am - removed - nickname: (imansubarkah)
Good article! Thank you so much for sharing this post.Your views truly open my mind.
July 19, 2010 5:04am - Olivier Pons - nickname: (olivierpons) - 5/5
Very good game, it's improving time after time !

Just a suggestion : when launched, just add immediately a "help" window with keys "1,2,3,4" explained, because people almost never read the help.
As for the graphics, ask for a contribution in the "help" windows (or add an "about" menu explaining who you are, what you did, what you need to finish it)

How about a button "launch next wave" to launch the nex wave immediately ?

Congratulations once again, your game is really nice !
March 16, 2010 9:27am - Jordan Trudgett - nickname: (tgfcoder)
If you finish this game, I will make sound effects for you. :)
March 15, 2010 9:57am - Marco Baxemyr - nickname: (phelerox)
Numbers below tower icons is a brilliant idea!

I'm glad you're impressed by the fps! I wasn't sure if it was good or not. In future releases there will probably be a new pathfinding algorithm that is mostly much more efficient. In v. 0.5 and earlier you'll notice a brief lag when selling/building towers that affect the creeps' paths.

Shorter sounds would be lovely, it would both relieve the timing issue and decrease the number of simultaneous sounds. *Gotta try out Audacity*

I know nothing about audio harmony, so even though your suggestion sounds interesting indeed I won't even try to implement it! :) But, this game is OSS so if a sound-guru drops by and loves your suggestion..maybe you'll live to see it. #notlikely :D

But - having a buildup of fire damage, decreased by ice attacks (and vice versa) would be nice.

Huge thanks for your feedback and praise! :)
March 14, 2010 5:46pm - David Khono Hackland - nickname: (khono) - 4/5
Gahaha, my bad, there are hotkeys for the towers already. The numbers 1 through 4. You could try putting big, high contrast-coloured numbers under where the tower menu is to make it obvious to those of us who never carefully read through the manual :)
March 14, 2010 5:44pm - David Khono Hackland - nickname: (khono) - 4/5
Great additions! I find the game to be much more playable! I'm impressed with the consistent framerate and smoothness even during the very high population times.

I love the graphic for the wizard tower :) It'd be sweet if it actually fired those balls. And maybe after it has fired, it needs to recharge its energy. Perhaps one could make it get an energy boost when it gets the killing blow on a mob. Perhaps one could make 2 upgrade branches for the tower, one being a dark tower which drains the life from the monsters and uses that energy against them and the other is the 'light' tower which, perhaps, 'flashes' very nearby enemies, stunning them briefly.

Another thing that'd be quite handy would be hotkeys for building each tower. That would make the placing of towers much faster and save much of the mouse movement.

The sound effect is fine IMO. When the action gets intense, one can't really match up the hits with the sounds so the timing isn't such a big deal. Because there's so much action going on, it'd be appropriate, I think, to make the sounds very short so they aren't constantly playing over each other. Oh oh oh! And you could go to extreme lengths by making the different sounds all harmonically related to each other! So like... let's say fire and ice towers will be disharmonic, having sounds that clash with one another where as neutral towers would build up a ... hmmm... I can't remember the word, but make them sound good together in any combination. Then if you have closely related towers that help each other, like oil and fire or a slow tower (like ice) with a tower that does more damage the more times it hits the same target uninterupted, then their sounds go together very well, and as the damage multipliers go up, the harmony builds! Ahhhhh, that would be soooo cool, but if you don't know that stuff already ya'd need to learn a lot.

Yeah, this game is definitely improving significantly :)

Keep it up!
February 7, 2010 7:57pm - David Khono Hackland - nickname: (khono) - 3/5
Not bad not bad. Strictly from a gameplay point of view it would be cool if there were status effects, such as cold towers slowing down creeps, and fire towers doing fire damage over time, possibly combining with a tower which fires combustibles (like wooden arrows?) Throwing down some terrain would also spice things up I think. You could also start adding sound effects such as those one can find in these places:

Oh and my score of 3 was simply because I've played many tower Ds that are much more complicated. The game ran very smoothly. GJ :) If you ever run out of ideas I've got tons. Just lemme know, preferably at
December 4, 2009 9:00pm - Pie - nickname: (pierocks) - 5/5
How did you have all the .dll's packaged together? I didn't even see python.dll
December 3, 2009 12:49pm - Cyrei Shadowrage - nickname: (bohric) - 5/5
With a certain strategy, this game is very easy. I won't reveal what it is. Nonetheless, awesome game!
November 23, 2009 2:06pm - Dylan J. Raub - nickname: (dylanjraub) - 4/5
Very good looking. Looks like you spent all your time on the look than the ai though. Why won't the towers kill the weaker or closer ones? This makes the game very frustrating.
November 21, 2009 5:19pm - Andrew - nickname: (darknesschaos)
Another thing I suggest you do is tile your images, there are simply too many to download with the game. Most of which, you don't even use and by tiling them together you will reduce the total size of your downloads. Another suggestion would to have the grid displayed by default and people could turn it off if they had felt like it.
November 21, 2009 10:06am - Marco Baxemyr - nickname: (phelerox)
Andrew: I used the pygame2exe script, which you can copy here:

Although I made a tweak to the part making sure the default font is bundled. Not entirely sure it's required now that I use python2.5 for generating .exe's (which I recommend!), but feel free to use the script in the PyTowerDefense source download should you need. Just tailor the BuildExe __init__ function to your needs. Also, you might find this page useful:

You're making a TD too? Cool. :) Feel free to contact me if you wish to exchange ideas. And you may be right about mouse visibility. I'll look into it! :)
November 20, 2009 6:28pm - Andrew - nickname: (darknesschaos)
After playing the game a bit a suggestion to be is to not hide the mouse when you go to place the tower. It feels awkward when trying to place the tower.
November 20, 2009 6:22pm - Andrew - nickname: (darknesschaos)
What did you use to make it into an exe for windows. I am curious for when I plan to do it with my tower defense game.
November 18, 2009 5:15pm - Marco Baxemyr - nickname: (phelerox)
masterlee: I am aware of all those issues, and more besides - and they will be fixed in all due time. Thanks a bunch for your time, though!
November 18, 2009 4:07pm - Carsten Eggers - nickname: (masterlee)
Walktrough/bug report:
Build three towers in the upper left all beneath the start. Take care that there is no gasp between them. Now the creeps should never leave start. Build the expensive Ttower right from the start. To build the first tower press 4 then klick. To build the second press 4 twice to get enough money money. Same for the third tower. Then press 4 yust another time to get 160 Gold again. Now wait...
... and: You have survived ;)

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 31, 2017

Jan 24, 2017

Jan 19, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)