SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion > Bug Reports

Thread Tools Search this Thread
Old 01-17-2017   #1
ʇxǝʇ pǝddᴉlɟ ɹɐoɯ ɥʇᴉʍ ʍoN
gregory_house's Avatar
Default Precipitation is a bit of a mess.

So, multiple things here... (2.1.17, srb2win.exe, recent NVIDIA card)

-I'll just start with the variables (probably not everything is gonna be OGL-specific here, nor really introduced with 2.1.17)
EDIT:Scratch that, nothing is apparently:
precipdensity does absolutely nothing apparent, and why does it only take 1, or even numbers from 0-8 as correct values?

interprets zero as infinite, and only takes a few possible values anyway, making it not really console-friendly
Both of these variables reject numbers over their maximum value instead of just setting themselves to the maximum, same for the minimum. Also, for some reason they accept decimals starting with a possible value?

Wouldn't it be better if precipdensity accepted 0-5 and drawdist_precip 0-11 (or the whole range from 0 to 8192), and both simply corrected lower values to zero and higher values to their respective maximum? And if terms such as 'V.Thick' or 'Infinite' were removed from the variables themselves and kept for the menu only?

-That said, a high draw distance and density for precipitation means that not only many map objects, but also a lot of the precipitation itself, ends up disappearing. Can't more memory be dedicated to that?

EDIT:Density does work, but the weather has to be reloaded. Still, can anything be done about this? Since it's not set by the map but rather by the player, you should be able to change it at will, especially if you want it off.
Intel i7-4770K - ASUS GTX970 4GB OC - 2x8GB Dominator Platinum @1866 CL10 - Samsung 840PRO 256GB

Last edited by gregory_house; 01-17-2017 at 06:55 PM.
gregory_house is offline   Reply With Quote
Old 01-17-2017   #2
Mystic's Avatar

Originally Posted by gregory_house View Post
Density does work, but the weather has to be reloaded. Still, can anything be done about this? Since it's not set by the map but rather by the player, you should be able to change it at will, especially if you want it off.
This is because of how it works. You may notice that loading maps with precipitation takes longer than loading maps without. This is because precipitation works by generating a very large array of positions on map load. If it let you change the density mid-stage, it would need to generate that table again mid-stage, and this would cause a freeze and netgame desynch for something that's supposed to be client-only.

Now, it should probably say that changing the density requires a map reload, but there's nothing that can be done about that without completely changing how precipitation works.
Mystic is offline   Reply With Quote
Old 01-18-2017   #3
Formerly Inuyasha
Retired Staff
K.S.'s Avatar

Mystic, the freeze hasn't happened since 2.1 released. The precipitation code was totally rewritten so it *wouldn't* just dumbly try to spawn literal millions of rain or snow objects in random locations all over the map, and pray that they were actually inbounds. It works through the blockmap instead, which is vastly faster and also provides a result that looks much better (while still random, there's no possibility of seeing a large gaping hole somewhere).

That's why preloaded precipitation is mostly an antiquated thing now; generation is fast enough that it wouldn't even cause a single frame to drop unless you were in a large map with density set high. It's also why the console variables all changed from 2.1.0 onward.

But that's beside the point. Stuff like this is set up the way it is for the benefit of the menus. If you ever tried fiddling with the precipitation visibility distance in older versions, you'd see exactly what I'm talking about; it was excruciating trying to change that in the menu, advancing just by ones.

Changing density not causing a reload is part laziness, part not wanting to delete and respawn all precipitation if someone falls asleep holding the right arrow in the menu.
K.S. is offline   Reply With Quote
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:22 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.