May 2023 Update

May 2023 Update

Its been about a month since my last update post. So its about time I updated you all on developments over the last few weeks. Starting on from the last post with…

Save Manager 2.x

As you will have seen by now, the new Save Manager has been released! So far so good. There hasn’t been any major problems from what I can tell so far as I’ve been using it in my personal projects to handle save data there. I have made a few minor updates to the asset since launch to fix some minor issues, most of which didn’t actually break anything. But they would throw some console messages which could confuse users.

As of writing the asset is on version 2.0.4. Some improvements were also made such as an option to hide the save keys for induvidual save values, reducing the clutter on the save editor. As well as a fix to allow the demo logic to be totally removed from the asset without any errors occurring. Before there was a direct type reference in the save editor window logic to determine if it would show the demo save object data. This has been changed to a type string comparison to fix the issue.

There are plans for some further QOL & feature updates in the future, such as save slots & a better API to allow for custom encryption options. These will be worked on once I get some time to look into it.

You can get the new Save Manager here:

What’s Next?

It won’t be a surprise to those who read the year in review for 2022 or been following on the socials, that the next main project is the Audio Manager update. Like the Save Manager, it is getting a rewrite in the backend. This is mostly due to the 2.x’s setup not being easy to update for the new features & setup I want to implement next.

The current plan is to have this update out by the end of August. Similar to the deadline of April I gave myself for the Save Manager. So 4 months to fully develop & release the asset update. Now this isn’t a flexible deadline and may change if its just not ready in time. Likewise, if it is ready earlier than planned then it’ll release early. I’ll post updates with progress and a release date nearer the time as well.

Functionally the Audio Manager won’t change much for the end user, but behind the scenes a lot of work is going to be done to make it just a lot easier to use. Some of these include:

  • Automatic Library Management
    • You’ll no longer need to manually scan for clips via and inspector or anything. When you import audio, the manager will find a process it automatically for you. There will be an option to manually scan still if needed. This also makes the setup simpler which is a bonus!
  • Static Audio Manager
    • While having the option of an instanced manager can be handy, 99% of the time it won’t be needed. So in 3.x the whole system is static. So no need to use “instance” when calling for audio to play.
  • New Library Window
    • While 2.x had a basic library editor for each audio manager file. 3.x will have a proper editor window with all the settings you need. You can even change the key of the clip! It also has a search option to search through the entire library and select any clip with ease.
  • Helper Structs
    • A new system for 3.x that will make typo’s a thing of the past. Instead of calling “AudioManager.Play(”MyClip”)” you’ll be able to call a helper class called “Clip” to let you select the clip with intellisense. So that same call becomes “AudioManager.Play(Clip.MyClip)”. There are other helper structs for groups and mixers as well.
  • Grouping
    • Speaking of groups, you’ll be able to group clips together in the audio library and call for a clip from that group to play. Handle if you have a lot of variations or want to play a clip from a range of options.
  • Dynamic Start Time
    • An experimental feature that tries to guess when the clip actually starts playing audio at a loud enough volume. Then sets the clip to start just before then instead of at 0. You can toggle the feature on/off globally, per clip in the library or via the method call itself. You’ll also be able to adjust the settings to get a better guess time in the audio library.

Currently it is still early days and some of these features may change a tad. One thing I mentioned in my last post was a method chaining API for calling audio to play. Sadly I’ve had to scrap this, but I’m still working to make the API better as a whole. The amount of methods in 2.x was a bit much, so I’ll be consolidating and using a better base method to avoid issues with call parameters.

Overall the idea is to build upon 2.x’s success with new QOL features & automation where possible. The music side of things is in the air at the moment, as I’ve always struggled with a good generic solution for it. But if all goes well I’ll have a little time to research something for that. I’ve already had a few suggestions for it which I have noted down.

Other Projects

As mentioned in my last post. I’m also working on a personal project as well to kind of replicate P5’s turn based combat into a small demo game of just that mechanic. This is entirely for portfolio’s sake as it’ll make for a strong project that I can talk about in detail with a lot of systems. It also makes a good testbed for these asset updates. Save Manager 2.x was tested in the project to make sure it was all working before release and Audio Manager 3.x will get the same testing as and when its at that stage. That project is going well at the moment and I juggle my time between both it and the active Carter Games project to keep it fresh.

Organisation

This week I spent an evening or two organising the mess that was the Carter Games Notion. I legit didn’t use it as it was such a mess to find anything. With the new setup I will be using it a lot more. While its not something you see much, it does help to have a goal in mind and to write down tasks so you know where you’re at and what is left to do. Below is the Audio Manager task board for example:

The new structure has goals as “Epics” which then have “Tasks” to complete. Epics & Tasks are linked to “Projects” which hold branding, links & anything else specific to that project on them. Even this blog post is been written in Notion under the new Marketing section xD

Website & Socials

A little heads up that I plan to change up the discord a tad at sometime. Mostly just removing bloat channels and making super simple. Its not used that much anyways and I want to have a place for update notifications for assets/games as well as the general news/announcements section.

I’ve also slowly been updating the documentation for all the assets to the new docs setup on the website. I’m mostly there at this point with Leaderboard Manager being the only asset to fully update. I’m hoping to have that all done at some point xD

So yea, that’s about it for this post. Long story short; a lot going on behind the scenes xD I’ll post another update around the end of June with progress if there is enough to share.

C# Actions

