Skip to main content
GameDev.net gamedev.net
🔒 Locked

3d ray casting game

Started by Tigerman Feb 15, 2000 at 7:01 AM 6 replies 1.1k views
Original Post
Tigerman
Tigerman
I want to make a 3d ray casting engine. I am not very expirienced, but i have already created a !!tic tac toe!! game.
Spellbound
Spellbound
Raycasting is an interesting technique to use for engines, it makes it a lot easier to make realistic environments as you can discard the notion of polygons and go for volumes or voxels instead. One day this will be tried in a realtime game, but today''s hardware has nowhere near the horsepower needed to do it at interactive framerates, unless you go for extremely simple environments.

You probably should put that idea to the side until you feel that hardware can handle it. Until then, I suggest you stick with a little more traditional techniques.

LordFoul
LordFoul

I think Spellbound is referring to ray-tracing.

Ray-casting is a "dumbed-down" version of ray-tracing
so that it''s fast enough to run on modern processors.
Wolfenstein3D and Doom both used raycasting methods.

There are plenty of web resources for how to create
a raycasting engine. There are also numerous texts
available - Gardens of Imagination by Christopher Lampton
is probably the best written, and Tricks of the Game
Programming Gurus (the original one) by Andre LaMothe
also covers it, but both of those deal with coding for
DOS platforms.

Spellbound
Spellbound
Actually I was referring to ray casting and not ray tracing. And yes Doom and games like do use ray casting for their engines, however they only do at one scanline of the screen which is why they can get the speed needed.

If you want a true three dimensional engine you must cast a ray for each pixel on the screen, and this ray cannot be limited to a 2D plane as it is in Doom. This is why it wouldn''t be feasible to do at interactive speed with today''s computers.

Ray tracing is even worse as you start the rays at the lightsources instead, in this case you''ll make a lot of useless work since not all rays hit the screen and just dissipates into the void.
Tigerman
Tigerman
Yes, I already tried one tutorial, but it didn''t work. And I also know differences between ray castings. I just want to make as simple engnie as it can be. I want to make a Wolfenstain like 3d engine.
FalloutBoy
FalloutBoy
There''s a book called Tricks of the Game Programming Gurus that describes how to make a ray-casting engine like Wolf 3D.
Mike Weldon, a.k.a. FalloutBoymweldon@san.rr.com
Spellbound
Spellbound
I'm not sure it would be simpler to do a Doom-style engine than a real 3D engine. I both cases you need to know your math, albeit with Doom-style you cripple it to '2.5D' but you can do that with polygons as well.

In a ray-casting engine you need to implement the raycasting and texturemapping (come in the same package). Although it isn't very hard to do, at least with the help of tutorials or books, I think it would be easier to draw a polygon with an API.

Of course if you want to do a software engine, then it is much easier to get a Doom-style engine up to acceptable speed, than it is with a fullblown 3D engine.

This is just my thoughts.

Take a look at NeHe's OpenGL Tutorials, there is one on loading game levels. I think you can expand this into a real 3D engine, if you wish. Lesson 10 was the one I was thinking about.



Edited by - Spellbound on 2/18/00 5:22:23 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.