Thursday, 14 June 2012

Flash Platform Game 


First Version

My first attempt at a platform game has been made using Flash Action Script. I used several arrays to construct an array block to organise the game map.
The whole of each level is written in one frame of the time line, and movie clips are called from here. I built this game obeying suitable laws of physics, for instance the jump height and speed have been set with limits, as well as a top fall speed similar to the real world.
In this version it is possible to gain points from collecting coins, though I am finding it difficult to get the correct result that I want. By this I mean to say that the coin either doesn't disappear or all the coins disappear from the stave at once.
It is also possible to be damaged from the spikes, which increments a health lose by 5 for all the time you are making contact with the spikes. It is also possible to die in this version, upon this the player then spawns into the start place for that particular level instantaneously. Then upon the loss of the player's final life the player moves to the "dead" frame and is unmovable.
I have also made a door to transition the player to the next level. This then enabled me to produce several levels and check their playable experience as a typical user.
The alien, that is visible in two of the screen shots in the upper left corner, has been coded with a basic AI type of behaviour. The idea was that the alien would count to a preset number and for every count it would move several pixels in a direction, either left or right, then once the preset number was reached the count would reset to 0 and the alien would turn in the other direction automatically. Unfortunately all the alien does currently is count to the preset number and then shift several pixels left and then right.
This version has also seen a successful use of ladder squares that connect and can be climbed with ease allowing the player more access vertically in the game.
Another unconventional tile I have used is the "quicksand" square. I actually found the code needed for this square by mistake when I missed out a function. Because of this mistake the player would sink through the squares passing through them completely. I noticed a potential for these tiles in the game so made notes of the code needed and have included them in the level designs since as it adds another direction of travel throughout the game.


No comments:

Post a Comment