CollideBlocks

they bounce around

This is a very simple example which imports the colored blocks from blocks.py and gives them each a box shape for collision.

There is also a keyboard and window controller demonstrated with support for wireframe mode (w key), fullscreen mode (f key), light changing with the [ and ] keys, and the ability to move the white block with cursor keys plus PageUp and PageDown. Esc, Q, or clicking the window's close button should Quit the example.

Lastly, a Canvas widget displays the Camera's .fps (Frames/Second?) in the upper left. This will vary widely based on your video card, number of cores, and how optimized the code is.

Note there's some kludge in the example which is being removed as more features are supported.

Source: CollideBlocks.py

Attachments