FortressCraft Evolved

FortressCraft Evolved

Bright Rooms
5 Comments
Wariat117  [author] 24 Jan, 2021 @ 11:46pm 
some people build huge rooms (really huge, other mod allows 255x255x255 rooms)
those rooms require hundrets of room lights to not be dark as hell
some graphic cards can't handle the lighting well, for players using those cards... those hundrets lights in single room kill the performance like hell
especially when they enter room, room lights have random 0s-3s startup timer when they are enabled, all lights at the same time start to glow different types of light and it "grows" over time until it's full light

mod is mainly directed for such people
people who build small rooms or have good graphic cards can manage without the mod :D

the description of mod is basically a small joke
mike 24 Jan, 2021 @ 10:48pm 
Thanks for the detailed analysis! However, this does mean that "bright rooms" won't help performance much.
Wariat117  [author] 24 Jan, 2021 @ 7:56am 
I have never thought of checking such situation, that's actually interesting idea


*after I checked the code*
In the code room light checks ID of room that player is currently *IN* and the ID of room that light is currently *IN*
If both IDs are the same then light is enabled (otherwise light is disabled and light color is set to black)

So lights should work only if it's in the same room as player, when player is in other room then it shouldn't work


The only possible "exceptions" for that would be situations when MODs screw up something and enforce multiple rooms to have the same ID

btw, the surface has room ID = -1 :D
And normal rooms start counting from 321
first room is 321
second room is 322
etc etc
Wariat117  [author] 24 Jan, 2021 @ 7:56am 
Just in case I have visited code for power storage blocks (it's code for MK1 MK2 MK3 and organic PSB)
And they do the same stuff, check ID of room with battery and ID of room with player
If IDs are the same then everything is enabled (disabled if player is too far away etc)
If IDs are different then graphical and music/sound stuff is disabled, but battery itself still works (ignores distance to player etc)

probably other machines have similar code for room handling *I didn't check tho*
mike 24 Jan, 2021 @ 7:30am 
Thanks for all your mods!

Can you tell us a bit more about the performance hit of room lights, please? I really really hope that there's only a performance hit for whichever single large room that you are actually currently *in* ? Surely, we don't get a performance hit on rooms that we're not in?