Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
bubble shooting game
Author Message
be natural*

Posted: 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

Tony

Posted: Mon May 19, 2003 11:44 am   Post subject: (No 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.
Tony's programming blog. DWITE - a programming contest.
Dan

Posted: Mon May 19, 2003 11:50 am   Post subject: (No 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.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 3 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: