Strawberry Alert: Day 4

Published August 10, 2017
Advertisement

Play it! | View on GitHub

Today I finally added aliens to the game! There is no level design or hit point system whatsoever. There are four aliens walking to the left. If the player attacks them, they die, otherwise they keep moving until they are out of sight. It is some progress, at least. I couldn't do much more because I spent most of the time chasing a silly bug. I created a template for the aliens with, among other properties, the speed. And since all aliens were created from that template, when I modified the speed in one alien, it changed of course the speed for all aliens, because it was a shared reference.

The cause wasn't obvious to me at the beginning because what the bug caused was that the second alien, fell through the ground. The issue was that after the collision check for the first alien, I correct the position and then I set the vertical speed to 0. To correct the position I simply subtract the current vertical speed from the vertical position. So the second alien had the speed already set to 0 when correcting the position, therefore the position didn't get corrected. It's been a while since I felt this stupid.

My plans for the future are:

  • Create a bit of a map, with platforms and aliens coming from different places.
  • Add a hit-points system. The hero would have 4 hit points and lose one each time she collides with an alien. If she reaches 0 hit points, the game is over.
  • The player will only be able to move forward. Once he gets to the end of the level, the game is over and the final score depends on how many aliens were slain.

 

1 likes 5 comments

Comments

slicer4ever

very interesting so far.  One thing i might suggest is reevaluating allowing the player to move backwards.  it's one thing if it works like mario(where you can't move the screen backward).  but the player being bound to just the left side feels very weird.  perhaps allow the player to move around the screen, then move the screen only when the player is near to the right side of the screen(effectively mimicking mario)?  anyway, that's my 2c from what i've tried so far.  good luck :)

August 11, 2017 02:49 AM
Avalander

Thanks for the suggestion :) I think you're right, I should implement moving backwards. I was just being lazy.

August 11, 2017 06:27 AM
Thaumaturge

A bug report: I jumped, then jumped again. I appeared to double-jump, but then fell through the floor. Alas, the floor seems to be too high up to reach again once one has landed on the bottom of the screen.

 

I think that I managed to replicate the bug--very intermittently--by pressing the jump button twice (perhaps more) in very rapid succession.

 

Otherwise, I think that this continues to look cute and potentially-fun. I hope that you manage to implement all that you have in mind for it! ^_^

 

(And, if I may, another vote for allowing the player to move a bit more freely, even if the screen only scrolls to the right.)

August 11, 2017 05:14 PM
Avalander
4 hours ago, Thaumaturge said:

A bug report: I jumped, then jumped again. I appeared to double-jump, but then fell through the floor. Alas, the floor seems to be too high up to reach again once one has landed on the bottom of the screen.

 

I think that I managed to replicate the bug--very intermittently--by pressing the jump button twice (perhaps more) in very rapid succession.

 

Otherwise, I think that this continues to look cute and potentially-fun. I hope that you manage to implement all that you have in mind for it! ^_^

 

(And, if I may, another vote for allowing the player to move a bit more freely, even if the screen only scrolls to the right.)

Thanks :) Yeah, allowing to move to the left is next on my list of features. I've been putting it off, but I agree that the game needs it.

And thanks for the bug report! I could reproduce it, I hope to be able to fix it tomorrow. :)

August 11, 2017 09:34 PM
Thaumaturge

My pleasure, and good luck in dealing with that bug! ^_^

August 12, 2017 05:58 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement