platforming test thing


ur browser dosen't support the canvas element lmao.



very cool commands








description

Here's a test game of a platformer I made in javascript. It runs at 50 fps. I'm gonna go over how it works now.

The walls in the game aren't objects, they're indexes of an array called "walls". They can either be set to "0" meaning they don't exist or "1" meaning they do. Collision works by converting each point of the player rectangle into an index of the wall array and checking whether or not it's equal to "0" aka free space.

I added the "very cool commands" section to make the test project more interesting to look at before I finally stopped working on it. I could have spent that time learning how to detect keyboard input instead of using buttons but shut up.