Tuesday 6 November 2012

The Player Dies at the End

6th November 2012

Don't mistake yourself with Alf Yngve's latest Sideways SEUCK masterpiece, which I released on the TND web site on Wednesday last week. Nope. This is basically a blog update about what I have been doing this morning. Well, yesterday, I got the enemies to die when the player throws an object at them. Now today I did the opposite.

The Player Dies at the End by Alf Yngve
A few days ago, I got the collision registers programmed in (The usual box collision register). Yesterday was the bullet/enemy sprite. Today was the enemy/player sprite. I first added subroutines to check whether or not each enemy hits the player and test flash the player - if a collision was spotted. The routine sort of worked, but I thought about making a loop for all deadly objects to collide in any area to the player's sprite's X-Y axis. :) That was much shorter, compared to repetitive comparing values for each sprite. It worked quite nicely as well.

Now that I got the player's sprite to change colour when an enemy collides into it. I worked on building a routine that will check for the player, to see if it was already dead. Followed by adding a routine to do the actual death animation. All worked fine, and the player can die.

The player lies dead, after being bitten by a jungle snake
There were just two more things to be added to the shooting and death routines. Which were to add points to an enemy killed, and also a lives subtraction counter. I got those to work fine. Next came playing the GAME OVER jingle after a life has been lost. I was going to get the player to have a short term protection (flash) but I with the short amount of time I had, I didn't get round to it. So Thursday is a possibility. I might be taking a little break from programming tomorrow. We'll have to wait and see.



The game's engine seems to quite positive, but I can be sure that things WILL eventually turn much better when this Thursday or Saturday, I will be adding some more extra routines to enable some of the enemies to shoot - according to what object they are. Followed by additional behaviour of enemies. Some will walk across the screen in a straight line. Some will move up and down while slowly moving across. Some will shoot, and some will have interesting and quite impressive features.) More about it when I get round to doing exactly that.

No comments:

2023 at a glance

2024 is here, and 2023 has been a really quiet year on the production front due to everything that had gone back to normality. The year has ...