Sign in to follow this  
  • entries
    55
  • comments
    55
  • views
    24447

Still Take You Home

Sign in to follow this  

98 views

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
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now