Archived

This topic is now archived and is closed to further replies.

RegularKid

Doors?

Recommended Posts

RegularKid    139
Hi. I''m currently writing a very simple raycasting engine (like wolfenstien 3d). I know how to draw the walls and sprites and stuff, however I am stuck on how to do the doors. Any suggestions? Thanks!

Share this post


Link to post
Share on other sites
RegularKid    139
*bump*

I''m curious as to how they are represented (sprites, or part of the level map data), how they get drawn (so you can see through part of it as its opening), how you detect for collision with them, etc. I have a few ideas on how to do this, but I would like to get some input and suggestions before I go and impelement it. Thanks!

Share this post


Link to post
Share on other sites
duhroach    225
I don''t know alot about the engine itself, but the process of doors should be like any other item in the engine.

Keep a seperate structure which just defines the location of doors. Every frame or so, check the player''s distance to a door. If he''s close enough to open one, then play an animation.

As for hit collision, it''s no different than any other 3d object, just include it in the hit collision of the rest of the world.

hope that helps

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You could check out wolf3d''s source code to see how they did it. (open source now!)

Share this post


Link to post
Share on other sites
RegularKid    139
Thanks, I thought I would need another separate structure for the doors, I just wanted some input first. Thanks. I will definetly check out Wolfenstien''s code.

Share this post


Link to post
Share on other sites