Oz Devlog #3: Unique fish, inventory menu and new walking fish mechanics!
Overview
This week I add new functionality to support the following features
- Unique Fish: When players use the gachapon machine, they will get a new unique fish with randomized features.
- Inventory View: When players view their inventory in the room view, they will see a list of all the fish they currently own, and can edit properties about that fish. This includes adding and removing them from the tank - a new feature.
- House Inventory: When players click on the properties tab in their inventory, they can select a different room / house / property to change their current location. This allows the Fishtank to be viewed in various settings / rooms.
- Basic Walk Mechanics: When players go to the walk view, they are greeted with an overhead view of the map. Using this view they can plan out their route for walking the fish. Upon execution, the walk will begin and the player can use their leash to guide the fish on the walk and view their progress on the walk via the mini map.
Check out the video below for an overview and demonstration of these features!
Unique Fish and Customization Points
What does it do?
I added the following customization points for each of the fish:
- Body style
- Fin style
- Color
- Scale Style
- Hat
Each time the player uses the gachapon machine, a new fish with a random combination of these features will be created and saved to the user’s save data. Currently the fish a quite spartan and goofy looking (the colors almost make be sick), but the goal is to bring in the models that Ashley (Pixel Tiger) has been working on so that things look better!
It was pretty fun implementing this feature since I’ve never done any customization features in Unity before. It is very satisfying to get a fish, see it get added to the tank, and return to reopen the game and find that the fish is still there swimming around. Also cool to see all of the crazy variations of fish that get created from just doing a few small customizations!
How does it work?
The customization works by saving each customization variant as its own fish part scriptable object. I can then reference the fish part scriptable object library and look up the part with a matching ID. The prefabs corresponding to the unique parts are then spawned on the generic fish game object to give each fish its unique features. This is a very intuitive system and supports very easily adding new prefabs for expanded customization, and swapping out new prefabs with updated ones.
Inventory
What does it do?
When players are in the room view, they can now press the inventory button to view a full list of all the fish that they currently own. The fish are arranged as a simple list of toggles that can be individually selected to view details about them. One of the coolest features with this inventory screen is the 3D rendering of the fish that appears in each of their locations. Initially when this feature was requested by Adrian (Lost), I was unsure about how much effort it would take to implement it, but I am ecstatic that it turned out to be fairly trivial! 😎
In addition to viewing the list of fish, players can also see all of the different rooms that they can move into. When clicked, this allows players to view their fish tank in various locations.
💡Short Term Idea: Change the color of the various rooms for now to give them distinct and different feelings in the WIP demo.
💡 Long Term Idea: Have a location / menu in the game where players can view all of the variations they’ve collected out of all the possible variations that can be collected. Perhaps this can even show the frequency at which they’ve seen that feature on their fish.
How does it work?
The 3D fish renderings in the inventory work by spawning new static fish in the scene somewhere out of view of the main camera. I then set up render cameras on each of these spawned “dummy fish” and took the render texture output of those fish and assigned it to a raw image game object within each of the fish toggles in the inventory view. Finally I added a short script to rotate the fish so that the inventory looks a lot more dynamic and fun.
As for the different room/houses/properties, I just made a new scriptable object and linked up the name, description and corresponding scene for each of the locations.
💡Short Term Idea: Save the ID of the last property set by the player into save data so that it is the default room that is shown when they start the game.
Walk Planning
What does it do?
Adrian (Lost) was deeply inspired by Nintendogs when pitching this feature. The idea is that you first plan out the walk with your fish that you will take, then execute that planned walk. The catch is that players and their fish only have but so much energy, so spending it wisely during the walk and attempting to maximize the points of interest that they encounter can be a bit tricky.
Once the planned walk is committed, the players can view their fish being walked with a leash along the path that was determined. Currently it is up in the air whether the player will actually walk along that path, or take a Nintendogs style approach and just appear to be walking along the path, while strategically changing the types of tiles passing by to give the illusion of walking on the path.
How does it work?
Using Unity’s Grid component, a line renderer, and player input, a dynamic path can be drawn for the user to follow.
Plan for Next Week
- Merge in updated movement behaviors that Noah (Trout) is working on
- Bring in new fish assets that Ashley (Pixel Tiger) has created
- Add the initial playing with the fish scene (fetch, tug of war, petting the fish)
- Fix the gameplay system for earning coins and spending them on fish food and the gachapon machine
- Other minor tweaks (e.g., selling fish, turning fish into fish food, performing fish edits from inventory view)