2024
Login
Now we can go back around and adjust the login script within unity to use the kilonet.
We would want to keep the supabase instance and client connected but only if in the kbve
mode because in offline
and steam
, we would not need the supabase client.
For the steam version, we would just handover auth and utility to the Steam SDK, this way the player can still get the achievements and in-game items.
However what we do need to be careful about is to prevent cheating and maybe lockdown parts of our code, hmm, we can get a bit creative with how we want to handle that part too.
Title
For the rare icon game, we will focus on three core gameplay options, Single-Player
, Steam
and KBVE
.
The single player will be an offline and casual instance, while the steam mode will be focused on a co-op style of gameplay and finally the kbve version will be for the hardcore players.
We will want to keep the players focused on the single-player first, maybe even lock out the kbve
until they complete at least one mission on the single-player?
The goal would be to keep players happy regardless of their play style and maybe find some creative ways to make each instance popular?
Like special abilities from the single player could grant you special benefits in the pvp areas?
State Machine
In our current state machine codebase, the save file name is just hardcoded to be:
private const string SaveFileName = "RareIconGameSave.json"; // JSON file name for saving state
We want to make this a bit more dynamic, maybe depending on the application’s name or just some form of a variable, rather than what it is right now.
For that, we need to update the StateMachine.cs
, such that when the constructor is being created, we do this:
SaveFileName = !string.IsNullOrEmpty(Application.productName) ? Application.productName + "_GameSave.json" : "RareIconGameSave.json";
This will let us create the save state based upon the productName
and _GameSave.json
!
Let us go ahead and push that out!
Data
There is an older folder we created called _Data
, which holds a bunch of assets under a sub-folder of BG
and PixelArt
.
I am going to go ahead and remove those because we will no longer use them in our current game.
It would make more sense to keep the simple ui for now and focus on making it more stylish after we get the core gameplay out.
SubScene
After getting the base of the game state resolved, we can move forward with the initial game loading and level picking.
I am going to build off of the MM system and basically reverse engineer how they handle level loading, we see that there are two scripts attached to the button.
The scripts are Selection Base
and LevelSelector
, we will peak inside both of those cs files and see what they are doing.
Double GameManager
It seems that we have two instances of the GameManager, one in our Kilonet package and another inside of the MoreMountains, so we can avoid this problem by making sure that we reference the exact GameManager when using both libraries.
In the event of using both game managers, we would need to be specific, i.e KBVE.Kilonet.GameManager
as opposed to just GameManager
.
Okay! That was the last of the main errors that I wanted to address today.
Animations
Updated the KBVE.com website animations to be a bit more in-line with our robotics and gaming side! We still have a couple more of the components to fix up but I will slowly tackle them as I am updating the website. The a future update will be around better state machine management and the loading of the riv assets, which could be done off thread. Hmm, we could have the worker load the asset into the dexie storage and then pull it whenever we want to create the animation, as well as, save its internal state machine.