Jump to content

LAG FREE mode, or mod


edaq
 Share

Recommended Posts

Reduce processing by having units move and work in small formations, like one unit to save processing for individual units. Five units upon leaving cc could be grouped in a formation. Resource buildings that take time and resources to build, that still look like quarries from the civs and exchange food or other resources for metal or rock harvesting, less worker units could reduce lag. Like the corral but for other resources. Replace tree entities with tree row entities. Tree harvesting building could harvest local trees. Worker units might be part of the lag. Such a mod could speed up games, and not require many changes. Hope that someone with more knowledge of the engine picks this up. As I do not know enough about the code to program it myself.

Link to comment
Share on other sites

This is a brilliant idea. Currently, the game quite restricted with the number of units it can handle. It can make it harder for player to avoid the lag with a large number of units when theres not much of a warning for the players during the game. I really like the idea of replacing worker units with buildings. Like edaq said, we could have specialized building to handle some of the worker. We could even make it so these specialized buildings need a certain number of units garrisoning it in order to function. This will then have less units on the board, but will also have units to use when finished with wood processing.

 

Also, the idea of combining multiple units into one is brilliant. This could be accomplished by maybe having certain unit types to accomplish this unit type such as slaves or gladiator slaves pseudo combined together

 

Also, there should be a limit on the max number of units that can be in an individual formations for the moment. This should be the case until code improvement.

 

There's also the consideration of parallelizing the code for formations. I might be able to do this myself if I'm directed to the proper team and proper code.

Edited by heyalex
  • Like 1
Link to comment
Share on other sites

If you modify unit statistics (so certainly "combining" multiple units in one), it will create a mod that can only be used in multiplayer if the opponent has the same mod. And of course, this mode will have to be balanced from scratch again, including all bugs that accompany balancing.

However, it should be possible to improve the performance a lot by using simple models and textures. F.e. turn every tree into a green, tall pyramid; remove all details from buildings and bring them down to the essence (blocky fortress, house with a few tris, ...). It should be able to use this mod to play against someone who plays the main game (with beautiful graphics), but such a low-quality mod should still have some serious performance benefits.

  • Like 3
Link to comment
Share on other sites

A bit unrelated but I think it would do wonders for people with low RAM if there is an option where the game freed all memory once you hit the end game stats instead of leaving everything cached once you return to the lobby.

I assume it is better for people with enough RAM to keep everything, but with low RAM loading a new game starts swappping and is worse the reloading from disk on clear RAM

  • Like 2
Link to comment
Share on other sites

Parallelization would indeed help, but it won't be feasible on such a small part as the pathfinder.

Note that the pathfinder and unitmotion code has to be deterministic (needs to calculate the same path on all computers in a networked game). So if unit A and B both want to move to position (x,y) in the same turn, the pathfinder must have some preference (f.e. give the unit with the lowest id preference). When parallelizing it, there's no preference anymore, and it all depends on OS scheduling. Next to that, the pathfinder is also rather memory heavy (it has passability maps for different unit classes, and evaluating all nodes is also memory heavy). When parallelizing something, you have the problem that you need to copy a lot of data around to the different threads. So it's better to not do it on memory heavy.

I see more promises in splitting off the AI to different threads (which already has a good separation of memory, so it can't modify the simulation directly but only by giving commands). Or the parallelization of not components of the game that don't have to be serialised. Like the 3D rendering, or the GUI rendering.

@sarcoma, your memory issue is probably a valid bug, but one that's very hard to debug. We probably also still have some memory leaks, but it's hard to distinguish a small memory leak from valid increase in game data when the game becomes bigger.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Sorry to bump up the post, but it's related to lag issues. It's possible pyrogenesis process is only using one core? (Under Ubuntu)

I checked process manager when hosting some games and when the true battles starts, CPU usage is stuck at 15-17% so I guess the process is just not using my full CPU. Stable pings (although they start to rise when this cpu bottleneck arise) and RAM under control.

Link to comment
Share on other sites

Quite right Dade pyrogenesis does not have multi-core support at all yet,and adding it will be a process that will take quite a long time even the planning and analysis portion of the task is difficult when the requirement of full determinism it so important.

Enjoy the Choice :)

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...