PlaceholderGames / 2016-Shield-Defence

Team 11 - Work
3 stars 0 forks source link

Collisions, Gfx and Health! (Shield Defence v5) #10

Open 14727986 opened 8 years ago

14727986 commented 8 years ago

Shield Defence v5.zip

I've worked on building the previous versions together manually since we couldn't get the packing and downloading of the separate versions working.

I got the work by Simon (gfx, ship firing logic and bullets) and Brogan (Health/Energy + Sounds) worked into the version I had with the ships with animations. I worked on the troubles we had in the class with the collisions with the bullets and managed to get it working!

I used 2 hitboxes per frame (I had trouble with this in class, but got it working by using the correct events at home) which splits the frame into 2 parts, "Player" and "Shield". Instead of having to check which frame the player was when the player was hit and say "if the player was in 'up' frame and a bullet hit from the bottom, left or right", instead, the player (middle) and shield are separated, and the bullets check if they hit the player or shield.

I've also started to use the 'member of group' event for collisions since we are using 4 different bullets (up down left right facing), by using groups we can tell Stencyl that if the player is hit by anything in the group 'Bullet', kill the player instead of having to say 'If the player was hit by "bullet up" OR "bullet down" OR etc.

= Small changes = The level now also restarts after the player is killed and plays a little animation while restarting The action key (full shield) is now spacebar instead.