jblog
toc

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.
ct-racetrack-ii-13.png
Source code: ct-racetrack-ii.py

First Sunday in Advent

2015-11-29, post № 86

art, #Advent, #animated, #animated gif, #candle, #first, #first Advent, #first candle, #first of Advent, #first Sunday, #first Sunday in Advent, #first Sunday of Advent, #gif, #pixel, #pixel candle, #pixel guy, #Sunday

Lighting the first candle…

first-sunday-in-advent.gif

Sleeper

2015-11-28, post № 85

programming, Python, #sleep, #snore, #time, #time.sleep(), #z

Taking time.sleep() to the next level.

sleeper.png
Source code: sleeper.py
Jonathan Frech's blog; built 2021/04/16 21:21:49 CEST