Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Tank-Style game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Vlax




PostPosted: Wed May 24, 2006 7:20 pm   Post subject: Tank-Style game

Im planning to start work on a game like 'Tanks'. Its that old game where you pick an angle, a power, and the FIRE.... I just wanted to know how everything would work. could a few people post links to other posts, source codes? or maybe just give me an idea of how I could do this. Thanks so much, this is the only good turing discussion site out there. You help countless of confused students and programmers, so -- Thanks.
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Wed May 24, 2006 8:29 pm   Post subject: (No subject)

if you want to check for old posts on a subject, use the search tool at the top of your screen, its very handy! Very Happy
Cervantes




PostPosted: Wed May 24, 2006 8:37 pm   Post subject: (No subject)

Welcome to the site! Smile

You'll ned to know some trigonometry to convert those angles and powers into velocities to be able to move the whatever-it-is-you're-firing.

You'll need to know arrays if you intend on having more than one tank on the screen.

You'll need to devise an algorithm for destructable terrain (if you want to include this). This would probably be the hardest aspect of your game.

You'll need a collision detection system to determine if you hit a tank. Math.Distance (the distance between two points formula) would probably be the best way to do this. This would easily allow you to do varying degrees of damage based on how close you hit. Make a function like f(x) = 1 / x {x| x E R, 1 <= x <= 25} to determine the fraction of damage done.

Be sure to check out the Turing Walkthrough to learn whatever you don't yet know but need to know (or don't need to know Wink)
Vlax




PostPosted: Thu May 25, 2006 5:46 pm   Post subject: (No subject)

Thanks, both of you. Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: