Spherical Racing Game Prototype - Level Editor
20 Mar 2014This is a video walkthrough of the level editor. The UI needs work, but most of the major features are in place.
There are five main sections:
- Track: The racetrack is drawn directly on the sphere by pressing and dragging. A maximum turning angle can be used to ensure that turns in the track appear smooth.
- Shape: The vertices of the planet's mesh can be extruded away from or towards the sphere center to create variations in its topology.
- Texture: Images can be burned into the planet's texture, essentially by mapping image pixels to texels using raycasting. The algorithm runs on multiple threads. The texture can also be color-filled using three independent colors to create a continuous gradient around the sphere.
- Structures: 3D model obstacles can placed on or around the planet. They're treated as oriented bounding boxes for the collision detection.
- Preview: The user can jump in and out of preview mode to test out the level at any point.
Note on the video capture: To work around the choppiness that can result from doing video capture via AirPlay, I actually halved the framerate of the application and doubled the playback rate in the video encode. :)