Better to try it on ShaderToy site: https://www.shadertoy.com/view/wXXXWn

Created for the Lusofona University's April Game Creator Club, with theme Shaders.

I decided to try to make a game only using shaders, using ShaderToy (or else the temptation to go with compute shaders and more complex architectures would be too much).

In this game, you can control a character using WASD, and shoot left-clicking the mouse. 

Enemies spawn periodically around the player, and when killed they drop health pellets. Survive as long as possible.

Tech stuff:

  • Building a game with just pixel shaders is a tough challenge.
  • Fake 2D with sorting using a display list that gets ordered with time (so it might take a bit for the character to get in front or back of another character) - Buffer C
  • Buffer B does all the collision detection and can be queried from other places
  • Buffer A has the actual game logic, state variables, etc
  • Image buffer uses a mix of signed distance fields and naive rendering to get the final image
  • Background is a solid color with some white noise, and the screen is divided in sectors, and each sector has 3 blades of grass randomly defined.

Leave a comment

Log in with itch.io to leave a comment.