usage: python src/main.py [options]
Runs the game Jetpack-Man
optional arguments:
-h, --help show this help message and exit
-d, --debug turn debug mode on
-g, --draw_outlines draw outlines of images instead of the actual images
--fps FPS Change max drawing FPS
--speed SPEED Change the speed multiplier
--bounciness BOUNCINESS
Change the bounciness (1 is elastic, 0 is sticky)
Most of the control scheme and game is not yet implemented.
w, a, d Activate your Jetpack to accelerate up, left, or right.
q or Escape Quit the game
r Press to randomly re-generate the ground terrain.
p Press to pause/unpause the game.
Spacebar Press to reset the player's position and velocity.
Jetpack-Man is a game created as a learning exercise. The intent of this learning exercise is to create an efficient physics engine.
The physics engine uses line segments to represent all objects -- including the level. It uses a priori/continuous form of collision detection, allowing the precise collision time to be calculated. All object collisions are then stored into an event queue, and evaluated in the order they occur, when they occur.
When objects are moved, or have their acceleration, velocity, or position changed (not as a result of acceleration or velocity), such as via collision, all of their current collisions are invalidated, and new ones are recalculated.
In addition to using a "game" event queue for handling object collisions according to game time, there is a "real" event queue, which handles events that occur in "real" time. This event queue is currently only used to evaluate key press/release events, which are added to the event queue with a timestamp so that they occur at the exact time.
Another objective of Jetpack-Man, other than creating an efficient physics engine, is to keep the game code 'pythonic'. It should follow good coding practices, and the game itself should be fun to play, over keeping a high difficulty.