GameDev Blog: Goblin Rules Football #33: New Weather System and Other Stuff

It’s been nearly two months since my last post about the multiplayer demo on itch. I had thought that I wasn’t doing much work on the game, but looking through my GitHub commits (should I just make the repo public? It’s not like it matters…) and there’s some work there!

The biggest thing I’ve been working on is a “Weather Favor” system for players that dictates how rain, wind, lightning, and a few other things work. Before, all of that was more or less random. Now, rain will only get worse if the players have bad weather favor, and will get better if they have good weather favor. Same with the strength of wind, and likelihood to be struck by lightning, among other things.

So I guess I should explain how it works?


There are now “statues” or icons or whatever to Good Weather and Bad Weather that will spawn throughout a given hole in a course.

Good Weather statue:

And the Bad Weather statue:

When spawned on the map, the statues look like this:

Gaining and Losing Favor

You can see a little circle around the statue when it is spawned on the map. This is part of how you can gain or lose weather favor. If your ball comes to a stop inside of the circle (or if it is placed there after it was moved out of the water or back in bounds), you either gain or lose 1 favor. If it’s in the circle of a Good Weather statue, you gain 1 favor. If it’s inside the circle of a bad weather statue, you lose 1 favor.

The other way to gain or lose favor is if your ball hits a statue hard enough, it can break the statue. Some animations!

When a player breaks a statue, they either gain 5 favor for a good weather statue or lose 5 favor for a bad weather statue. After a statue has been broken, the circle around them goes away, meaning that no other player can gain/lose favor from that statue. They just become a small, short obstacle on the ground. Only the base has collisions, though. The smaller broken pieces don’t because I’m too lazy to make new colliders/objects for each one.

Max favor is +10 and minimum favor is -10.

Favor Effect on Rain

Before, rain was mostly random. The game would start with a random “rain state”, either clear, light rain, medium rain, or heavy rain. Then, after every player’s turn, there was a random chance the rain would get “better” or “worse.”

Now, it’s all based on player favor. The game always starts as “clear,” with the assumption that no self respecting Goblin would go out and golf on a rainy day.

There’s a new concept of a “base” rain state. The base rain state is set by the average weather favor of all players in the game. If the average favor is positive, it will stay clear. If it is negative, it will begin to rain, and the more negative it is, the harder it will rain.

Then for each player’s turn, they will have their own “rain state” that is based on their own weather favor. The player’s rain state is changed relative to the base state. If a player has negative favor, and the base state is “clear,” then it can start to rain on their turn. If the next player has a positive or neutral weather favor, it will be clear for their turn. This is one way to “punish” players for having a negative weather favor. If the base rain state is “light rain,” and the player has enough positive weather favor, they can make the player rain state clear for their turn. This is how player’s can be rewarded for having positive favor.

The player rain state scales with greatly negative or positive they are. If a player is way in the negatives, such as -8, it’s possible they could have a “heavy rain” state during their turn while the base rain state is light rain. Alternatively, if a player has a great enough positive favor, such as +8, they can make it clear on their turn despite the base state being medium rain. If the player is at either favor extreme, -10 or +10, then they will always have heavy rain or it will always be clear during their turns.

While individual player favor effects the rain on their own turn, it also has an impact on other players in multiplayer games. Since the base rain state is based on the average weather favor of all players, your own favor can impact other players. If you know an opposing player has negative favor, you may not necessarily want to go for a lot of positive favor. If you have too much positive favor, the base state can become clear despite the opposing player’s negative favor, which can potentially benefit them by setting the base state at a higher value for their own turn’s rain state to be based on.

Favor Effect on Lightning

Before, whether a player was struck by lightning was based purely on a random chance weighted against how far away the lightning was. Now, player favor is taken into account as well. If you have positive favor, the odds of being struck are lower. If you have negative favor, the odds of being struck are higher. This also scales with the amount of favor you have. So, if you have +8 favor there is a very low chance of being struck by lightning, even when it is “close” to you. If you have -8 favor, there is a very good chance you will be struck by lightning even if it is further away.

