OK, let’s finish up this year and this series. We have an algorithm that can compute what cells in the zero octant are in view to a viewer at the origin when given a function that determines whether a given cell is opaque or transparent. It marks the visible points by calling an action with…

# Tag: shadowcasting

## Shadowcasting in C#, Part Five

I hope you all had a pleasant Christmas and Boxing Day; we chose to not travel to see family this year and had a delightful time visiting friends. We’ll finish up 2011 here with a bit more on shadowcasting, and then pick up with more C# language design facts and opinions in January. OK, so…

## Shadowcasting in C#, Part Four

Last time we saw how many different ways there were to get the calculation of the top cell based on the top vector wrong. Today we’ll take a briefer look at determining the bottom cell. We know from our discussion of last time that the right way to determine what is the top-most visible cell…

## Shadowcasting in C#, Part Three

Before we get started, thanks for all the great comments to the previous couple of posts. I’ll be updating the algorithm to try to make even better-looking circles of light based on the comments. Like I said, there’s a lot of subtleties to these algorithms and I am just learning about them myself. To that…

## Shadowcasting in C#, Part Two

I hope the basic idea of the shadow casting algorithm is now clear. Let’s start to implement the thing. There are two main concerns to deal with. The easy one is “what should the interface to the computation look like?” The second is “how to implement it?” Let’s deal with the easy one first; let’s…

## Shadowcasting in C#, Part One

I’ve always loved the “roguelike” games; perhaps you’ve played some of them. Those are the games where you get a top-down view of a tile-based world, and have as much real time as you like to make a choice of action. The canonical plot is to enter a dungeon, get to the bottom, retrieve the…