Archived

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

Doors?

This topic is 5435 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
*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
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
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