Closed temuchin- closed 6 years ago
"Python int too large to convert to C long" so 2,147,483,647 to 9,223,372,036,854,775,807 is the maximum scanner radius value.
Yes we need to bound scanner radius to 1.5 to 2 galaxy radii *(which should be less than 2Billion). If the radius boundary gets too large it crashes the client, even if scanner area drawing option is off. Problem Identified !!!! Solution, tentatively fingered.
Ah, did I forgot to comment ,when I was closing the other one as a duplicate? Darn. Sorry for that.
This is simply a display bug. Because of how the optimization during scan evaluation is made, we cannot have scans spanning more than some 20 parsecs, if I am not mistaken. So your scan, effectively, won't even span across whole galaxy.
But the right solution in this case is to prevent multiplication of deep space scan.
it is more than a display bug. If you jack the deep scan up to over 200K ish, the client never will start, it begins to calculate the scan multiplier & pukes at trying to convert the int to C long int.
With that said, yeah stopping / limiting scan multiplication is a must. (this also leads into a need to revisit how scanning currently works vs what it is meant to do vs how you desire it to function.) Right now 5k production & even spread of scanners, pooof you see the whole galaxy. Conversely you can only do morale improvement on a local level making it never worth using.
Ahem as said yeah that will be tackled later & elsewhere.
A snippet of the client thrashing like a corpse (note the error keeps repeating, kinda zombiesque)
adnosium, adnosium
I have fixed it by introducing scanner power cap. I have set it to 150 (this is after EMR, thus hard limit), which is the same as fully upgraded High Energy scanner Human has on TL6. I feel that bigger scanner span would produce silly results.
In general, my best experience with Outer Space was when confronted with unknown. And I would like to make the unknown part of design. Thus this limitation is in line with that. (And yeah, I know scout waves needs to be dealt with as well)
Seems building deep space scans scales up insanely, to the point it becomes easy to make an effective scanner radius of a really large number, exceeding the radius of the galaxy by a ridiculous amount. Discovered this by playing the pirate race (very useful for finding the breaking points in the game). Had them Deep space scan (actual production is 55K +) for a while on autobuild. Became unable to pan / move around / select a planet as each click was accompanied by 30 seconds of delay while writing display updates. Turned off scanner overlay & everything worked except for moving ships, which also had a 30 second delay when attempting to issue an order.
I can not imagine actual scan radius needing to be more than 2 times the galaxy radius, Nor the effective radius overlay being the same way. Maybe define an upper limit on scanner radius value?
--- Can attach a self contained game data file (server & client files @ 56 MB) if you ask (slow connection)