hp
toc

Bobbles

2015-04-08, post № 14

programming, Pygame, Python, #blue, #change, #changing, #circle, #color, #different, #different colors, #entity, #experiment, #fill, #generates, #generator, #movement, #refill, #spawn, #spawn in, #spawn time, #spawning

In this program you can spawn in circular entities. Their color is defined by their position and they will move randomly across the screen. You can also toggle if their spawn time (in ticks) is shown or not and if the screen gets refilled.

Usage

  • Left-clicking spawns in a new entity (at current mouse position),
  • ‘f’ toggles if the screen gets refilled (view example number 3 for reference),
  • ‘n’ toggles if numbers are shown.
bobbles-1.png
bobbles-2.png
bobbles-3.png
Source code: bobbles.py
Jonathan Frech's blog; built 2024/08/31 22:59:44 CEST