Worklog for Foppy

Mano Trooper

Return to Worklogs

Finished(Posted 2010-09-08)
I have just uploaded the finished game to my website.

These are the latest additions:

- two pieces of music by coda (coda.s3m.us)
- scrolling credits on title screen
- scoring (each shot costs a point)

---------------
Foppygames

German Keyboards(Posted 2010-07-30)
In the original Paratrooper, firing is done using the UP arrow key. In my version I had reserved the space bar as well as the Z key for firing. I prefer Z myself, pressing the space bar repeatedly can become a bit noisy and less responsive.

However, what about our German friends who have the Z somewhere in the upper regions of their keyboard? (As well as many other countries where such a layout is used.) In that case the Y key would be better, so that has now also been added! :D

If (KeyDown(KEY_SPACE) Or KeyDown(KEY_Z) Or KeyDown(KEY_Y) Or KeyDown(KEY_UP)) Then
   ' ...fire!!
End If


Other things that have been added since yesterday:

- The TSoundPlayer now also plays music
- M key can be used to toggle music on/off
- Switch between full screen / windowed mode on title screen

I thought adding the full screen/windowed mode option would be quite some work but it turns out you can simply call Graphics() again to switch to another color depth (for instance, 32 for full screen and 0 for windowed), no need to reload graphics.

(Searching on the forums I found this thread about the same topic: http://www.blitzbasic.com/Community/posts.php?topic=81821 )

---------------
Foppygames

Sound Player(Posted 2010-07-29)
I ran into a problem playing a "shriek" sound when a soldier is attacked by a dog. At that same moment, the soldier is also deleted from memory. I realized after a while that I wasn't hearing the sound, and concluded that this was because the TChannel object was a field of the soldier object. When the soldier is deleted, the channel also disappears and the sound stops! (You could say this is realistic, but, anyway...)

At first I cheated a bit and solved this by having the dog produce the shriek sound for the soldier, since the dog never goes out of memory. Of course it worked but it's a bit of a funny hack.

Now I have added a separate sound player object, so that all sounds are playing from this central location, independent of the game objects that trigger them. This also means all sounds are loaded from the same function, giving me a nice overview of all sounds being used in the game.

The sound player type allocates a number of channels that can be used, in a TList. It keeps track of a TLink pointing at the channel to be used for the next sound. When it receives the command for playing a sound it will play that sound on the selected channel and move the link to the next channel (and to the first when the end of the list has been reached). I could also make it so that it selects a channel that is not already playing a sound but in practice the simpler approach works fine.

The TSoundPlayer type looks like this:



At the start of my game I have this initialization code:

Import "TSoundPlayer.bmx"

TSoundPlayer.init()


In the init() function the sound player creates the list of channels as well as an array of sounds.

Now from within a game object I can play a sound like this:

Import "TSoundPlayer.bmx"

TSoundPlayer.play(TSoundPlayer.SOUND_JUMPER_SCARED)


---------------
Foppygames

Running Dogs(Posted 2010-07-12)
I created running animations for the two dogs.

Then I created an animated gif (using the free program Unfreez from http://www.whitsoftdev.com/unfreez/ ) just for fun:



Other additions:

- jetplanes throw bombs at the player
- the player can shoot the bombs as well as the jetplanes
- jetplanes can crash to earth when shot, possibly killing landed soldiers
- paratroopers whose parachutes are destroyed will fall down, possibly killing landed soldiers
- dogs attack landed soldiers
- lots of sound effects were created using SFXR ( http://www.drpetter.se/project_sfxr.html )
- new colors



---------------
Foppygames

Pyramids(Posted 2010-06-10)
The enemy soldiers now create human pyramids next to your base (once more than 3 have landed on either side) in order to destroy your gun, as in the original game. This is achieved by keeping track of the number of landed soldiers and the sizes of the two pyramids. Each landed soldier will check those values and decide whether to move in and become part of the pyramid.

In the meantime parachutes have been added, colors of helicopters and soldiers have been changed, and helicopters move up and down a bit while flying. I also added a title screen and a game over screen and the necessary program structure to switch from one game state to another.

It's game over when a soldier lands directly on the base, or when a complete pyramid is constructed (consisting of four soldiers) although a check for that last condition still has to be added. In the original, once a pyramid is under construction, the game is almost certainly going to end soon (although I understand you could still kill the soldiers by having pieces of helicopter wrecks fall on them). In my version I will add two dogs that will try their best to scare the soldiers away, and perhaps other ways of defeating landed soldiers. The availability of such backup plans would allow for more frantic attack waves, since all is not lost immediately when a few enemies reach the ground.



---------------
Foppygames

Mano Trooper(Posted 2010-06-02)
Mano Trooper will be a remake of Paratrooper (1982, Greg Kuperberg), programmed in Blitz Max. In addition to the guns and helicopters from the original it will feature a heroic girl and her two brave dogs trying to stop a paratrooper invasion. The game already contains the rotating gun and bullets, as well as the helicopters and paratroopers. I am currently adding parachutes and tweaking the speed and timing of various objects. The game will run at a resolution of 800*600 and offer a choice between full screen and windowed mode (if only through a text file). Controls will be left + right and a fire button.



---------------
Foppygames