jblog
toc

Jeakout

2015-08-01, post № 51

games, programming, Pygame, Python, #arcade, #arcade game, #Atari, #break, #break blocks, #breaking, #breaking blocks, #com, #computer play, #game, #games

Continuing with my arcade game replicas, I programmed Breakout.
This version is fairly simple. Your lives will be displayed at the lower right corner, your points in the screen’s caption. There also is a computer implementation, which — as in Jong — cannot lose.

Usage

  • Left arrow key moves the hitter to the left,
  • Right arrow key moves the hitter to the right,
  • ‘Space’ toggles computer play.
jeakout-1.png
jeakout-2.png
jeakout-3.png
Source code: jeakout.py

Bobble Throw

2015-07-26, post № 50

programming, Pygame, Python, #active, #art, #background, #black, #blue, #bobble, #bobbles, #bounce off, #colors, #mouse, #mouse control, #movement, #moving

Playing around with circles and colors, I came up with this good-looking program. If active, 𝟨𝟢 bobbles per second will spawn at your cursor position. They will bounce off the four edges of your screen, start fading towards black and eventually go away completely.

Controls

  • ‘Space’ toggles whether or not the bobbles are moving.
bobble-throw-2.png
bobble-throw-3.png
bobble-throw-1.png
Source code: bobble-throw.py

Menger Sponge

2015-07-25, post № 49

programming, Pygame, Python, #black, #blue, #divide, #endless, #fractal, #infinite, #sponge

Normally, the Menger Sponge is a three-dimensional cuboid. This program works in a two-dimensional space, so it only shows one side of the sponge.
Because a computer has its capacities, I capped the maximum square count to 𝟣𝟢𝟢𝟢𝟢. After that maximum, the face will not be complete.

Controls

  • ‘Space’ divides every square once again.
menger-sponge-1.png
menger-sponge-2.png
menger-sponge-3.png
menger-sponge-4.png
menger-sponge-5.png
Source code: menger-sponge.py
Jonathan Frech's blog; built 2021/04/16 21:21:49 CEST