• Bug Catcher

    This is my first attempt at writing one game a month. It’s a turn-based dungeon crawler in the style of traditional roguelikes. All the characters in the game are bugs. Each bug has an ability and combat stats. You can “channel” a bug and gain access to its ability and stats.

    Play in browser

    screenshot

    Read more...
  • Visible Area Detection with Recursive Shadowcast

    Most games employ some form of visible area detection to simulate the fact that opaque objects obscure one’s view of whatever is behind them. Recursive Shadowcast is one of a handful of algorithms that compute visible area in worlds represented by 2D grids. This makes it suitable for use in roguelikes. This post will explain the recursive shadowcast algorithm.

    Read more...
  • Cellular Automata Cave Generation

    A cellular automata is a collection of cells whose states change over time based on the states of adjacent cells. They can be used to produce natural-looking patterns, such as the cave in the picture below.

    Caverns

    Read more...
  • 2D Phong Illumination in WebGL

    Suppose you’re rendering an uneven surface like a cobblestone floor, water or grass. You could just draw the details on a flat image by hand. This might look great from one particular angle, but if the player is moving around, the flatness of the image may be quickly exposed. This is exacerbated by the presence of lights, which will illuminate the surface as if it had just been painted on (which it sort of has been).

    Read more...