Archive | Tutorial
06
Feb

Efficient Instant-Insertion Quadtrees

Overview This tutorial will present an efficient implementation of quadtrees.  It is expected that you have at least a basic understanding of what quadtrees are and do, and if not you can read about them here: http://en.wikipedia.org/wiki/Quadtree Although they improve performance in algorithms related to searching for visible objects or in detecting collisions for physics, quadtrees [...]

Continue Reading →
20
May

Making Buildings from .MAP Files Part 2

Overview This is part 2 of my series on loading buildings/interiors/maps from Valve Hammer Editor .MAP files.  Part 1 can be found here.  The purpose of this tutorial is ultimately to generate a convex solid-leaf BSP tree in which each leaf contains at least part of a room.  Generating convex sets of polygons is the first [...]

Continue Reading →
14
May

Making Buildings from .MAP Files Part 1

Overview Valve Hammer Editor is a pretty common tool for making buildings and structures for games these days, and in some cases entire levels.  It exports .MAP files containing solids, called “brushes”, which make up the solid areas of the building/structure/map.  There are a few tools that can convert these to .BSP files for use [...]

Continue Reading →
31
Mar

Fixed-Time-Step Implementation

Overview There are many topics covering the concept behind fixing your time step.  Last time I read them was many years ago and having just re-read them I just realized they already cover about 50% of what I planned to cover, but while they do give implementations and explain certain concepts fairly well, people still [...]

Continue Reading →
11
Mar

Passing Data Between Game States

Overview I mentioned in the previous article that passing data between game states is easy enough, and a many readers wanted to know how this could be done.  So by popular demand I will provide 2 methods for how this can be done.  I will also go into more detail on how state changes are [...]

Continue Reading →
03
Mar

General Game/Engine Structure

Overview The subject of how one should organize a game has been appearing a lot lately.  Mainly these questions are focused on how to organize all the different parts of the game, such as the menu, the gameplay area, the bonus rounds, the story screens, etc. The most common proposal I see are switch cases [...]

Continue Reading →
18
Oct

Tutorial: Tightly Culling Shadow Casters for Directional Lights (Part 2)

Continued… In the previous tutorial we came to the conclusion that the below image highlights the planes we want to pull towards ourselves, assuming we are the light source. Representing planes in 2D is not easy, but imagine each black line segment represents a plane that is coming from our eyes and is rotated along [...]

Continue Reading →
17
Oct

Tutorial: Tightly Culling Shadow Casters for Directional Lights (Part 1)

Overview Let’s start with a directional light.  It casts shadows all over the scene.  Since it is a directional light, it has infinite range and thus casts shadows everywhere.  If we stretched a shadow map over the entire world, the shadow resolution would simply not be sufficient.  We only want to casts shadows that the [...]

Continue Reading →