PDA

View Full Version : [AS3] Bear And Cat


dorothy317
02-20-2009, 03:18 PM
hi all.
i am trying to deveplo a game like "Bear And Cat". You can simply google it to see what is about.
I have so many questions, but first if someone could help how to get started.
Here is what I can't figure out

1. How to generate those balls
2. How to make them move along a drawn path

I hope you understand my problem. Thanx.

rrh
02-20-2009, 04:01 PM
I looked at it. It's also kind of like Zuma.

Generating the balls is the easy part, and is a similar idea to almost any game that has lots of things that are the same but different colours. I tend to handle it by having a basic "ball" class and then extending that into "redBall" "yellowBall" "greenBall" etc. Then stick them all into a big array based on their order on the trail.

Moving them along the path is the hard part, so I'm not sure how I'd handle that. I'd probably try to generate an array of points, equally spaced, and generate the x & y of the balls from that, and then each ball can have a .distance value that will be an index of what point it is on along that array.

The part I'm still unsure about is how to best generate the array of points. It might require writing a separate level editor program.

dorothy317
02-20-2009, 04:07 PM
thanx.
I think I understand what are you saying.
Will try that and probably replay back again.