hp
jblog
toc

Second Sunday in Advent

2015-12-06, post № 88

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

Lighting the second candle…

second-sunday-in-advent.gif

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

Bubbles

2015-11-22, post № 84

programming, Pygame, Python, #background, #bubbles, #color, #gfx, #pygame.gfxdraw()

Playing around with pygame.gfxdraw(), I created this program, which just draws some bubbles on the screen.

bubbles.png

Text Spinner

2015-11-21, post № 83

programming, Pygame, Python, #black, #input, #red, #red letters, #round, #spin, #text, #text input

This program lets you input text and spins it around the center!

Controls

  • Text input (alphabet, space and punctuation) inputs text,
  • ‘F1’ takes a screenshot.
text-spinner-1.png
text-spinner-2.png
text-spinner-3.png
Source code: text-spinner.py

Sailing

2015-11-15, post № 82

art, #beach, #boat, #ocean, #pixel, #pixel guy, #sea, #ship, #water

The little pixel guy wants to cross the water. He comes up with a good idea!

sailing.gif

JClock VII

2015-11-14, post № 81

programming, Pygame, Python, #clock, #composite, #composite number, #factorization, #prime, #prime factorization, #prime time, #primes

This alternative clock is not really readable by human. It calculates the first 𝟣𝟦𝟦 [1] primes, assigns 𝟨𝟢 of them to every possible second, 𝟨𝟢 to every possible minute and 𝟤𝟦 to every possible hour.
Multiplying those three primes for a given time results in a composite number representing said time. Using integer factorization, you then can get the three primes back, map them to seconds, minutes and hours, and by doing so calculate the time.

jclock-vii.gif
Extra assets: jclock-vii_extra.gif
Jonathan Frech's blog; built 2021/09/06 04:50:48 CEST