Still Take You Home

Published July 28, 2009
Advertisement
I started implementing the enemies' CHARGING state which will now try and pull the player to the top of the screen. This gives the player the chance to destroy any enemies that are pulling it and then the player will move back to the bottom of the screen.

At the moment, I have the enemies in the CHARGING state moving towards the player and when they collide they enter the PULLING state where the velocities of both the enemy and the player change.

Then in the main loop, if the player is moving up and there are no enemies pulling them, the player's velocity is reversed until they reach the bottom of the screen again.

The problem I have at the moment is that when the enemy collides with the left or right edges of the player then the enemy enters the PULLING state but it hthen becomes harder to destroy the enemies. This is because the player can only move a bit at a time and this may be unfair (but then again it might make sense if you consider it a tractor beam). I already ignore collisions to the back of the player as it is impossible to destroy anything behind you but with left and right collisions it's not impossible just quite hard.

So I'm in two minds as to keep left/right collisions as pulling the player and sort out the movement or to do something else (e.g leave the screen like I plan to do for when enemies are below the player). Does anyone have any ideas?

Thanks for reading
-AEdmonds
Previous Entry Work Is Never Done
Next Entry Endlessly
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement