Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Edit: Sorry that was a little terse.
Buildings like the refinery aren't boxes, and you can't just test the cells in a larger box around them.
The only solution is a floodfill and a redundant comparison is very likely cheaper than the pointer indirection and allocation you'd need to do to book keep which cells you've tested.
At least while it's this small.
Maybe I'm way off the mark, but what I thought I was proposing was adjusting the method that looks for nearby friendly cells. Whilst I agree that you don't necessarily have to do this in a square, there's no reason not to for these purposes.
The "facing" loop that this replaces does not take the building geometry into account at all - it just looks at the 8 cells that surround the given cell and returns true if at least one of them is friendly.
I have been looking at adapting the cached version the remastered UI uses, but I think it suffers similar issues.
And when it comes to time to optimize, I optimize where it matters the most. Your idea would definitely be faster, but it also wouldn't make a difference. As you're optimizing a function which seemingly has zero effect on performance anyway. (That said, it would have a noticeable benefit in that it lets the user choose building gap size.)
And also, if you wanna optimize, where do you stop? I'd say the most obvious thing to optimize in that function is the fact it re-calculates the placement_distance value for *every* tile on the entire map.
Sorry if I sound defensive. This is just the general philosophy I use when programming, or well, any kind of content creation really. I used to be super nitpicky with video quality on my Youtube videos, but I eventually realized no one complained whenever I did a mistake which resulted in worse quality, so I stopped caring about it. And that made it possible to work on more videos rather than spending hours needlessly working on details no one but myself cares about.
This is in all single player missions for me (even after restarting the mission), Skirmish mode seems to work fine
Edit: I've updated the mod to default to a single tile gap even if your ini is broken.
If peoples .ini files are breaking, you can unsubscribe to the mod, and subscribe back and it replaces all the files with fresh ones.
Was working fine up till then :P I went for a run, came back and it was broken as my Workshop pulled updates down while i was out haha
EDIT: Saw your latest patch notes, i guess you already know :)
Didn't want to leave people with a broken mod...
Anyway, fixed version coming soon
Hey man no offence meant whatsoever! I'm also usually heavily limited on the time I can put into things, just have the (mis)fortune of being out of work at the moment. Big thanks to you and everyone who has made the time to dive in and start experimenting!
You're totally right that this isn't particularly impactful performance-wise, this was more borne out of my own curiosity and compulsive need to keep things neat and tidy.