Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Circle Wars (Sweet game)

Author
Message
Delfir
20
Years of Service
User Offline
Joined: 28th Aug 2004
Location:
Posted: 30th Jan 2007 07:47 Edited at: 30th Jan 2007 07:55
It's not like a game, more like a viewable simulation type... thing. Anyways, at the beginning of the program, the user types in the amount of circles that will be fighting each other. The circles are created and randomly placed and then they start flying. As they collide with one another, one circle disappears. They keep destroying each other until there is one circle left. The probability of a circle being destroyed decreases exponentially as the amount of circles decreases, and inversely, increases exponentially when there are a lot of circles. As a result, no matter how many circles the user decides to put in, there are usually only about 10 circles remaining after the first 1.5 seconds of the "game". This is when the fun begins. This is where you can actually start watching the circles destroy each other until it is down to the final 2. All the circles are numbered and have their number above them. When a circle collides with another circle, it's direction changes to make it look somewhat realistic. The highest numbered circle is colored red. It requires no media so I will just post it as a code snippet. Enjoy watching these circles destroy each other!



One last thing I forgot. If you click anywhere on the screen, a circle will be instantly repositioned on the screen where your mouse is. This is useful when there are only 2 circles left and you are bored of watching them chase each other.

Don't take life too seriously... no one gets out alive.
Brain111
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 17th Feb 2007 05:21
Hahaha, that is a very cool idea for a thing. I got bored and added to it.

The circles now have health (which is displayed above them instead of their ball number) and some amount of AI (they chase each other). Oh, and they're all different rainbow colors, cant forget that.

flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 21st Feb 2007 18:10
te he, thats funny. only problem is that somtimes 2 balls cant hit eachother


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
Johnathon
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: South Park
Posted: 26th Feb 2007 17:40
can someone please post an EXE of this game. It looks cool but sadly, I don't have darkbasic yet (I'm getting it for my birthday). If someone can post it I will be very gratefull.
blah569
18
Years of Service
User Offline
Joined: 10th Aug 2006
Location: Austin, TX
Posted: 3rd Mar 2007 22:26
Quote: "
Post the exe
"


Attached. This isn't the original one, but this one has more stuff so I'll post it, lol.

Been programming in php for a long time now. C++, Java, Dark BASIC Pro, etc are fun as well.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-22 23:56:16
Your offset time is: 2024-11-22 23:56:16