c’t Racetrack II
2015-12-05, post № 87
games, programming, Pygame, Python, #advanced, #c't, #c't-Racetrack, #car, #car race, #race, #racetrack, #vertrac't
Since the 30th of November 2015 the contest is over. The code is now visible in my post c’t-Racetrack. In this time I improved my program and added a semi-working collision detection (unfortunately it does not cover every case), a helper function (will not allow you to make an invalid move) and an additional view mode (lets you only see the car’s path).
Controls
- Mouse movement changes the new acceleration vector applied in the next step,
- Left click moves one step,
- Right click is a undo for the latest move,
- Middle click moves the frame,
- ‘F1’ toggles view mode,
- ‘F2’ takes a screenshot,
- ‘F3’ exports current moves,
- ‘F4’ resets the game,
- ‘h’ toggles helper.
Source code: ct-racetrack-ii.py
Extra assets: ct-racetrack-ii-0.png, ct-racetrack-ii-2.png, ct-racetrack-ii-3.png, ct-racetrack-ii-4.png, ct-racetrack-ii-5.png, ct-racetrack-ii-6.png, ct-racetrack-ii-7.png, ct-racetrack-ii-8.png, ct-racetrack-ii-9.png, ct-racetrack-ii-10.png, ct-racetrack-ii-11.png, ct-racetrack-ii-12.png, ct-racetrack-ii-14.png, ct-racetrack-ii-15.png, ct-racetrack-ii_moves-0.txt, ct-racetrack-ii_moves-1.txt, ct-racetrack-ii_moves-2.txt, ct-racetrack-ii_moves-3.txt, ct-racetrack-ii_moves-4.txt, ct-racetrack-ii_moves-5.txt, ct-racetrack-ii_moves-6.txt, ct-racetrack-ii_moves-7.txt, ct-racetrack-ii_moves-8.txt, ct-racetrack-ii_moves-9.txt, ct-racetrack-ii_moves-10.txt, ct-racetrack-ii_moves-11.txt, ct-racetrack-ii_moves-12.txt, ct-racetrack-ii_v1.py, ct-racetrack-ii_v2.py, ct-racetrack-ii_v2-fail.py, ct-racetrack-ii_v4-fail.py, ct-racetrack-ii_solver.py