I started coding this game after stumbling upon Luke Wren's and Francis Racicot's (Pac0master) Ship Sandbox. After becoming fascinated by it, I forked Luke's GitHub repo and started playing with the source code. After less than a year I had been making a few major changes to the original codebase:

  • Completely rewritten physics layer, making simulation more grounded in reality
  • Completely rewritten data structures to maximize data locality
  • Rewritten dynamics integration step to make full use of packed SSE floating point instructions on Intel x86
  • Restructured interactions between the UI and the game, splitting settings between physics-related settings and render-related settings
  • Rearchitected lifetime management of elements - originally elements were removed from vectors while these are being iterated, and the entire "points-to" graph was a tad too complex
  • Completely rewritten the graphics layer, targeting OpenGL 2.0 "core profile" (i.e. no compatibility API) with custom shaders and texture mapping
  • Added sounds and cued music
  • Added lights that are powered by generators connected by cables, and flicker and turn off when the circuit is interrupted
  • Added bombs
  • Added connected component detection, used to correctly draw ship break-away parts on top of each other, among other things
  • Upgraded to C++17
  • Added ephemeral particles for debris when parts break, sparkles when metal is sliced, and bubbles when water enters the ship
  • Implemented shallow water equations for interactive waves

…all of this while improving the game's FPS rate from 7 to 30 (on my 2009 laptop!)

After a while I realized that I had rewritten all of the original code, and that my new project was thus worthy of a new name and a new source code repository. Floating Sandbox was born, and the journey to a rich and interactive physics simulator had just started!