Hey! How’s things? The outside doesn’t feel cold all the time anymore, still not spring-time but it’s enough for me. Lots to talk about this week, new creature behaviour and some technical fishing catch stuff (I go hard on explaining this later on!).
First of all though, check out this awesome first look at one of the creatures in the game, the Caterbee! a chimera of a bumblebee and a caterpiller. Emily has been testing a bunch of shader stuff lately; outlines, toon-shading, etc. It’s still early days but we’re defo making progress on what the creatures you’ll be taking care of will be. They’ll always be adorable and something to do with souls in the afterlife, but how that manifests could change a lot.
![caterbee.webp](/assets/images/update-5/caterbee.webp)
Since the game will have collect-them-all qualities to it akin to Viva Piñata we know want a bunch of these critters in the game, hopefully at least 25 - 30 for launch. With rare variants (Shiny or even Inverted!) of each one it should be enough to give the game a decent playtime.
The demo is just gonna have 8 or 9 2D creatures, and they likely won’t carry over to the final creature list. For the moment I’m just focusing on getting a basic set up of how they will act, which is a good segue way to…
New creature behaviour!
This week I spent a night focused entirely on refactoring the test creature behaviour into an actual system. Now they have new Idle, Wander and Sleep states, you can control if the species is Nocturnal or not and they respond to the current day / night time. I streamed getting it set up on twitch (Stream is no longer available) which you can see below / skip through to see how long it takes me to realise that nocturnal means they should only sleep if the night time setting is false, not TRUE!! omg, I’m so dumb sometimes.
I also took some time to start figuring out the math for fishing drop rates! I really want the fishing minigame to be a core part of the game, the basic idea is that when you fish you can catch a common, uncommon, rare or legend, it might not be a fish, it might be an item, but the idea still stands. I want it to feel as fair as possible and react to bonuses like magic find I can drop in… But I’ve never actually coded a loot system before so this was all freshwater to me.
So to start, when you successfully catch a fish we make a random decimal number between 0 and 1. I’m using Unity’s built in Random.Range function which I believe works great… but I wanted to test it to make sure haha.
It has an even chance of being any number, so it has a 65% chance to be lower than 0.65! So if it is I say you caught a common fish, and for each rarity it goes;
- 0 - 0.65 = Common / 65%
- 0.65 - 0.9 = Uncommon / 25%
- 0.9 - 0.99 = Rare / 9%
- 0.99 - 1.00 = Legend / 1%
![drop-rate-chances.webp](/assets/images/update-5/drop-rate-chances.webp)
Okay great, so let’s test this! Let’s simulate 1000 catches.
![1000-catches.webp](/assets/images/update-5/1000-catches.webp)
Hey! Wait a minute, it dropped 22 more common fish than I asked, this is the random part I guess, it being a little off but pretty much spot on means each player is defo gonna catch a mega rare thing eventually. Let’s do the same test a 100 times!
![list-reports.webp](/assets/images/update-5/list-reports.webp)
Okay, even though they’re random and all different they all seem to generally accurate, if I add all these reports together and average them out we should see how accurate it is over time.
![1000-catches-2.webp](/assets/images/update-5/1000-catches-2.webp)
Holy mackerel! It’s pretty damn close to the rarity brackets. So with this I was pretty happy that the basic implementation was sound. From here I thought, what if I add bait? surely it just adds a general 10% addition to the rarity, so I’ll just add, that should work right?
![1000-catches-3.webp](/assets/images/update-5/1000-catches-3.webp)
Hang on, that doesn’t feel right at all?… It’s defo improved the odds but it’s so overpowered, all of the drops have gone straight to the top, 100 legendary fish drop now, Ideally bait would just slide the scale up, giving more uncommons, rares and legends.
Ahh of course, if you add 10% to every number equally it basically pushes all values up so no matter what drop you get it’s getting better the same amount.
We need to weight it so that common drops get bumped up a lot more than rare drops, since this is a 0 - 1 number this should be fairly straightforward, we take our 10% and multiply it by the distance between our random number and 1. So for example:
If we have 0.2 as our drop number.
-
We have 0.2
-
The difference between 0.2 and 1 is 0.8 (or 80%.)
-
80% of 10% is 8%
-
So our catch will get 8% better.
Whereas if our drop number is 0.7
-
We have 0.7
-
The difference between 0.7 and 1 is (0.3 or 30%)
-
30% of 10% is 3%
-
So our catch will get 3% better
This works for all the possible numbers, the better our starting number the less effective the bait bonus will be, this should hopefully mean, bait improves the rarity of the fish without being super powerful. 1000 catches should result in more uncommon, rare and legends, rather than just more legends
![1000-catches-4.webp](/assets/images/update-5/1000-catches-4.webp)
Voila! By making the bait strength drop exponentially we’ve taken some common catches and spread them out through the upper brackets in a nice way, I have increased the bait strength to be 20% as well.
There will be a bunch ways fishing will progress, with the starting fishing rod only able to catch common fish and unlocking the other drops with upgrades, different baits, island decorations that increase drop rate at night.
What I did last week
This last week has been close to my ideal week I think:
-
Twitch streamed adding creature behaviour
-
Spent a long time on loot drop maths
-
Took an easy week running, still every day but with some shorter runs to let legs heal up.
-
Watch almost all the Daniel Craig Bond films because I saw Daniel Craig in an alcohol commercial
-
Also started watching Poker Face, a new murder detective show by Rian Johnson. It’s really really good, pretty much a modern day Columbo show. Big recommend!
What I plan to do next week
Hopefully more of the same, I really need to get this demo done soon so I can jump back on Echo!
-
More creature stuff with a focus still on behaviour, like eating! Eating should be next.
-
I’d like to do another game dev stream
-
More running
-
Going to see the new Antman, Big man go Small on the Big Screen!!
Bye for now!