
Basically, the player is given two options for shooting:
In a way, this gives the player the incentive to click if he wants a more rapid rate of fire, since you can effectively increase the intervals at which rapid fire gives off shots.
Feel free to ask questions!

The best way to understand how the scrolling actually works is by downloading the source code and experimenting with the program.
Here are the main changes:
Basically, we are taking advantage of the fact that the background is just a repeating pattern, so all we have to do is draw a background that is a little larger than the actual screen (here, the background is actually 640 by 512, but the screen size is 1945 is 640 by 480), then just move this large picture across the screen, creating the illusion of movement. Once we hit the edge, we just wrap the image around, which I think does a good job of making us believe that the sea just goes on and on and on to infinity.
If all that sounded complicated, I encourage you to try the demo and toggle between the two modes and scroll the background – you’ll see what I mean, and how simple it really is
Feel free to ask questions, and I hope you find this helpful!
]]>
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.
]]>