Computer Science & Software Engineering |
CSCI 135 |
Have you seen the movie "The Martian"? You are stranded on Mars and need to use the Mars rover to leave the safety of the biodome and explore. But the rover has a limited range, and you must get back to the biodome before you run out of fuel or else the rover self-implodes.
Rover controls:
|
You should start by downloading the file rover.zip. This file contains some example control files and the associated images/sounds. These files will need to be in the same directory where you run your program.800 600 mars_surface.jpg rover.png rover_forward.png rover_backward.png rover_left.png rover_right.png roverSafe.png scorch.png biodome.png 50 600.0 100.0 25 thrust.wav yay.wav explosion.wav 0.5 40 400 100 # An easy game setup, you start fairly close to the biodome and have plenty of fuel. The # biodome is relatively large (and has a large radius). # Background image is of the Mars surface. # # Description of values: # <width in pixels> <height in pixels> # <background image> # <normal rover image> <moving forward> <moving backward> <moving left> <moving right> <rover safe> <rover crashed> # <biodome image> # <rover "radius"> # <rover starting x> <rover starting y> # <starting fuel> # <movement sound> <safe sound> <crash sound> # <movement amount> # <biodome x center> <biodome right center> <biodome radius>
Grade Item | Mars Rover | Points Earned |
---|---|---|
Program Compiles and Runs | 1 | |
Header Comment | 1 | |
Programming Style | 2 | |
Reads from File | 4 | Display Graphics Correctly | 6 | Key Presses Move Rovery | 6 | Calculates Intersection with Biodome | 6 | Game Ends Correctly | 4 |
Page last updated: August 15, 2018