DOOMY a tiny FPS in 1024 bytes

DOOMY, a tiny first person shooter in 1024 bytes, with collision detection, arbitrary walls, texture w. fog, sound effects, a couple of baddies and a death screen ???
Controls & Goal
Move around with the Left, Right and Up arrow keys. Shoot with X or C.
You start with 10 health points, and need to shoot as many baddies until they get you good!
Inspiration
Seeing great and cute entries closing Pico-1k jam was inspiring. That's when I got an idea: 'all things SSPR' to balance this cuteness with DOOMY pointless violence and big pixels.
Technical details
In a nutshell DOOMY is a rotozoom (the effect you get when rotating and zooming an image) laid down flat and rendered with scaled sprites.
Setup
The textures, sprites, and the base of the level are rendered as a group of rectfill and text in the first 3 lines of code, with first two textures of 8x8 for the walls, then 2 baddies, and finally the base of the level.
In the following 4 lines, the base of the level is expanded and some diagonal walls are added.
Every 'thing' in DOOMY goes in the ▥ object which contains the x,y,t,w properties for the x,y position of the thing, it's texture index t and width w (nil or 1 for walls, 8 for the baddies)
Game loop
In the game loop the things in ▥ are rotated and moved into another object, ?, if they are in the visibility fustrum. The baddies move erratically towards the player.
The things in ? are then sorted and rendered back to front, if one of these thing is large, it means it's a baddy and we render a shadow with an ovalfill
Collisions and baddies hit
For the collision detection, we check the distance of the last thing we drew. Blocking the way forward if it's very close.
We check the color of the pixel under the crosshair to know if it's a baddy. If you shoot we play a noise, increase the score and respawn it at a random location. Otherwise there is a 10% chance it will shoot you with a red flash and s



Close
Connection Error!

Please check your connection and try again.