I started making the player’s companion based on Mito’s design sketches. This will be a small floating robot, that will follow the player around and be available to him. The companion will mostly stay out of the way, but the player will be able to call it to help him with certain tasks.
Usefulness of a companion
- They will be projecting the inventory, crafting and character UI. This will be a mostly aesthetic task that should add some more immersion.
- Companion will have a limited healing capability. It will be able to heal the player, but its healing capacity will deplete quickly and will take time to recharge.
- It will work as a limited gathering tool. The companion will be able to shoot a mining laser, that will break trees, rocks and mining veins, but it will quickly run out of power and need to recharge. This will give the player the ability to gather resources, even if he finds himself without any gathering tools, but also give him incentive to craft them, because they are much quicker at the task.
- Technically, the companion will be regarded as a tool that will always be available. It is animated in a similar way as the weapons, meaning it has animated interactions with the player character’s first person rig.
More User Interface Changes
In the lower right corner you will find various player variables: health points, energy points, companion energy points and jet pack fuel. The panel is intuitive – the most important player stats have colors. If a certain stat is being low, the icon starts flashing (there will be also danger SFX for it later). If you gain certain stat (e.g. you are getting healed or damaged), the text color is changed as well to notify you something is happening to you. More details about a certain player stat:
- Health points: this is something you will have to watch out for a lot, like in other games. You will be able to replentish your health in various ways, from consumable items, companion healing and world “healing stations”.
- Energy points: this is the secondary stat to monitor. It depletes when doing certain tasks: mining, jumping/running endlessly, diving in waters, staying in radioactive zones, to name a few. To replentish the energy, you will be able to craft yourself energy batteries or build yourself (or finding one in the world) a charging station.
- Companion energy: as mentioned before, you will be able to use your companion to heal yourself or as low-level resource gathering tool (until you craft yourself a pickaxe or another more advanced tool). Companion energy will deplete and replentish fast and its resource gathering/healing capabilities are basic.
- Jet fuel: it will be used to reach previous unaccessable areas with fast depletion and slow replentish rate. There will be no way to replentish it with consumable items.
Since we have player stats now defined and ready to use, there should be an option of improving or degrading them. For this purpose, I’ve implemented item bonus system that’s going to be enabled if you put items in your hotbar or gear slot (gear items won’t work in your hotbar though). A sample item with bonuses:
Crafting menu has been overhauled to be more intiutive. The design is not yet finished as it requires SDF icons and other minor tweaks. Items are sorted in different categories, from weapons, tools to electornic devices. You can easily see what items are still missing to craft a certain item or if it requires a workbench to craft it (applies for bigger, more advanced items).
You can add up to 5 items to your crafting queue where items are being crafted for you. You can cancel certain recipe from being crafted and regain all items needed for this recipe back to your inventory.
I’ve been creating an in house resource helper, that will reduce time costs of searching and manually changing files containing item definitions and resource definitions. What you see is an XAML app, that parses .json file and gets out values of each item. These values can be manipulated easily through WIP UI interface and later simply replaced by just one click of the button. Soon I’ll be moving to crafting variables, and its manipulation.
As you can see, this is a necessary chore, which allowes even non-coders in the team to easily fix over or under saturated values of variables. This will become specially useful in the testing phase, so we’ll be able to change things on the fly.
Later on, I’m going to implement server connection, which will broader the options what we can do with it. Nothing is sure for now, but a bit deprecated version could be used even for players. That way they know which items/crafting receipts are used in the game, or even for modding support. But as I said before, this is just a thought, we will let time decide other proper use cases for it.
Updating UI icons
Since Domen is extensively reworking the entire UI and the whole inventory system, we’ll have to update the icons as well. The current icon style won’t fit the UI design that is currently being created. So this week was kind of frustrating, simply because its not the simplest task to find the exact type of icon style to fit the UI. After plenty of rejections and reworks this is what I came up with. Some of them will probably get replaced in the near future.
Due to creating a new Floatlands world lately, I had to rework terrain as well.
- Multithreading of all operations on 2D maps, which includes Perlin noise generation, filtering, map rotation, addition.
- Pool for 1D and 2D arrays, also with thread-safe functions.
- Direct mesh contruction (previously mesh was constructed then modified).
- Caching where possible to avoid Garbage Collection.
New features were also added:
- Signed Distance Field for each Biome, so I can know how far away from biome edge I am (inside & outside).
- Picking quad diagonal based on surface curvature, so that mesh looks more natural.
To demonstrate how it’s done on 2D arrays. Lets say you have a quadcore PC, then we split any workload to 4 parts, so each thread gets it’s own part to work on.
A code example of how it’s done in our project.
This is the current state of terrain, with still some tweaking to go:
More about Floatlands: