Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by BlondGorilla

Hi Guys

Building a game similar to frogger, looking for some advice on the best approach to deal with the water scenario.

The way Ive been dealing with water in general (ie the player dies if they jump into the water)... is to use one of the blank tiles on the collision layer (46) and in update check if they are on it then kill them...

If you remember the game screenshot here: http://mytheongame.com/wp-content/uploads/2013/03/pFroggerPad.png

there are turtles and aligators floating in the water moving from side to side on the screen alligators kill the player (easy enough) and turtles carry the player to the edge of the screen.

Would a way to deal with this be to have an invisible entity that spawns turtle entities on the side of the screen, if the player moves onto a tile with a turtle, ignore the kill action then somehow link the player to the movement of the turtle entity.... (how would you do that)? any ideas would be awesome guys..

Cheers

1 decade ago by Joncom

How is your frog moving? Does it teleport between tiles, or glide between them?

If it teleports, then the answer is pretty simply, just "tie" its x position to whatever it is resting on when it lands.

If it glides, then you'll need to do the same, but trigger it being "tied" to whatever entity it lands on only after it has landed.

Then of course you'll have to "un-tie" once it jumps off.
Page 1 of 1
« first « previous next › last »