King's Sea 2: Dev Diary 2


Today I rewrote the encounter system to use Strategy Pattern, which allows me to handle a ton of unique interactions without me getting overwhelmed by the sheer amount of code.

You can read about it here!

Strategy Pattern Wikipedia

In Kings Sea II this essentially means, every possible encounter type has its own class. And a larger storage class for each category of interaction.



^^

Here’s an example that specifically handles fish encounters. I’ve also created separate EncounterStrategy classes for other encounter types like the new osprey style encounters making it possible to finally include (If you’re unfamiliar, this idea comes from the game Odell Lake.)

Of course since im being more simulationist this includes Bears (which eat large fish and other things)

And Seagulls (Which can eat smaller things like snails, but not for example, full grown tuna)

And the sosprey! Which only eats fish but can in fact eat the large fish.

They all have different sounds they make when you encounter them to hint at what you are running into.

Next, I need to add fishermen they will be fantasy races such as elves, dwarves, and ordinary humans who will use creatures tagged as 'bait' to trick you into eating them, to capture you!

Once that is in, Ill have added every single style of encounter from the game odell lake. Essentially meaning my game includes odell lake in it fully implemented.

Leave a comment

Log in with itch.io to leave a comment.