about ZUMA like game.

Started by
2 comments, last by kevinhoff 17 years, 4 months ago
how about ball move function? is it a drive ball push the all balls? what we can do for they destory some ball. because the front ball need feedback to connect the drive ball. can i make more drive ball? I am a chinese. so english is poor. please never mind.
Advertisement
I've never done it myself but I'd suggest using splines to control the positions of the balls, the interpolating factor can be used to used to move each ball. I'd recomend storing them in a 2-way linked list to make it easy to delete balls that get destroyed and give each ball a link to its neighbours. Using the neighbour links you can check the spline interpolation values to keep each ball seperate.

Hope that helps.
APE
I was actually thinking the same way as Naku (splines) earlier today, but I had no time posting.

However, (not that I have played the game much) I think you could probably need multiple lists in the game, as the chain of balls can sometimes be "broken" so that there will be a chain of balls that remain still until the moving chain of balls "catches up" and starts pushing them again.

This I believe would also make it easier (and more efficient) with the collision detection, as you only need to check whether the last item of one list collides with the first item of the "following list" (a static chain of balls). And when a collision occurs, you just link that list to the end of your main (moving) list of balls.

So, in short:
Collision detection occurs only if there happens to be multiple lists at that time. And if the last item of the chain of moving balls collides with a static chain of balls, the static chain is linked to the end of the moving chain.

If you have trouble understanding what I mean, just say so what you do not understand and I'll try to explain better. :)
thank you very much. and happy new year:)

This topic is closed to new replies.

Advertisement