WB Coding Trouble adding new kingdom

正在查看此主题的用户

Azuraa

Banned
I add 23 kingdoms, but I'm waiting for about 45 seconds in the beginning of the game. does anyone know the solution to this?

I am adding other heavy codes, no problem
but when I add a new kingdom it freezes at the entrance.
just like entering the city in bannerlord.
I added a total of 11 kingdoms, I wrote everything properly. It started to freeze then I did 23 to try it, this time it started to freeze more.
There is a solution to this but I don't know what because there are 31 kingdoms in vc mode and brytenwalda mode and there is no such problem.

thanks you
 
解决方案
basically the game code runs in loops (heroes, factions, centers, etc).

when you start a new campaign there is a lot of prep work to setup things.

Native code was written for few factions, a certain numbers of heroes (lords, ...), a certain numbers of centers (towns, etc).

Then you multiple that for 4 in double/triple loops, which means you are running code a few hundreds to thousands of times more than Native. Same code, just more stuff to handle. Add this to a engine that cant do multi-core well, while you are using the same thread for your calculations ... what happens is that you need to wait several seconds to several minutes for it to end.

Same thingy happens with multiple campaign events (like calculation of economy, AI...
basically the game code runs in loops (heroes, factions, centers, etc).

when you start a new campaign there is a lot of prep work to setup things.

Native code was written for few factions, a certain numbers of heroes (lords, ...), a certain numbers of centers (towns, etc).

Then you multiple that for 4 in double/triple loops, which means you are running code a few hundreds to thousands of times more than Native. Same code, just more stuff to handle. Add this to a engine that cant do multi-core well, while you are using the same thread for your calculations ... what happens is that you need to wait several seconds to several minutes for it to end.

Same thingy happens with multiple campaign events (like calculation of economy, AI actions, etc) that can lag your campaign at certain times.

How to solve it? You would need to re-write the game code based on your new constraints, putting performance first. VC did that for RE (Reforged Edition). However that requires more coding know-how, its not something you can copy+paste. If you want to go deep in the game code, it will take you many many hours of coding and testing.
 
点赞 0
解决方案
后退
顶部 底部