1945 – a vertical scrolling shooter
1945 is a clone of the popular vertical scrolling shooter 1942. Again, the graphics in the game were taken from the Spritelib by Ari Feldman. This game will serve as the basis for the screencasts once we finish Arinoid. The screencasts will probably begin with screencast 6. In the meantime, I am hoping that you’ll find the source code useful, and just leave a comment on the site if you have any questions
. I posted this in advance because one of the site’s readers needed some help with animations, which this game has but Arinoid doesn’t. Aside from animations, this game also features a scrolling background.

In this game, enemy planes just appear randomly from the top of the screen, move downward, and try shoot you. You, in turn, should avoid the enemy planes and shoot them down using your semi-rapid-fire gun. Despite the simple mechanics, I think that the current prototype is already fun to play – there’s something satisfying about clearing the screen of things, accompanied by explosions; this is the basic premise of many arcade games.
The code I used for the animations is heavily based on the animation code in aliens.py, which is included in the Pygame source distribution. I highly encourage you to study the code for that game, because a lot of what I know about Pygame came from studying that code
.
The 1945 code branches off from the barebones code, and borrows from Arinoid. However, in contrast to the barebones app which uses RenderUpdates, 1945 uses RenderPlain, because the entire screen changes at every frame due to the scrolling background, so dirty rectangles aren’t necessary.
The link to the 1945 zip file appears below. As usual, Python and Pygame are needed to run the program.
License
This work is published under a Creative Commons Attribution 2.5 License.


July 7th, 2006 at 11:24 am
Fantastic site! I look forward to each new tutorial now . . .
Gabriel
August 12th, 2006 at 10:04 pm
great site!
October 18th, 2006 at 1:44 pm
Great site. you need to work on it though.
October 20th, 2006 at 6:33 am
I haven’t replied to people in a very long time, and for this I apologize. Thank you so much to everyone for visiting the site and leaving valuable feedback.
Yes, updates have been slow
, but I hope to add more content in the coming weeks. Thank you so much for all the support.
Again, thank you so much!
November 8th, 2006 at 1:12 pm
Please email me about how you programmed shooting mechanism please.
November 23rd, 2006 at 4:10 am
I don’t quite understand how you get the background to scroll. Could you please send me an email with an explanation?
December 9th, 2006 at 6:52 am
[...] One of the questions that I’m asked most often is how the background scrolling in 1945 works. To answer this question, I’ve removed some of the code from the original 1945 code, added a few things, and came up with this scrolling demo: [...]
December 10th, 2006 at 10:44 pm
[...] As a follow up to the background scrolling example, I’ve modified the 1945 code again to emphasize how the shooting mechanism works. [...]