Inspiration

I was inspired by moving-sand sculptures (frames with sand in water that change appearance when rotated), and falling-sand physics in games like Noita.

What it does

The Sandbox is an environment in which users can draw using sand, which falls towards the ground and organizes itself into piles. The sand can be moved, flipped around, or obstructed using fixed bodies to construct anything from sand dunes to hourglasses to color gradients.

How I built it

I built the Sandbox using OpenFL, an open-source port of the Flash API written in Haxe. This was the only library I used—everything else from the logic to the UI was created by myself.

Challenges I ran into

During the development of the Sandbox, I tried my best to keep the code extensible—this meant that the code required a lot of refactoring both to extend its functionality and to optimize the performance. Tracking and rendering changes in 120,000 pixels each frame is no easy feat.

Accomplishments that I'm proud of

Out of all the interfaces I've designed, I have to say that this is the one that I think looks the best. In addition to this being the first project that I've published using OpenFL, I'm proud to have created my first cross-platform app (running both natively on the OS and in the browser with identical functionality).

What I learned

With the dozens of class files I used to make this project, I found that it taught me how to better organize object-oriented code, especially with respect to managing state and keeping track of user interaction.

What's next for The Sandbox

In the future, I might try to add more types of materials, like water or smoke.

Built With

  • haxe
  • openfl
Share this project:

Updates

Submission history