Titel:

Java Game Programming Developement Tutorial

Startseite
english
  
ISBN: 3827260272   ISBN: 3827260272   ISBN: 3827260272   ISBN: 3827260272 
 
  Wir empfehlen:       
 

How to move a cannonball

I think everyone of you knows games where you can define a angle and a power and try to hit your opponent that way (see the game Castles on this page). But it is really not easy to solve this problem in a program that needs to simulate the flight of a cannonball. Here you can find a applet which implements one method to get such a cannonball movement and you can also find the sourcecode to it (comments are in German!). Maybe you won't be able to understand every single step and all the Physic stuff I used but I think you'll be able to reproduce this method if you need to. OK, here comes the applet!

Use cursor key to change angle (left, right) and power (up, down). Hit Spacebar to shot a cannonball. Before you can use the keyboard you have to click on the applet once. And here comes the source code:

SourceCode download

  
Java 2 - M+T Easy . leicht, klar, sofort (Broschiert)
von Louis,
Müller
Siehe auch:
HTML easy zum Mitnehmen . Webseiten einfach selber machen
von Christian Wenz, Tobias Hauser
Sonstige Artikel:
Through a Glass Darkly (Taschenbuch)
von Donna Leon
Grundkurs Wirtschaftsinformatik. Eine kompakte und praxisorientierte Einführung (Ausbildung und Studium) (Broschiert)
von Dietmar Abts,
Mülder, Wilhelm
Sony SRS-Z510 Aktiv-Lautsprecherpaar
von Sony
 
    
     

Zurück zu Themenseiten:
StudyPaper.com/Startseite/Computer/Informatik/Programmieren/Java
StudyPaper.com/Startseite/Computer/Spiele

Das Setzen von Verweisen (Links) auf diese Seite ist gestattet und bedarf keine vorherige Absprache.
   
  Startseite  |  english  |  Bookmark setzen  |  Webseite weiterempfehlen  |  Copyright ©  |  Impressum