Computer Science Canada bubble shooting game

 Author: be natural* [ Mon May 19, 2003 7:14 am ] Post subject: bubble shooting game I just started making a game for my final project.. and I need help It's a bubble shooting game. There are bunch of different-coloured bubbles at the top part of the screen and I have to shoot bubbles one at a time from the bottom part of the screen to join the same coloured bubbles together. When 3 or more than 3 bubbles of the same colour are joined together they disappear and the bubbles that have been attached below them also fall down. I just have some basic ideas on how to make this game work but I have no idea how to shoot the bubbles and make them disappear when they're joined together. Also, can you teach me how to control and change the direction when I shoot? THX

 Author: Tony [ Mon May 19, 2003 11:44 am ] Post subject: ah, you'd need some madd trig the way I figure it. You better be in grade 11+, else you might have a bit of a hard time figuring out the formulas. Although it might not be as hard... You'd use cos to move the shooting cannon around in a circle, then convert that into X/Y displacement vector components. Thats how mcuh your circle will be moving on each axis each time through the loop. Hitting the wall is easy, you just multiple X displacement by -1 to reverse the direction. You'll be using circle collision detection to figure out when you finally hit something (dont forget the ceiling), at that point you'd have to move your circle to the closest array cell. What I mean is that you store your circles in a 2D array although every 2nd row must be a bit displaced to the side... So once hit, you find the closest emply cell and move your circle there. Then you'd just have to search through the array for the 3 attached matching circles and delete them, then drop anything attached to them below.

 Author: Dan [ Mon May 19, 2003 11:50 am ] Post subject: well for making them disapler there are a few ways you could do this, you could load them as pics or draw them and use View.Update with View.Set("offscreenonly") to refresh the screen after you have cleared away the things with cls and redrawn the rest. you could also draw them then draw over them with the same color as the backgourd. as for the conturals you whould need some math skils there to increas the deger the canaon thing is poiting each time the key is hit. pic.rotate may be usfull there.

 :