Loading...
  OR  Zero-K Name:    Password:   

Multiple cores

8 posts, 393 views
Post comment
Filter:    Player:  
sort
14 months ago
Just wondering if a dev has a moment to explain to us relative dummies about the multicore utilization limitation - whether its seen as a problem, why its (presumably) hard to implement for ZK, whether there are any plans to implement it in the future?

I assume it might make larger battles (especially dirtbag spam ones) run a bit smoother, but I could be wrong.
+1 / -0
14 months ago
I am not a dev but afaik, the game is written in two codes, C++ and LUA. The engine is written in C++ and can be multi threaded. LUA on other hand is a single thread code so the bottleneck is this. My guess is to further multi thread the game, you have to move CPU-intensive LUA methods to C++, multi-thread them and expose these methods to LUA. Well, at least that what make sense to me, LUA usually is a mean for modders to mod the game, not use as base to build the game upon. Doing things on the engine side can be complicated and time consuming, evidently Zero-K doesn't have people who can afford to do that, otherwise the engine would have been very different from SpringRTS already.
+1 / -0


14 months ago
https://www.beyondallreason.info/news/groundbreaking-engine-improvements-are-live-multithreaded-pathing-and-new-renderer-deployed

This is a bit heavy on the hype, but it's the closest you'll get to an engine devs saying something about multithreading (short of going on the BAR discord and asking).

Afaik SGrankLu5ck is sort of right, but lua isn't the whole story. All multithreading has overheads, so a significant portion of what happens in C++ is also unsuitable for multithreading. A good candidate has to be individually expensive, look like a big loop over similar objects, and not modify the state that any objects in the loop depend on.
+1 / -0

14 months ago
I've been trying to add multithreading to several of my projects in the past.
It takes a huge amount of performance testing to figure out what helps and what hurts.

The main issue for ZK (AFAICT) is how advanced the game simulation is.
ZK is basically doing what sandbox FPS games do for 10 objects, but have thousands of objects instead.
Thus, it's kinda hard to compare the performance to other RTS games, or even FPS games.

For LUA, if someone can point out where the bottleneck is (with profiling), then I'm sure it wouldn't be too hard to rewrite that part. [Spoiler]
+1 / -0

14 months ago
Yep, what others said; multithreaded processing is hard. If you're not very careful you end up making things much more complicated AND slower.

Just wondering why you are asking. Does it affect you personally, or do you think it could open a larger market, or something else? On a reasonably modern CPU I find things hum along nicely.
+0 / -0
14 months ago
Sounds like its worth a conversation with BAR people about everything mentioned here.
+0 / -0
AUrankAdminGoogleFrog
Been reading a bit more on this, and it occurred to my admittedly very uninformed perspective - is there any plans to look at Coil as an option for ZK? Would that come with their multithreaded pathing? Is that even a reasonable goal or is it too complex?

GBrankfiendicus_prime
It's not usually a problem but in some Coop or in lobpots things like dirtbag/flea spam can make things chug a little. I'm also partly curious if improvements could open up mods or more frequent maps with larger maps/armies.
+0 / -0


13 months ago
quote:
is there any plans to look at Coil as an option for ZK?

We never really left. Engine dev essentially moved to the BAR fork. ZK was on the last usable Spring versions up until the end, and after a brief break while the BAR fork was a bit unstable, we switched onto the BAR fork. We've been on the same version as BAR for a while now, at least a year I think. I recall mentioning this in release notes, but nothing as glossy as their multithreading hype page.
+2 / -0