|
-
Oct 25th, 2002, 06:58 PM
#1
Thread Starter
New Member
Problem with my engine
I'm new at VB Direct3D programming, and too learn it thoroughly I'm trying to create a series of short games from the simplist of 3d engines (wolfenstein 3d-like) to the more advanced engines used today. I'm currently working on the wolfenstein 3D-like engine. though it works nothing like the wolf 3d engine did, it resembles it in appearence. I'm having a problem with this engine.
The problem occurs when viewing the map from the opposite direction that the camera starts in. Everything looks ok at first, but when you walk through the map and turn around to look at the out wall, you can see the very back wall drawn over top of the nearer wall. Here are some screenshots to illusrate.
wall1
wall2
I believe I know why this is happening. I'm pretty certain it's because of the way I'm drawing the map. The game engine scans the map array, and if the face that it's scanning is open to the room, it will draw that face, and continue through the rest of the array, Whats happening (I think) is that it looks ok when view from one end because the wall in the back is drawn first and the front wall is drawn over top of it, on the other side though, the wall in the front is drawn first and the wall in the back is then drawn over top of it because the order it draws the faces in never changes.
Does anyone have any suggestions on how to fix this problem? Or at least point me somewhere I could get help.
thanks
-
Oct 25th, 2002, 07:02 PM
#2
Good Ol' Platypus
Search the topic of Z-buffering or Z testing. It looks like thats what you need...
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|