So, you’ve probably done this at-least once as a developer, you’ve got a value or element of your game that needs regularly checking and updating, like; player health, score or if a level has ended. Now you can just check for these in update which in small games is fine, but you’ll find you are calling this code way more than you really need to, if only there was a way to eliminate that xD.

Introducing Actions

This is where actions come into play. They work like events such as the OnClick on a Unity UI button. When you invoke them they run, otherwise to stay as disabled. What makes them handy, like how you can have multiple methods run at once of a button is that you can add and remove methods or delegations on the fly as well as listen for actions being invoked from other scripts. Here’s the four main steps to using actions in you code:

  • Initialise the action, you can pass varied parameters into the action to pass through information you may need to use in the actions subscribers.
// Its recommended to make the action null be default, 
// as you can check for this when you call the action. 
public Action<float, float> OnHealthChange = null;
  • Subscribe our method or delegate our code to run at this point. Methods are easier to manage and are generally recommended, but if you just need to do a quick value change a delegate will work too. Its normally best to do this when the action has no parameters though. It is important to note that your method or delegation must have the same parameters defined in the initialisation.
// Subscribing to the action 
OnHealthChange += UpdateHealthBar;

// The method setup, note the parameters are the same as the action init
private void UpdateHealthBar(float health, float maxHealth)
  • Invoke the action, doing this will call all the methods subscribed to the action.
// Invoking the action... (NOTE: that we call with a null check ("?.") 
// So it doesn't invoke if nothing is subscribed to it. 
OnHealthChange?.Invoke();
  • Un-Subscribe from the action to avoid null exception errors. Recommended to run this on OnDisable or similar to avoid errors.
// Un-subscribes from the action 
OnHealthChange -= UpdateHealthBar;

Usage Example

Here’s an example which is what I used to learn how to use actions.

Health.cs (on a player)

using System;
using UnityEngine;

public class Health : MonoBehaviuor
{
	[SerialzeField] private float maxHealth = 10f;
	private float currentHealth = 10f;

	// init actions
	public Action <float, float> OnHealthChange = null;
	public Action OnNoHealth = null;

	
	public void TakeDamage(float dmg)
	{
		currentHealth -= dmg;
		// Invoking action....
		OnHealthChange?.Invoke(currentHealth, maxHealth);

		if (currentHealth <= 0)
			OnNoHealth?.Invoke();
	}
}

Healthbar.cs (on the health bar UI for the player)

using System;
using UnityEngine;

public class HealthBar : Monobehaviour
{
	[SerialzeField] private Image hpImage;
	
	private Health health;

	private void OnDisable()
	{
		// Un-subscribing from action...
		health.OnHealthChange -= UpdateHPBar;
	}

	private void Start()
	{
		// subscribing to action
		health.OnHealthChange += UpdateHPBar;
		hpSlider = GetComponent<Slider>();
	}

	// Method that has subscribed to the OnHealthChange method
       // Note: It has the same parameters!
	private void UpdateHPBar(float currentHealth, float maxHealth)
	{
		hpSlider.fillAmount = currentHealth / maxHealth;
	}
}

End of 2021 Plans

End of 2021 Plans

With the end of the year fast approaching, we feel it is a good time to announce our plans for the rest of the year. We achieved most of our plans from the summer roadmap, though it did take longer than we initially planned. Because of this we are behind on making a new game project which we will be postponing until the new year.

Spooky Logo

You may have also noticed a logo change recently, this is our yearly bit of fun where we make logo variations based on the time of year. With Halloween fast approaching, we felt we needed to make the logo a little spooky for the fun of it.

The Carter Games 2021 Halloween Banner

The Plan

Those of you who follow our social media will know that we have had a few new assets in the works for a while now. Well we plan to finish these up and release them before the year is up. Those who have looked at our Unity Asset Store page recently will note that the Leaderboard Manager is still out of date. So this is also on the plate for the end of year work. We held off on the Leaderboard Manager for a bit as the asset needed a total re-write, so the new version will be a 2.0.0 release as and when we release it.

So a breakdown of what each asset does and when to expect the update roughlty:

Leaderboard Manager | End of year

Leaderboard Manager is a scripting system that allows users to implement leaderboard into their games with reletive ease. The current asset works, but is rather basic and has some limitations that we would like to remove. Given the amount of work needed to make the Leaderboard Manager work as we want. We expect this asset to be the last one we release this year.

Drop Tables | November

This asset is one of the new ones. The idea is to provided users with a way of creating multiple loot tables with ease with a 1 in X style which are user friendly. So a change of 1 in 4 would be common while 1 in 5000 would be super rare for example. The asset also allows the user to define drops that always get rolled if needed. The asset is currently at the testing stage and we are working out the kinks with the backend to make it usable in projects of any kind of the gate. We expect this asset to be ready sometime in November.

Build Versions | End of October

This is a lightweight asset that is designed to just help the developer automate updating their game build numbers. Which will happen automatically each time the developer makes a build. We plan to have options to change when the build is incremented, options to edit the player settings x.x.x number and options to edit the “type” of build. All of data is available in a scriptable object which can be easily implemented into the developers project. This asset is the one we are currently focusing our efforts and we expect this asset to be out by the end of October at the latest.

Closing Notes

So that is the plan 😀 Whether or not we achieve it is another question entirely. But we hope that getting these assets out this year will clear our schedules a little so we can start some new projects going into the new year.