jump to navigation

DarkXL In-Game Console, Renderer Update September 30, 2010

Posted by luciusdxl in Uncategorized.
trackback

Renderer Update

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.

In-Game Console

I’m at the debugging stage with the new renderer, and to help visualize and debug the issues 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.

The console is currently functional, though I will be adding new commands and variables over time. It’s pretty fun changing the gravity or movement speed or setting r_solid – which renders the surfaces as solid colors. You can change the FOV, control various gameplay elements (such as marking specific goals as complete or setting the mission as complete), turn off AI and so on. You can also type help to get usage information, help commandName to get information about what a specific command does, or cmdList to get a complete list of commands. The list won’t be complete in the next build but I’ll be adding to it over time.

These are some screenshots that I’ve taken of the new Console, click on them to view at full size – the text is readable:

Advertisements

Comments»

1. Simon Buchan - October 3, 2010

I assume by “horizontal” you mean 2d, by the map clipping? I’d be interested to know why you can tesselate concave sectors easily, I can’t see how that would work while looking at the top of a concave drop, unless you do it dynamicly based on viewpoint?

2. luciusdxl - October 4, 2010

Yes, it’s now done dynamically based on viewpoint. This allows for dynamically changing sectors with arbitrary complexity – as long as they do not self-intersect.

3. Simon Buchan - October 5, 2010

Ahh, the benefits of extremely low poly worlds đŸ™‚

4. luciusdxl - October 5, 2010

The way I’m triangulating the “flats” on the fly essentially emulates a sort of “flood filling” done with polygons. In other words sector complexity has no effect on triangulation complexity, only the actually visible complexity matters. Most of the cost is in the wall sorting and clipping anyway – by contrast the dynamic flat triangulation is virtually free and actually really simple. đŸ™‚


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: