1 / 21

Games to Science

Games to Science. Runo Marian, Oppliger Andreas, Neff Marius, Hirt Luca. Project „ Tankwar “ by. Games to Science - Presentation. Introduction Planning Problems Solving problems (Implementations) Demonstration Questions. Planning the project. First steps: Finding fellows

Télécharger la présentation

Games to Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Games to Science Runo Marian, Oppliger Andreas, Neff Marius, Hirt Luca Project „Tankwar“ by

  2. Games to Science - Presentation • Introduction • Planning • Problems • Solving problems (Implementations) • Demonstration • Questions

  3. Planning the project • First steps: • Finding fellows • Finding ideas • Finding an appropriate programming language

  4. Problems during programming • Collisions:

  5. Problems during programming • Variety of projectiles

  6. Problems during programming • Moving tank across level

  7. Problems during programming • Background

  8. Tank movement The Tank.move(int d) function makes the tank move d pixels to the right, if possible. The tank‘s angle is automatically adjusted according to the landscape. Implementation overview follows…

  9. Tank movement: requirements • The tank‘s x position

  10. Tank movement: requirements • Ground level at given x position

  11. Tank movement: requirements • Fixed reference points

  12. New x position

  13. Check if new tank angle is legal: Yes  move tank to this position, decrease remaining move distance for this turn No  do not move tank • …done

  14. Graphic Definition of the landscape in the XML-file <color value="cyan"> <fillRect x="0" y="0" dx="1000" dy="500"/> </color> <color value="green"> <fillRect x="0" y="450" dx="1000" dy="200"/> <fillOval x="100" y="400" dx="500" dy="200"/> <fillOval x="400" y="400" dx="500" dy="200"/> <fillOval x="300" y="220" dx="400" dy="600"/> <fillOval x="250" y="308" dx="100" dy="100"/> <fillOval x="650" y="308" dx="100" dy="100"/> </color> <color value="cyan"> <fillOval x="-47" y="292" dx="200" dy="200"/> <fillOval x="847" y="292" dx="200" dy="200"/> <fillOval x="150" y="208" dx="200" dy="200"/> <fillOval x="650" y="208" dx="200" dy="200"/> </color>

  15. Projectile collision detection • Landscape image mask • Adding tanks • Per pixel check • Explosion initiation

  16. Demo

  17. Questions ? http://people.ee.ethz.ch/~runom/tankwar • Play the game • Give feedback • Get the code • Thank you for your interest!

More Related