title: Bouncy Balls
thumbnail-image-url: http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:QADTIN4LBIRR2JWXDCBCZKVI3EV3IJHA.7AVESJATYSCF35BWHN2NV5WRC5T5WCPXLRKGVCY/balls2.png
date: 2016-04-27

Bouncy Balls - 2016-04-27 - Entry 9 - TOGoS's Project Log

Bounce some balls around while you're here!

Use the arrow keys or WASD (or tilt your phone, though my browser gives me warnings about using 'devicemotion' events from non-secure pages, so maybe it will stop working at some point) to direct gravity. The screen will follow the red ball. The blue balls are not affected by gravity.

Physics calculations are pretty terrible because that's not the point. The point was to put something on your screen that moves. With a little bit of effort you can get your balls stuck in the wall.

Alternatively, try zooming really fast down the infinite looping hallway.

The world is broken up into two 'rooms' that can be connected in much more complex ways than is illustrated here. Each room contains a list of objects with no structure to accellerate collision detection between root objects. The walls are a 3D regularly subdivided tree (the foreground having depth = 1m, which is why it comes across as flat).

Graphics are generated using shape sheets.