Skip to content

Achievements

Jack Brett edited this page Feb 17, 2025 · 6 revisions

Achievements (or quests, missions or any other terminology that one uses in their game) are goals or milestones players complete to earn rewards or recognition for their progress.

In our 'Demo' Scene there is a specific parent object that contains all the other objects and classes that you will need for our Achievement System to function correctly. Within this page we break down these individual objects and outline how you can begin to create your own rather custom achievements and how they can be progressed or unlocked with ease using built-in Order management.

LUTE Achievement Rules

The first object and corresponding class we look towards is the LUTEAchievementRules. This object and relevant class is required to be in your game for Achievements to function correctly; this also includes the use of the LUTEAchievementSignalReciever class/component as well.

image

Together these components handle the actual functionality of your Achievement system. They handle managing exisiting Achievements, unlocking Achievements and contain the rules that define the LUTEAchievementList itself. The signal listener is simply listening for events that are called in various places by the Achievement system and acting in response (such as informing the display system when an Achievement is unlocked and therefore needs to show this on a Canvas).

LUTE Achievement List

The LUTE Achievement Rules requires a list of Achievements to function correctly! You can create your own list by using the right-click asset creation menu and heading to: LUTE>Achievement List or you can simply duplicate an exisiting Achievement List (just ensure you define an ID for the list that is unique).

image

LUTE Achievements

The Achievement List is a list of Achievements which are scriptable objects that contain information of an Achievement. You can override this class using code to define a custom verion of an Achievement or extend the functionality of the base Achievement. Basic Achievements are defined by:

  • A unique ID which is defined by the user.
  • Their type (either Simple or Progressive (i.e., an Achievement that simply gets unlocked or requires an amount of progress to be achieved before unlocking).
  • Display options including their name, description and visual options.

image

You can create these Achievements by using the right-click asset creation menu and heading to: LUTE>Achievement. Then you can fill your Achievement List with a series of these Achievement objects.

Displaying the Achievements

You can display Achievements in two ways:

  1. Displaying them on a pre-built list (which you can customise if you desire, often by duplicating the list object). image
  2. Showing an Achievement Display Item in the game when a player unlocks or progresses an Achievement. image image

These two objects can be found in the Demo scene as children of the 'Achievement' object. The Canvas used to display the list uses a pre-defined class to fill the list with the Achievements and update their style when they have been progressed or unlocked and the Achievement Display object uses a class to listen to similar events and then create a simple canvas object which fades over time. You can customise these further (often by duplicating these objects or their relevant prefabs).

Using Achievements within Orders

Current there are four Orders that relate to our Achievement system:

image

  1. Create Achievements List Button will create a button that when pressed opens the Achievement List in game; if there is no list in the game or canvas, the Order may return false or create these aspects for you.
  2. Progress Achievement will simply progress an Achievement provided an ID has been supplied. You can choose whether to 'Set' the progress or simply add to the progress. If an Achievement is already unlocked and we have reached maximum progress then nothing will occur. If the Achievement's current progress is higher than the 'Target Progress' the Achievement will unlock.
  3. Show Achievement List will simply show the Achievement List in the game. If there is no list provided or none found in the scene then this will return false. If there is no Canvas to render the List then this is often created at runtime.
  4. Unlock Achievement will simply unlock an Achievement based on the ID supplied. If the Achievement is already unlocked then no action will occur. You should ideally have a list and Canvas Display for Achievements already in the scene but often these can be remedied during runtime operations.

Saving Achievements

If you are using the save system provided by LUTE, the Achievements will be saved whenever an action occurs for an Achievement. For example, if an Achievement is unlocked, the save system registers this and will load the saved status of all Achievements upon the game starting up again. This ensures that when a player unlocks an Achievement and restarts the game that the Achievement List will correctly be populated based on the save file.

Clone this wiki locally