| Author |
Message |
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Sep 23, 2010 07:14 Post subject: Rendering and Gameplay – The Pure Renderer |
|
|
I've put up a blog post which talks about my plans to quickly get past the remaining rendering issues and get to finishing the gameplay. I'm planning on getting a new build out this week using a partial implementation of the Pure Renderer, see the post for more details.
_________________ DarkXL....http://darkxl.wordpress.com |
|
Marley Gamorrean
Joined: 30 Sep 2003
|
Posted: Sep 24, 2010 17:47 Post subject: |
|
|
Lol, I read that as pure reindeer to much amusement. Excellent new 
_________________ *ZaP* |
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Sep 25, 2010 09:17 Post subject: |
|
|
I'm nearly done with the renderer changes. The changes to the perspective camera have been changed. The visibility algorithm is nearly complete. I'm hoping to get a build out this weekend.
What has to be done:
1) Finish visibility algorithm. This will give exact visibility with no overdraw. It will support sectors of any concave shape as long as they don't overlap themselves. Overlapping via adjoins works perfectly (Perplexion will be fine for example) though. Tessellation errors should also disappear since the tessellation is now dynamic and is built via the no-overdraw clipping.
2) Fix sky scrolling, due to the change in perspective.
3) Fix recticle aiming due to the change in perspective.
4) Fix the collision using a newer, simpler algorithm made possible by more robust point in polygon tests. [ Which I worked out in another project recently. ]
So the new build will fix the various rendering issues - including handling all the overlapping cases. It will fix the collision woes such as getting stuck on adjoins. In addition overdraw will be eliminated and performance should be improved.
After this I'm going to focus on the gameplay - getting the missing logics and INF functions implemented.
_________________ DarkXL....http://darkxl.wordpress.com |
|
Gez Gamorrean
Joined: 05 May 2008
|
Posted: Sep 25, 2010 15:22 Post subject: |
|
|
I'm eager to see a new build. Is that "pure renderer" the name of the OpenGL renderer you've been working on recently?
|
|
Barry Brien Dark Trooper Phase 1
Joined: 26 Sep 2003
|
Posted: Sep 25, 2010 15:54 Post subject: |
|
|
Looking forward to it Lucius
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Sep 26, 2010 22:35 Post subject: |
|
|
Here are some wireframe screenshots showing the culling/clipping in action. These only show the sector that you are currently in at the moment. Note these are just plain wireframe, is not rendering any solid polygons:
This screenshot is in the room with the large circular object in the center, near the beginning of SecBase (before you go out the first door).
This screenshot is in Talay, showing a concave sector with lots of pillars.
Notice that there is no sector overdraw, but objects such as enemies still use the z-buffer for visibility.
Once the renderer is done, you could probably play the game in wireframe now. 
_________________ DarkXL....http://darkxl.wordpress.com |
|
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Sep 26, 2010 23:09 Post subject: |
|
|
Cool, now my computer won't stutter when I play those levels like it did last time 
_________________ I don't think outside the box... I customize it. |
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Sep 29, 2010 08:19 Post subject: |
|
|
The renderer is progressing well. The horizontal clipping is pretty much done. So far it's fixed all the overlapping sector issues that I've tested that were problematic before. So I have to implement vertical clipping (which isn't needed to render correctly, believe it or not - just to reduce the amount of traversal and overdraw) - pretty simple fortunately, a few bugs, and get post-clipping wall merging to remove unnecessary polygons and memory. Also merging adjoins may also help in some cases, though this is much more rare.
Nice thing is that the sector complexity doesn't affect tessellation complexity. It's now just as easy to tessellate a square sector with two walls visible and a concave sector with holes (columns) and two walls visible. Finally the map will now work just like it did in Dark Forces, since we actually know what walls are really visible. 
_________________ DarkXL....http://darkxl.wordpress.com |
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Sep 30, 2010 08:30 Post subject: |
|
|
So I'm at the debugging stage with the new renderer, as you can see below. To do this I need to display the information in various different ways and in the past I'd make a temporary debug key (which I'd forget to take out and can't be properly bound) or put in code and #if 0 it out, making me have to recompile whenever I want to turn it back on. Neither of these solutions are any good. So I decided to go ahead and put in an in-game console, which some people wanted anyway, to help me debug the current issues.
The console acts like a Quake style console, where various commands can be called and variables changed. In addition is displays all the information that is logged as well as the text printed out by the script system (such as when you pick up ammo). It has a command history, so you can use up and down to cycle through the recent commands and you can use page up/down to scroll through the text - currently the text history is 256 lines.
In addition to debugging, this will be useful for a variety of different reasons: easy to input cheats (very useful for testing levels), ability to support new features before the UI is ready, extra "advanced" customization abilities, custom aliases and bindings, and so on.
Commands such as "exec" as well as the "autoexec.cfg" will work, allowing settings to be saved and executed later (either manually or automatically). Bindings and aliases will be saved automatically.
So here are some shots from the console:

_________________ DarkXL....http://darkxl.wordpress.com |
|
klasodeth Trandoshan
Joined: 03 Mar 2008
|
Posted: Sep 30, 2010 09:04 Post subject: |
|
|
Looks pretty cool! 
|
|
Tsophika Gamorrean
Joined: 14 Jan 2008
|
Posted: Sep 30, 2010 09:29 Post subject: |
|
|
Looks great. Always useful to have!
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Oct 02, 2010 21:02 Post subject: |
|
|
The renderer is almost done, I'm still debugging some issues. Fortunately I just figured out how to fix two of them - which may actually be the final issues (I'm not sure until I test once the fixes are done). Being able to record the position of a problem area and then teleport back there (using the console) sure makes debugging easier.
Two things I'm going to add to the renderer are contrast and brightness adjustment - in order to get the rendered result to more closely match Dark Forces in terms of contrast and brightness.
Down the road the rest of the Pure Renderer will come online which will allow for optional low resolution emulation and palette emulation to emulate the original software renderer. Of course the high resolution, high color depth, filtered rendering will still be default. But this will allow for me to have a "reference renderer" so that I can make sure the results look identical to the original - which will help make the default high quality rendering look more authentic as well. 
_________________ DarkXL....http://darkxl.wordpress.com |
|
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Oct 03, 2010 01:57 Post subject: |
|
|
Hey, neat!
_________________ I don't think outside the box... I customize it. |
|
BlazingPhoenix Ree-Yees
Joined: 22 Mar 2008
|
Posted: Oct 05, 2010 18:05 Post subject: |
|
|
I was worried about this project but now all my fears are put to ease. Awesome. 
|
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Oct 08, 2010 08:05 Post subject: |
|
|
The builds taking longer than I thought, but it's getting there. In addition to the sector/rendering stuff and the collision fixes there will be a few other bugs and issues fixed as well:
* A contrast control has been added with a default set to more like the original Dark Forces. (Makes levels like Talay look a little better).
* The dreaded wall lighting issue, where some walls would be too bright or not darkened properly is now fixed. This makes SecBase look much better in some areas.
* Night vision is finally working properly again.
* Automap visibility working correctly (since the engine now knows which walls were actually visible, rather then the conservative set from before).
Finally more items have been added to the console, such as being able to step through the wall rendering order, being able to set the contrast (even to negative values - which produces cool effects), the "depthcolor" which gives a sort of Gromas Mines "fog like" effect. When you load a level, this value is computed automatically from the palette which is why Gromas Mines work. And a bunch of other commands/variables to play with (sliding scale, movement speeds, jumping speeds, gravity, etc.).
So it'll be a big build, with the next focus on iterative work on the logics and INF.
_________________ DarkXL....http://darkxl.wordpress.com |
|
Gez Gamorrean
Joined: 05 May 2008
|
Posted: Oct 08, 2010 11:54 Post subject: |
|
|
Yes! Progress! 
|
|
tnoyce Ree-Yees
Joined: 20 Sep 2009
|
Posted: Oct 08, 2010 22:53 Post subject: Pure Renderer |
|
|
Lucius,
All of that sounds like things are progressing well.
Look forward to whatever the next build brings..
_________________ Tim Noyce |
|
Tsophika Gamorrean
Joined: 14 Jan 2008
|
Posted: Oct 09, 2010 09:20 Post subject: |
|
|
Sounds great. I'm curious about the contrast variable. Could you illustrate some of the effects it produces? Can it be changed on the fly?
|
|
|