The fishing title has taken the entirety of my production schedule, and the results have been quite worth the effort. As a first mobile title I didn't have big expectation, but after seamlessly offloading the movement to a virtual joystick asset the rest of production has been a familiar process. Programming has been smooth, so far with only one rewrite, and I have been using custom event arguments quite heavily. To that end, I hope to use more in all my future projects.
Work on the zombie shooter has been paused for awhile, there has been more interest in a mobile title at the studio lately. So I have no progress so show on that front this month. I will however treat you to some of my code.
The prototype is available to test here https://slothfulmedia.itch.io/another-fishing-title/
Any feedback is welcome!
Since the last post I've spent a lot of time on NPC interactions, roughed in some UI for the inventory system and equipment, and set up shops to sell/buy from. I've added some features to the background like a waterfall, and a second level that will work for progression and exploration. Staring at the default unity background got boring real fast.. Big changes to the fishing mechanic learning curve (this is the only rewrite so far).
Inventory and Equipment The inventory and equipment system allows players to tap the item they want to equip, automatically placing the equipment into the slot and the subscribers listen and act accordingly. This was the first project I've used custom event arguments on and it worked great first try. A bit of a learning curve, they don't teach us anything like this in college. Events in general were not really touched on.
Only equipment can be interacted with in this way, while fish and items will stack. This gives the player the ability to hoard items with a limited amount of space. If equipment is bought at the vendor, that item equips immediately, but can be re-equipped should they need to. If the item purchased is the first one, the default item will be replaced and not stored in the inventory. Tier 1 items are equivalent to the default but offer slightly better rewards as well. Instead it will be considered the new default gear.
The exception to this is when a player purchases a new tackle item, and then loses it when they over stress their line. The default item will return and the player can purchase a new tackle, or equip another one, while rods do not break
The equipment system is limited to three rods and four tackle currently, but the prototype has been programmed in a way that it can scale up to other levels. The previously purchased equipment, total gold, NPC submission points, and soon the current inventory, will all save persistently between game plays, saving in real time. NPCS
NPCS now have traits, such as their reward, item requested, and all of their commentary and will now request a specific item, their request page now comes with different dialogue, and will respond according to the player having their request or not. If they don't, the NPC will scold them for wasting their time, but if they do they will get a confirmation. The item they request is listed with its own sprites and the required equipment to get that item is also listed. Once a player submits the correct item the NPC will leave and reward the player with gold & submission points. I added a few placeholder images to stand in for the rewards, rods, and tackle, just so I didn't have to look at the same item over and over.
Submission Points Submission points can be used to access new areas. As I scale the game up I will give players areas to explore, some flavour text to uncover, hidden around the map, but new areas are gated. Submitting items to NPCs becomes the core focus for progression, while farming gold becomes a secondary objective, but furthers the progression to new areas. I plan to add at least 2 more areas outside of the immediate player area, the dock. I would like an ocean view, and a river, but those will come post release. Fishing Mechanic
Some changes to the fishing mechanic, previously the stress meter was fairly consistent, and reduced too slowly, so that value was changed to reduce the stress a bit faster allowing the player to continue reeling. Later on in development I realized I had to completely rewrite how the mechanic handled rewarding the player. Previously the difficulty was completely random. Now the difficulty is tied to the end result, so if you are fishing for a tier 3 item, the event will have a difficulty of 3. Primarily to keep everything in line with the level scale/learning curve. I don't want to punish players trying to get a tier 1 item.
Since I have very little art to show off, I'm resigned to share my programming prowess. Using the distance between two points on the virtual joystick as a raw input, reduced to a decimal, the player input is used to add progress and stress to the catch and rod. Both are handled by a rate calculated in an excel sheet.
I decided to add a torture mechanic, and on the other side of the spectrum, a mercy mechanic. If the player catches too many fish in a row it will downgrade the next fish, currently on the 4th fish in a row. Alternatively if they get too many random items in a row the 3rd item will be a fish.
Choosing those rates is determined by the difficulty which, as mentioned, is determined by the tier of item the player is catching at the start of the interaction. The "goal" for a catch is also determined a random range, using a set base value and rate multiplied by the difficulty.
For a game I was hoping to push out in two weeks I definitely overscoped again. The fishing mechanic alone has over 500 lines, admittedly probably only 300 lines of actual content excluding curly brackets. With almost as many scripts as Monster Factory had (although that game was much bigger, the Player script had the brunt of the game and it was spaghetti.
Some could be reduced, pretty much anything with 1 reference, but this way it makes my mechanics cleaner, and I've been using the debugging tools a lot more to step through issues before they get big and convoluted. This was super helpful when I was learning events, as I could step through every single listener and see what went wrong or missing.
These are all the fun events I use just for handling the Rod, Tackle, Items, and buying. I decided to just cram the fish into the item category since it's the same mechanic, you're never going to catch two items at once, and selling works one at a time anyways. I'm honestly pretty proud of myself for learning something so crucial for performance.
More to come
Additionally, we are no longer on Twitter, but our Instagram and Facebook page are open. If you have any issues, questions, or comments about this post please let me know, you can reach me at email@example.com and I'd be happy to engage in a conversation with you about any of the above.
Follow us for more instant updates!
Help us grow
Join the discussion Discord