https://github.com/DoubleBrackets/DesktopPlatformer
About#
Page is under construction!
A platformer game I developed for my AP Computer Science class final project in high school. Your computer desktop itself is the game level!
The colors of each pixel on your screen form each level’s environment.
- Red kills both you and any enemies
- Green “Boosts” you by acting as a multiplier on the current velocity
- Any other color “gradients” turn into one-way platforms
Role: Solo developer
Programming#
The game was programmed entirely in Java, using standard libraries, hence why there’s no easy to download playable yet. I still need to dig through the old code someday, but the core flow was that each game loop:
- The game takes a screenshot of the ENTIRE screen (using the
Robot
library) - The entire image pixel array is looped through and converted into hitboxes, with the various effects (this was done entirely on the CPU, so I avoided performance hits by having a pretty large stride)
- Color differences along the verticals create platform hitboxes
- Colors within a certain distance from red (using RGB values) are turned into kill hitboxes
- Colors within a certain distance from green (using RGB values) are turned into boost hitboxes
- A basic 2D player controller and enemy AI update