this post was submitted on 29 Jun 2023
119 points (100.0% liked)

Gaming

30532 readers
79 users here now

From video gaming to card games and stuff in between, if it's gaming you can probably discuss it here!

Please Note: Gaming memes are permitted to be posted on Meme Mondays, but will otherwise be removed in an effort to allow other discussions to take place.

See also Gaming's sister community Tabletop Gaming.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

In this release, we're updating the engine from SDL to SDL2, and there are many optimizations to go along with it. Aside from the optimizations, SDL2 is also the stepping stone to ports. We have Linux compiling and playable; it just needs some testing.

Moreover, there is now a(n experimental) multithreading option in the game settings that makes the game even faster!

We also have some new individual tree graphics, and an update to grass ramps as well.

This has been mostly the hard work of Putnam! Meanwhile I've started up on adventure mode - the long work of updating menus and adding audio has begun! Hopefully we'll have some progress to show their soon, as we continue updating fortress mode as well.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago (5 children)

Wow. That is a cool. My limited experience working with single-threaded game-stuff tells me it is exceptionally hard to port stuff that is written without threading in mind, to multi-threading. Getting the behavior to stay the same while still actually getting better performance requires some really deep insight into how stuff works in the program. On a (program-)global scale. Mad respect if it works out. This should make huge maps or huge fortresses possible.

I haven't yet played the steam version (it is on my todo-list though), but sank quite some hours into the "legacy" version. It can become laggy if you play on big maps with a lot of dwarfs/critters etc on it. I am excited to have even more stuff possible in this already very complex and huge game.

[–] [email protected] 1 points 1 year ago (4 children)

I'm really curious how they're doing it, too! I'm making a multithreaded simulation game and the parts that can't multithread well are related to AI / character logic / tasks and errands / pathfinding, and anything to do with rendering.

[–] [email protected] 0 points 1 year ago (1 children)

Yes, would be cool to get some technical overview on how they do it. Maybe a lengthy blog post or something.

Rendering can be multi-threaded if you do it grounds up and use a rendering API made for it such as Vulkan or DX12. I used Vulkan a bit and you can create command-buffers from threads, and assemble them into your queue then. So you could have one thread creating the command buffer to draw all static meshes, and another one doing it for the particle system. And there is the "Async Compute" that allows the GPU to do compute shader tasks while CPU is busy building draw commands etc. I don't know enough to tell you details as my own work with Vulkan is very basic. But the in-house engine at my workplace uses those techniques to multithread.

There are systems that can run in parallel to each other. The sound system often needs to be their own threads. Low priority tasks such as wayfinding for NPCs. They don't need to recalculate their paths in a tight loop every frame, they "interpolate" to the next waypoint in between.

Parallel stuff is so dang hard to get correct and actually gather speed. Kudos to you that you are doing that. May your data access never be a race condition. :)

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Yeah in the future I've already decided I want to try creating IntBuffers and stuff on threads but I'll need to do a lot of testing to make sure it's actually faster across a wide range of hardware 😀

I wrote a little blog post about my latest work if you're curious!

load more comments (2 replies)
load more comments (2 replies)