Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Week 18/2013: Bank

edited 2013 May 6 in Developers
Last week we released a second patch for the stable 1.10 and I was busy building more of the foundation for the new UI framework and next-gen renderer.

1.10.2 was released on Friday, May 3rd and it comes with two bug fixes: 3D psprites are no longer affected by fog, as world fog may not be configured for the same coordinate space as the models, and there was a Snowberry issue where profiles could not be duplicated correctly.

While considering the needs of the new UI widgets in the client, I realized we should have a general-purpose runtime data cache/storage element in libdeng2. A large portion of the week I spent on writing such a class. It is now called Bank and it should prove very useful in the future as the foundation of many of the resource management/caching needs in the engine (e.g., audio samples, materials, textures, etc.). One of the most fundamental advantages it provides is support for multithreaded operations: hitherto Doomsday has used a simple "busy mode" approach that is effectively always single-threaded except when it comes to drawing a progress indicator during a work task (such as map or texture loading). With Bank, all the CPU cores available can be used fully as separate tasks are run concurrently in separate threads. However, while this is simple in principle, in practice there is plenty of care to be taken to make all the central systems of the engine thread-safe. In the end this will be worth it, though, as we can dispense with the old-fashioned busy mode and run some tasks in the background while the game is running normally.

I also continued testing out new GL2 classes in the sandbox. One of them is a texture atlas:

sandbox_atlas.png

Texture atlases will be a very integral component for all future rendering code in the engine.

Today's unstable build failed due to some minor issues resulting from merging new code from the "ui-framework" branch; there will be a new build tomorrow.

My plan for this week is to continue work on new GUI widgets for the client, building on the GL2 classes, Bank, and AtlasTexture.

Comments

  • Last week I spent working on the extraction of the map geometry generation from the old renderer.

    This work has progressed quite well thus far, I've been able to consolidate and abstract much of the logic for handling map hack constructs outside the renderer's domain. Achieving this separation of concerns has been a long time coming as it has dependencies which extend deep into the inner workings of the BSP construction (not to mention that geometry is drawn effectively in immediate mode (ignoring the render list primitive batching)).

    Wall geometry construction has now been redesigned to utilize a "edge centric" approach/model with the introduction of a class called SectionEdge. This component encapsulates all details of constructing a "vertical" edge of wall section geometry (i.e., originating at some X|Y point along a map line), including the logics necessary for id Tech 1 compatible map hack interpretation.

    The next step is turning two (or more) of these edges into a fragment of drawable geometry (or "shard" as they will likely be known in the next-gen renderer).

    In the process of this work I also fixed various glitching bugs in the old map renderer, particularly when combining different texturing mode options. For example, one can now use rend-dev-tex-showfix in combination with rend-dev-sky.

    I intend to continue this work over the coming week. The geometry generation extraction should be completed and merged to the master before my next devblog update.
Sign In or Register to comment.