Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable weather gloom and rain effects #4302

Merged
merged 6 commits into from
Sep 24, 2016

Conversation

wolfreak99
Copy link
Contributor

I've always hated the gloomy colours when it rains, I mean it's nice when not building anything, but if I'm designing something I want to be able to see it in its entirety but that will be addressed later. I've also noticed that when streaming, if it begins to rain it can add excessive noise to the video stream and distort the image. One could freeze the weather, but that will remove game logic such as plants getting watered, increase in umbrella sales, etc. This allows a user to disable the rendering of the weather gloom and effects while still keeping core gameplay normal.

For now this is not yet finished as I may consider adding that option to only disable gloom when in construction mode. I also noticed that VS merged changes in the solution and project user file, which I need to remove. But for now I'm posting this commit (via phone) because I'm not sure when I will have time to get on my computer again (swing shift jobs suck), and this can get some feedback in the meantime.

@wolfreak99 wolfreak99 force-pushed the render_rain_toggle branch 2 times, most recently from 47e69b7 to e325f59 Compare August 18, 2016 08:03
@@ -768,7 +768,7 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in
paint_quadrant_ps();

int weather_colour = WeatherColours[gClimateCurrentWeatherGloom];
if ((weather_colour != -1) && (!(gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)) && (!(RCT2_GLOBAL(0x9DEA6F, uint8) & 1))){
if ((weather_colour != -1) && (!(gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)) && (!(RCT2_GLOBAL(0x9DEA6F, uint8) & 1)) && gConfigGeneral.render_weather_gloom){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if statement would better be spread out over multiple lines to increase legibility.

@Gymnasiast
Copy link
Member

Hm, I can understand the gloom option, but the weather effects?
Apart from this and the line note I left, it looks decent.

@Ryder17z
Copy link

I think it's because of video compression

On Thu, Aug 18, 2016, 13:07 Michael Steenbeek notifications@github.com
wrote:

Hm, I can understand the gloom option, but the weather effects?
Apart from this and the line note I left, it looks decent.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#4302 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6HP_u_rM1vsgKML7F4W3OVKyV32_RIks5qhDzUgaJpZM4Jm_JW
.

@AaronVanGeffen
Copy link
Member

Weather effects tend to have a bad effect on stream quality.

@Gymnasiast
Copy link
Member

Gymnasiast commented Aug 18, 2016

Ah, that's a good reason. :)

(Yay, a Tom Scott link :D )

Still, does this need to be split, though? I'd say one toggle would suffice.

@wolfreak99
Copy link
Contributor Author

I have some ideas in mind and have been meaning to respond to the comments but this week I've been working more than usual so i haven't had a chance. I sincerely apologize for such delay.

@Gymnasiast
Copy link
Member

Could you rebase this?

@wolfreak99
Copy link
Contributor Author

Okay so I've rebased it and broke the long line (and following long line) for readability sake. it looks a little funky to me so let me know if i can improve the formatting. As far as making the option into one, i've still kept the config file with 2 options, while the in game interface displays one option. this allows power users to adjust if they wish to disable rain but keep gloom (say, someone streaming and they want to show some effect that it's raining).. But I'm not sure on weather this will be okay with everyone. I can see where it would be a bit hogging in the interface, but as far as config options, it's probably not something that's viewed as often

I'm also curious on thoughts of making an indented option to allow effects/gloom to be disabled only if in construction mode.

@@ -768,13 +768,24 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in
paint_quadrant_ps();

int weather_colour = WeatherColours[gClimateCurrentWeatherGloom];
if ((weather_colour != -1) && (!(gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)) && (!(RCT2_GLOBAL(0x9DEA6F, uint8) & 1))){
gfx_fill_rect(dpi2, dpi2->x, dpi2->y, dpi2->width + dpi2->x - 1, dpi2->height + dpi2->y - 1, weather_colour);
if ((weather_colour != -1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a newline between the two left parentheses.

@Gymnasiast
Copy link
Member

Seems to work. 👍
Some things I'd like to see changed:

  • I left some notes about formatting
  • I think disabling weather effects should imply disabling lightning effects as well, as lightning is a subset of weather. I would therefore put the checkbox of the lightning effect indented under that of weather effects, disable it when weather effects are disabled, and only render lightning when both options are on.

@Gymnasiast Gymnasiast added pending improvement and removed pending review testing required PR needs to be tested before it is merged. labels Sep 3, 2016
@AaronVanGeffen
Copy link
Member

I think disabling weather effects should imply disabling lightning effects as well, as lightning is a subset of weather. I would therefore put the checkbox of the lightning effect indented under that of weather effects, disable it when weather effects are disabled, and only render lightning when both options are on.

I'm not sure they should be. One of the reasons for disabling the weather effects is the effect they have on streaming quality, which, sure, the lightning effect likely also has a detrimental effect on. However, non-streamers may like to disable just the lightning effect, as it may trigger epileptic seizures. I believe this was the main reason it was introduced to begin with.

Therefore, I think these options shouldn't be intertwined.

@Gymnasiast
Copy link
Member

Uhm, you can still disable only the lighting effects under my plans. What you can't do is turn weather effects off and leave lightning on.

@AaronVanGeffen
Copy link
Member

My point exactly. Why take away rain if you don't have to?

@Gymnasiast
Copy link
Member

I think you still don't get what I mean. Under my plans you can either have rain and lightning, rain and no lightning, or no rain and no lightning.

@AaronVanGeffen
Copy link
Member

Right, I understand that. My point is that under what you propose, you will not be able to have rain enabled while lightning is disabled. This, too, is a valid use case.

@wolfreak99
Copy link
Contributor Author

Gymnasiast is assuming this checkbox will say "disable rain", but it says "render rain", but i'll switch this around and see if i can't recreate what he's talking about. if not, then i'd propose we go back to a dropdown where it'd allow you to disable lightning, gloom, and raindrops all individually with no restriction.

@Gymnasiast Gymnasiast added this to the v0.0.5 - fourth stable milestone Sep 13, 2016
@@ -296,15 +296,14 @@ static void climate_update_thunder_sound()

static void climate_update_lightning()
{
if (_lightningTimer == 0)
if (_lightningTimer == 0 || gConfigGeneral.disable_lightning_effect ||
(!gConfigGeneral.render_weather_effects && !gConfigGeneral.render_weather_gloom))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this check to:

if (_lightningTimer == 0 || gConfigGeneral.disable_lightning_effect || !gConfigGeneral.render_weather_effects)

Copy link
Contributor Author

@wolfreak99 wolfreak99 Sep 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gymnasiast .. :/ do i have to? the way it is currently done would benefit the power users who use the ini file, as the in game interface toggles both effects and gloom at the same time (under the disguise as weather effects), where as if someone manually edits the file, i'm sure they'll explicitly want lightning to show if they set it to show. i'd really like if this part stays an exception, unless theres a legit clear reasoning towards the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, alright, let's leave it as it is now, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gymnasiast thanks! I also rebased this as well.

@Gymnasiast
Copy link
Member

Sorry for the long delay.

I have left a line note. In addition to that, could you rebase as well?

@Gymnasiast Gymnasiast added pending improvement pending rebase PR needs to be rebased. and removed pending review testing required PR needs to be tested before it is merged. labels Sep 19, 2016
@Gymnasiast Gymnasiast added pending review testing required PR needs to be tested before it is merged. and removed pending improvement pending rebase PR needs to be rebased. labels Sep 23, 2016
@@ -8,7 +9,7 @@
- Feature: Add ride console command for diagnostics and changing vehicle type.
- Feature: Allow selecting corners when using the mountain tool.
- Feature: Allow setting ownership of map edges.
- Feature: Allow up to 255 cars per train.
- Feature: Allow up to 255 cars per train and 32 track units per station
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from another PR, maybe you made a mistake while rebasing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was just something i noticed wasn't added into the changelog back when it was implemented. I should probably make that a seperate pull request.

@Gymnasiast Gymnasiast merged commit a170eeb into OpenRCT2:develop Sep 24, 2016
@Gymnasiast Gymnasiast removed pending review testing required PR needs to be tested before it is merged. labels Sep 24, 2016
@octaroot octaroot mentioned this pull request Oct 2, 2016
13 tasks
@Nubbie
Copy link
Contributor

Nubbie commented Oct 3, 2016

Have no idea if it's just me who gets this (new computer etc so much is different) but there is a huge spacing in between the boarder and text + the checkbox gets auto ticked when disabling the 'Render weather effect', something that should just be grayed out and left in the setting it were before

Edit: New computer - Little Time

fixing

@Gymnasiast
Copy link
Member

If you had read the conversation, you'd know why the checkbox is checked when disabling weather effects.

@wolfreak99
Copy link
Contributor Author

i figured that would cause confusion tbh, that's why i was weary about doing it.

@IntelOrca
Copy link
Contributor

IntelOrca commented Oct 3, 2016

"Disable lightning effect" probably should have been "Render lightning effect". Then it would be common sense that not rendering any weather effects would not render the lightning effect thus not requiring the setting to change value.

@wolfreak99
Copy link
Contributor Author

Should I patch it to say render? If I do, would I just change the text and not the setting variable name (and make the in game interface just act as a reverse option?) ? Or should I trash disable_lightning_effect and put in render_lightning_effect?

@Gymnasiast
Copy link
Member

I don't think it's really worth the effort.

@wolfreak99 wolfreak99 deleted the render_rain_toggle branch November 5, 2016 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants