2007
09.17

Sewers… again

I have a basic version of the sewer generator working. It uses the BSP tree algorithm described below and give acceptable results for now. Now I have to add doors, lighting, creatures, items … the usual roguelike developer stuff…

This is the sewers first level. It has clean geometrics shapes and lighting in good overall condition (not yet represented on this screenshot). Lower levels will be darker and have more twisted back alley and organic shapes.

I also had to add a small fix to the visibility algorithm to remove artifacts appearing when the ray was casted almost parallel to a wall. Check the same dungeon zone on the following screenshot. On the upper screenshot, some cells on the wall are hidden whereas they should be visible. This has been fixed as seen on the lower screenshot. I’ll probably post an article on the whole visibility algorithm one of these days…

2 comments so far

Add Your Comment
  1. The shapes are definitely different from the ones used in typical dungeons; since it’s a sewer, I think it’s more than appropriate! Is the code much different from the one you posted before? About the visibility algorithm, if the method you’re using is more interesting than the trivial one, I’d like to take a peek. Keep it up 🙂

  2. For the dungeon generation, I strictly use the algorithm described on the web site. The only difference is that I add corridors under each street of the city and a room under each place of the city. The intersection of the two maps (bsp and city) can produce unusual shapes.

    For the visibility, I’ve read lots of things on dungeon dweller, but I finally found a trivial trick to fix artifacts. I can’t assure now that it’s bulletproof but for the time being, it gives good results. In brief, after the ray casting phase, I flag as visible each wall that stand in front of a visible ground cell.