The goal of the game is to perform a PIT Maneuver on the red car. Move your cop car close to the rear quarter of the red car and attempt to spin the car to an angle of at least 45 degrees in either direction. You win by spinning the car 45 degrees or more, and lose if it is anything less.
- WASD or arrow keys for movement.
- W or Up increase your velocity (0-10)
- S or Down decrease your velocity (0-10)
- Spacebar to come to a complete stop
- R will reset the game and start the red car in a new random location
- Esc will quit the game
The level will increase as long as you want to play. The speed of the red car will max at about level 7.
NOTE: The "pyweek31-pit-stop-1.0.zip" will unzip correctly via finder in Mac, but will not unzip properly via the unzip cli utility. If you're on Linux I recommend downloading the source from the github repo. My apologies for the inconvenience.
Windows Users - the pit-stop-1.0-win.zip file contains the .exe and the supporting data files, but no README. On my tests, the .exe file will need to be allowed by any AV and by windows in order to execute properly.
This is my first ever submission to a Game Jam. All constructive criticism is welcome. I'm James Alexander on discord if you have questions or feedback.
* Complete an entry and have something to submit at the end of the week (previous attempt in PyWeek 29 but I did not finish)
* Keep the game mechanic simple and digestible (both for programming and for user interface)
* Use as many randomly generated elements as possible
Ratings (show detail)
PyMunk + PyGame Struggles
That said, I've made progress in rendering the `debug_draw` state from PyMunk so I can at least visualize what I've written so far. I'm trying to keep the mechanic fundamentally very simple. The premise is to perform a PIT Maneuver (https://en.wikipedia.org/wiki/PIT_maneuver). The win condition is if the "Bad Guy's" Car reaches a specified turning radius, then the game will reset with (theoretically) harder presets for what the bad guy's car will do between runs.
The PyMunk physics engine is quite fun to mess around with, and was easy enough to add debug objects to it to see how the objects (cars i.e. top-down rectangles) would interact with each other. I just need much more work to get my PyGame sprite images loading on top of the right places and moving appropriately with the user's input.
Original Design Features
- Random AI Movement of the vehicle to "avoid" player intervention - My limited attempt made it appear more like the enemy car was buggy rather than intentionally moving, so I took it out before shipping.
- Random obstacles that would slow the progress of both the enemy AI and the player character
- Some sort of "course" that the road would take. Not just an infinitely long infinitely wide highway
In the end, my struggles with the "math" to make the player's position static on the screen while still having physics applied to him proved to be so "clunky" that I almost didn't submit a game at all. I managed to get the game into a shape that is "playable", but has many rough edges around my implementation with the physics engine. All of these rough edges were a product of trying to compensate for a relatively static player character position that still needs to have weight and velocity with respect to the enemy car.
For future physics based games, I think I would like to try using the `arcade` python library instead of pygame. From my read on the documentation there are more built-in features for handling the exact situation I've described above with platform games. Theoretically these paradigms could be applied for any "scale" of objects in the pymunk space.