kthakore / Zombie-Trap

Zombie Lemmings!
3 stars 0 forks source link

Add wall types, destroyable #2

Open kthakore opened 13 years ago

kthakore commented 13 years ago

For the first level we should make a wall barrier so that zombies can destroy it.

kthakore commented 13 years ago

See the code here:

https://github.com/PerlGameDev/Box2D-perl/blob/master/examples/breakable.pl

It has two rectangles that are made when the overall object is made. So that when it collides it separates. For our walls we need to do the same. Any wall that has a breakable attribute will have to be run through a function that will make smaller segments of it and prepare it as in 'breakable.pl' above.

*Bonus make the walls be breakable with more then two segments for (High level of detail and so on in game options).

kthakore commented 13 years ago

It might be a good Idea to make this in a sperate script. Just copy the breakable.pl script.