Raycaster
Moderator: PC Supremacists
- wtetzner
- Chaos Rift Regular
- Posts: 159
- Joined: Wed Feb 18, 2009 6:43 pm
- Current Project: waterbear, GBA game + editor
- Favorite Gaming Platforms: Game Boy Advance
- Programming Language of Choice: OCaml
- Location: TX
- Contact:
Raycaster
So I wrote a raycaster a while back (in April I think) and rediscovered it while digging through my unfinished projects.
I intend to turn it into an actual game at some point, but for now all you can do is walk around.
It's written in C++, and uses SDL for drawing and input.
The main thing still missing from the rendering engine is the ability to draw sprites.
Anyway, I thought I'd make a YouTube video of the raycaster in action and show it off.
So, here it is:
http://www.youtube.com/watch?v=LYci8S1Mdsc
Oh, and since the video isn't the best quality, here's a screenshot:
I intend to turn it into an actual game at some point, but for now all you can do is walk around.
It's written in C++, and uses SDL for drawing and input.
The main thing still missing from the rendering engine is the ability to draw sprites.
Anyway, I thought I'd make a YouTube video of the raycaster in action and show it off.
So, here it is:
http://www.youtube.com/watch?v=LYci8S1Mdsc
Oh, and since the video isn't the best quality, here's a screenshot:
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
-
- Chaos Rift Newbie
- Posts: 10
- Joined: Wed Nov 25, 2009 10:05 pm
Re: Raycaster
thats really tight. What exactly is a "Raycaster"?
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Raycaster
You stole the words out of my mouth.jaymonster138 wrote: What exactly is a "Raycaster"?
Edit: I think he was demonstrating hidden surface removal, but since the surfaces were hidden to begin with you see no visual differences, only performance gain.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: Raycaster
Ray Castingjaymonster138 wrote:What exactly is a "Raycaster"?
Games that used it: Doom, Wolfenstein 3D, lots of others too.
Example of a very small ray caster in C with Allegro.
-
- Chaos Rift Newbie
- Posts: 10
- Joined: Wed Nov 25, 2009 10:05 pm
Re: Raycaster
So does the program recognize which way you are looking and decides to build where your looking? or am I way off? Whats the point of tracing the rays?
Re: Raycaster
Here you go:
'Doom' 3D Engine techniques. This explains it briefly.
This one is mentioned in the other link as having a much more detailed explanation of raycasters.
acksrc.zip
'Doom' 3D Engine techniques. This explains it briefly.
This one is mentioned in the other link as having a much more detailed explanation of raycasters.
acksrc.zip
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Raycaster
Note that he's using SDL for drawing. That's pretty damn badass. Very impressive, sir.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Raycaster
Wtf.. how? Looks like OGL.GyroVorbis wrote:Note that he's using SDL for drawing. That's pretty damn badass. Very impressive, sir.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: Raycaster
Exactly.XianForce wrote:So basically it takes a 2D map, and like... makes it appear 3D?
Just like this.
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: Raycaster
Maybe you guys should stop commenting like this if you don't know what it is. He's not using OpenGL or any pre-set 3d calculation, he's made a raycaster which draws the screen by the pixels, using "rays" to work out the size and texture splicing of the walls that the player can see. There's a good tutorial on it on Gamedev.net.
And yeah this is awesome, you should totally go for a full-on Doom style FPS game with this.
And yeah this is awesome, you should totally go for a full-on Doom style FPS game with this.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Raycaster
Gentlemen, don't you remember playing Doom 95 and Wolfenstein 3D on Windows 3.1 and Windows 95 before dedicated 3D cards were even invented?
Ever wondered how in the fuck Doom was ported to the Super Nintendo? Wonder no more.
Ever wondered how in the fuck Doom was ported to the Super Nintendo? Wonder no more.