From: Sam S. <sam...@gm...> - 2005-11-27 18:10:30
|
On Nov 27, 2005, at 11:29 AM, atani wrote: > Neat :) Using the Tiki Objects system should be relatively simple > to use. Basically you would just need to override the draw() > method (if required) and the constructor to setup the object. > That part I get, I'm just a little shakey with sticking them all into a list together, I'll have to look at how the drawables go in a list even though they're different types. I was also trying to think of how to avoid if(type=="ball") add(new Ball); else if(type=="paddle") add(new Paddle); else... for all the different object types in DCBlap. Right now I have a linked list of "templates" that get copied over into the new object when it's created, which was the advantage to copying function pointers around. > when you attempt to go into a new game the board says "out of bounds" Eek! Damn you, global variables! TikiBlap started with an older copy of the DCBlap tree, and then over the weekend I found an archive with a much newer tree. I merged in the "out of bounds" stuff from the newer tree, but forgot to reset the world dimensions when you start a new map. The ball can sometimes get pushed outside of the world if a powerup spawns too close to the edge (like at the top of a breakout map), so the out of bounds message resets the board as kind of a do-over. -Sam |