Jump to content
  • Advertisement
Sign in to follow this  
raptorstrike

Worm/Nibble style image bending

This topic is 4975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok im working on mock "Worm/Nibble" game (the game were you go around eating the apple and trying not to hit yourself or walls) any way i have no idea how to set up an entity that checks collision with it self and bends and gets longer with every apple like the worm dose. should this be lots of seprate squares following each other? thanks for the help [smile]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by raptorstrike
ok im working on mock "Worm/Nibble" game (the game were you go around eating the apple and trying not to hit yourself or walls) any way i have no idea how to set up an entity that checks collision with it self and bends and gets longer with every apple like the worm dose. should this be lots of seprate squares following each other?
thanks for the help [smile]


The simplest way is to just create a tile based world, a tile can either be empty, filled with the apple or filled with the snake. If a tile is filled with the snake and you try moving to it then well crash, game over. That should be real simple for collision detection.

Maybe keep a linked list of the snake tiles and just remove from the end and insert into the beginning (check direction where to insert, then check if something is on the tile already, or if you are going off the map).

HTH

Share this post


Link to post
Share on other sites
thanks i was thinking about doing somthing like that because there is not really a good way to add or take away or bend an entity in 2d (3d is a diffrent story)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!