This page contains small tech demos with source code and MINGW makefile. You might have to tweak the source code to make it work with the latest libtcod

Frost effect


  • Frost effect, nice for a freezing spell
“Radiosity” engine


  • Simple light diffusion using some sort of radiosity algorithm
  • Not fast, not clean code… To be improved
Procedural portraits


  • 5 templates (male and female kid, male and female adult, male elder)
  • Customizable complexion, eye nose and mouth position
  • Emotion (based on different eyebrows, eyes and mouth, only available for kids templates)
  • Directional pupil (kids)
  • Several clothes, ornament and marks (adult female)
  • Pure 100% cheesy developer artwork !
Weather + Day/Night


  • Cloud layer
  • Varying wind speed and direction
  • Rain
  • Lightnings
  • Day/Night cycle
Tile engine


  • Unlimited number of layers
  • Shadows using the PNG’s alpha channel
  • Smooth ground type transition
Water ripples


  • Ripple framerate independant of the game framerate (to lower the CPU consumption)
  • Cheap refraction effect
World generator


  • Fast (< 1 sec for a 400×400 map)
  • Heightmap, precipitation map, latitude-dependant temperature map, biome map
  • Rain erosion
  • Rapidely Exploring Random Tree rivers
Gas simulation


  • Fast approximation of Navier-Stokes equations

2 comments so far

Add Your Comment
  1. I love the illumination you get with the photon engine you wrote.

    Have you got any details on the algorithm?

  2. It’s a simplified version of radiosity: each dungeon cell compute its incoming light by adding the light coming from every other dungeon cell scaled by the form factor between the two cells. once you’ve done this for all cells, you iterate a few times. on the first iteration, all the cells are completely dark and only lights emit light(!). on next iteration, cells start to behave like lights too. more iterations make the light diffuse on cells that are not directly hit by a light.