pygame is
Simple DirectMedia Layer is
Site Swing
Mario Shell Defense

Mario Shell Defense - 2.0

Wes (euphwes)



You play as Mario, who's desperately trying to defend himself against an onslaught of Koopa shells! Use the left/right arrow keys to run, the space bar to jump, and the "e" button to shoot fireballs! Shoot fireballs at the shells to destroy them. If you get hit by a shell, it's game over. Only tested on Win XP so far, but as far as I know it's cross-platform compatible. Please leave your comments and criticism, and feel free to poke around through the code and comment on how I could be doing things better.


-Added in this version: Mario is now animated, and can jump on shells to destroy them and get points!
-Fixed: File name issues that caused errors in Linux and Mac OS. Also tweaked some code to fix errors for Linux users.
-To do: Maybe give Mario a health bar? Perhaps make him shrink when hit the first time, then dying after the second hit (like the original Mario platformers). I'm just sort of winging this, since this project is really just a learning experience for me. Suggestions welcome!


Home Page:


click to view original size


Mario Shell Defense - 2.0 - Oct 29, 2009
Mario Shell Defense - 1.0 - Oct 28, 2009 account Comments

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

January 9, 2010 8:50am - Djdj7484 - nickname: (djdj77484)
how do i play the game
October 30, 2009 4:40am - Lasse Folkersen - nickname: (lassefolkersen) - 5/5
Haha - this is a great little game. Thumbs up!
October 29, 2009 5:45pm - Wes - nickname: (euphwes)
Thanks for the heads-up. I'm aware that Linux\Unix (and Mac OS) are case-sensitive, and I thought I had taken care to make sure my code matched the file names exactly. Whoops!

As for jumping on the shells, I just added that functionality in the game last night, as well as animating Mario's sprite, and plan to upload that today. Thanks for the comments!
October 29, 2009 1:31am - Donkyhotay - nickname: (donkyhotay) - 3/5
It's not very cross-compatible as is, couldn't run it on ubuntu linux. Fortunately I was able to fix it and get it to work. First of all some of your filenames have caps in them while the code doesn't. Although windows doesn't care about about caps in the filename linux and osX do. So you need to change the name of:




Also, I got numerous:

typerror: function() takes no keyword arguments

which I fixed by modifying the following sections of to read:
line 48: background.blit( sur, (0,0))
line 58: background.blit( sur, (0,0))
line 101: pygame.mixer.pre_init()

Beyond that it's not a bad little game, I keep wanting to jump on the shells out of habit though and keep dying because of that.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
May 22, 2016

May 21, 2016

May 18, 2016

May 1, 2016

Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

Mar 17, 2016

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