Ball in a Box

Ball in a Box is a desktop toy where you have a ball in a box that you can interact with by moving the box around. Read more about the games features on its itch.io page!

Ball cutout

Ball cutout
Ball cutout
itch.iogithub

Credits

  • The game library used for this game is my own fork of Macroquad which adds certain features needed for Ball in a Box to work.
  • The default font this game uses is Fredericka The Great.
  • Thanks to jumbledFox for letting me use some of their code for this project!
  • The rest of the assets and programming was done by me.

Tools & Technologies

  • Programming languages
    Ball in a Box is written in Rust. I also used GLSL for writing custom shaders and materials for the ball and its shadows.

    Languages that were less used include Python, which was used to apply an effect to the ball textures to make them appear more round, and JavaScript to make the additional features added to my Macroquad fork work on the web.

  • Operating System APIs
    Ball in a Box needed certain features to make it work the way I imagined, which Macroquad did not have.

    I needed to use the Windows API and the X11 API on Linux to add the following features:

    • Getting the mouse screen position (Not window position)
    • Borderless windows
    • Force spawning the window at center of the screen
  • Assets
    For the assets I made myself, I took pictures of cardboard I had laying around and adjusted the colors in Krita. I also used Krita to draw the textures for the balls.

    I used Audacity to process the ball bounce sounds, mainly just to remove the background noise in the recordings.