Whether there is lightning or not is based on the base rain state. There won’t be lightning if the base rain state is clear. However, it is possible for the base rain state to be light rain or worse, for there to be a lightning storm, and for a player who has enough positive favor to make it clear on their turn. In this scenario, where the player’s rain state is clear but there is still a lightning storm, the player cannot be struck by lightning. I may change that int he future though so it’s just a really small chance unless the storm is right on top of the player.

Favor Effect on Wind

Wind strength is now also affected by player favor. Similar to how it works for rain, there is a “base” wind power set by player’s average favor, and then a player’s wind power for their turn based on their own weather favor. Positive weather favor = lower wind strength. Negative weather favor = higher wind strength.

For wind, there is also the “initial” wind power. When any game starts, the initial wind power is randomly chosen, with it being weighted to be more likely a lower strength than a higher strength. Then, every turn the base wind power is calculated relative to the initial wind power. Then after that, the player’s wind power is calculated relative to the base wind power. This is to try and simulate it just being a windy day when you started golfing, but if you have enough positive weather favor, you can potentially eliminate all wind.

Wind direction is not affected by weather favor.

Favor Effect on Hitting

The last thing that weather favor affects, for now at least, is how player’s hit the ball. If you have positive favor, you can hit the ball slightly further (max 20% further right now), and you will be punished less for “inaccurate” hits when a player submits their accuracy. Conversely, if you have negative favor, the max distance you can hit per club is lower (max -10%), and you are punished more for inaccurate hits.

Trying to Balance This Stuff

So, how to make this a real part of the gameplay and effect player strategy? Well, what I am trying to do is make it so that bad weather statues are placed along the “fastest” or “most efficient” routes on a hole, and the good weather statues are placed in a slower, more conservative approach to the whole. So, if you prioritize getting good weather statues, you will likely end the hole with more strokes. Going for fewer strokes, though, will run the risk of lowering your weather favor, making the game harder as it goes on. Player favor continues from one hole to the next, so if you finished a hole 2 under par but lowered your favor to -5, you would then start the next hole with -5 favor, making life much more difficult to yourself.

There are also a lot of bad weather statues on the green. This is to try and penalize bad putters, as everyone knows to be a good golfer you need a good short game (I’ve never golfed in my life and have no idea what I’m talking about).

Here’s a bird’s eye view of what a hole may look like with the statue placements (probably hard to see anything in the screenshot, sorry)

I updated my TileMapManager script that I use to create and save new holes to find the location of each statue for a hole, save the position, and then during a game spawn statues at those saved positions. Figuring out where the best places for the statues are will be a fun balancing challenge but whatever it’s not like anyone but me will be playing this.


In the above screenshot, you may have noticed those little red balloons. Those are going to be “power up balloons” that are placed on the map in saved locations. The player has to hit the balloon with their golf ball in flight, causing the balloon to pop and the box it is suspending to fall to the ground and break open. The player will then get a power up that does something like allow them to hit further for a turn or to make it so wind doesn’t effect their hit trajectory for a turn, something like that. I haven’t made any of the power ups yet, just the balloons and popping animation, shown below

The balloons can be at three different heights. The heights just change when a player can hit the balloon, such as higher heights only being hit-able at the peak of a hit trajectory, or only near the beginning of a trajectory, and so on.

The power up balloons spawn in saved positions on a hole similar to the weather statues. They can be saved to spawn at a specified height, or the height can be set randomly when they are spawned.

Anything Else?

No, that’s basically it. There were some other tweaks that I made. Oh, I forgot to mention that now tornadoes target whoever has the lowest weather favor, and if more than one player is tied for the lowest, it just randomly selects between them. Maybe it should be lowest favor and then distance from as a tie breaker, but idk.

Next Steps…

I should probably start working on actually making the power ups for the power up balloons. That should be fun. I’d also like to add sounds for hitting and breaking statues and popping balloons. One of the reasons I felt like I hadn’t worked on the game much since my last post is that I randomly got into hardware synths. I now own two (korg minilogue xd and an elektron model cycles). I had no synth or really music or sound design experience before buying them, so I’m still figuring that out. Maybe I can use them to make some sounds… or just use free sounds for stuff like that. Who knows.

Smell ya later, nerds!