Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Wagi

Front to back BSP coding experiment

Recommended Posts

Greetings. I thought you fellow Doom fans may find this mildly entertaining. There was a thread on this forum a while back with an example video explaining how front-to-back BSP works and I applied this newfound knowledge by making a program that demonstrates it with a slight twist --- the sectors have no fixed location in space and only exist in relation to one another by linking them together by their lines.

This allows you to create impossible constructs, such as infinitely descending/ascending staircases, multiple locations that seem to occupy the same physical space, and Pacman-style hallways that will lead to the opposite side of a room.

Right now the code is a little messy and there's no texture mapping or anything like that, but there is a pretty simple text-based map format in case you want to play around with it. The source code, as well as a pre-built Windows executable, can be found in this zip file. It is written in D and can be built using DUB. Just click and drag the *.map files on top of escherland.exe in order to run the program.

  • WASD moves you around.
  • Right click/left click moves you up and down
  • Escape quits
  • Pressing X will toggle a red/blue 3D mode in case you have some glasses lying around.

Share this post


Link to post

Nice. Maybe it's actually a Portal renderer that has nothing in common with BSP, though. I've briefly looked into the code of initializing sectors/links and rendering them, and I couldn't find anything that would resemble node tree structure.

Share this post


Link to post

Me too, then I've Googled, downloaded and placed the .dll into the folder, and problem was fixed and the game would run fine.

Share this post


Link to post

I was lucky enough to still have ZDL around, which required the same DLL, so I just copied it from there.

Pretty neat, these portal renderers have always fascinated me. I'm looking forward to seeing if anything grand comes of this.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×