Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm curious as to how games like Prelude of the chambered handle graphics. If you play for a bit you will see what I mean. It made me wonder how it works. (it is open-source so you can get the source on this page) I did find a few tutorials, but I couldn't understand some of it, though it did help with some things. However, I don't like using code that I don't understand. Does anyone know of any good tutorials for this kind of 2.5D? Any help is appreciated.

share|improve this question

closed as off-topic by Josh Petrie Jan 29 '14 at 1:05

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Have you taken a look at the orginal 'Doom' source code? It uses a similar technique. – Vaughan Hilts Jul 28 '12 at 23:16
@Vaughan Isn't doom a ray caster? I don't think the game I linked is a ray caster. I don't know where I could get the code anyway. And I probably wouldn't understand it either. – Aidan Mueller Jul 28 '12 at 23:33
It -is- a Raycaster, but it does achieve a similar effect to what you want. I added it as a comment simply because it might be something you'd like to look at. However, I've added an answer below that might help some more. – Vaughan Hilts Jul 28 '12 at 23:42
Great question +1 for helping clear this issue up – zehelvion Sep 27 '12 at 8:33
This question appears to be off-topic because it is about asking for a list of resources. – Josh Petrie Jan 29 '14 at 1:05
up vote 4 down vote accepted

Best tutorial on raycasting i could find when i was researching the topic a couple years back. It's pure theory, no programming. Other than that i suggest you read about the Doom engine and the Build engine. Reading the source code is IMHO far too time consuming (it's pure C and ASM, plus plenty of irrelevant technology quirks) if you just want to understand raycasting. Reading ABOUT the engines however can give you ideas on how to solve advanced issues like doors (as funny as that sounds), check the wiki first.

Here's a great code review by Fabien Sanglard:

share|improve this answer

Here's a very detailed tutorial: Creating pseudo 3D games with HTML 5 canvas and raycasting. The key search term is "pseudo 3d game."

enter image description here enter image description here

Also I posted the text of the tutorials scgrn mentioned. (I think I read these a long time ago. I remember the ASCII diagrams!)

share|improve this answer

There are a couple of (very) old tutorials on Wolfenstein-style raycasting written by Peroxide. Search for "" and "". The code is written in Pascal but the concepts are explained very well.

share|improve this answer
Links would be nice, otherwise searching for these files will most probably show Stack Exchange and other programming sites in future. That's what I found: ,… – Markus von Broady Oct 14 '12 at 14:31

I'm not sure on the specifics, but I got a few ideas just by browsing through the source-code of the game @

Maybe you can find some things there that will help you.

EDIT: I noticed you had linked to the page, but I meant to specifically link to this file:

share|improve this answer
I've already seen that file but I don't get it! I just need an understandable resource which explains this. Thanks for trying though. And if you do find something please let me know :) – Aidan Mueller Jul 29 '12 at 0:41

I'm currently following the tutorial by Lode Vandevenne: Note that this is only part 1 (basic raycasting and textured walls). Part 2 (ceiling and floor textures) and 3 (sprites) can be found by clicking the link "Back to Index".

I think it's great. It contains everything I needed to make my own engine. The tutorial is based on C++, but the concepts are described so well that translation to any language is easy. I'm coding in Java myself.

(I'm doing the vector calculus it a little differently than Lode, however. I'm using 2-element arrays to represent vectors, and a class of static (void) methods to manipulate them, as is done in this more advanced 3D raytracing tutorial by Michael Birken: (also brilliant))

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.