• 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...
  • Post Mortem of an Abandoned Game

    I spent about 6 months of 2014 working in my spare time on what I hoped would become a top-down side-scrolling action-rpg. I’d just started playing Dark Souls, and wanted to emulate its art style and combat, but in 2D.

    Read more...