Be better than "killed 10 rats"
Introduction
Achievements are a simple and traditional feature for games that can help drive player engagement. While they are simple to implement (make work) coming up with a good achievement design is not so simple. You could of course 🤮 forth random achievements like "Played 15 min", "Logged into the game", "Pressed the spacebar"; but these are often time harmful to the game not helpful. ​ First understand that not every game needs achievements, that if your going to have achievements that they should be part of the game and not an afterthought you bolted on because why not. Meaningless achievements can harm the user experience by breaking immersion or simply drawing attention away during gameplay. Follows are some ideas for meaningful achievements and how you might tie those achievements into other aspects of your game.
New Player Experience
Think of your achievements like a meta quest ...
A meta quest, (that is a quest for the player not the character in game world) to learn your game. To encourage them to explore the features and functions of your game in a structured manner and to offer some non-gameplay impacting reward for doing so be that a trophy (achievement) alone or possibly also unlocking additional areas of the game where the achievement state lets you know if they have unlocked it yet. ​ For a practical example of this see DOTA 2's "New Player Experience" aka "Welcome Quests" where they present "quests" for new players to do simple things like open menus, use features, review information, play each of the game modes, etc. Importantly this is not hidden from the player it's presented to the player in the menus' just like a quest, showing what steps are yet to be done and which have been done.
Tutorial
The best tutorials fun and engaging parts of the game that happen to also teach the player mechanics, concepts, demonstrate tactics and strategies and more. Similar to the New Player Experience approach you can use Achievements as a means to draw attention to these instructions and reward their completion without forcing the player into them.
Item Rewards
Steam Inventory is a huge topic unto its self that needs its own guide. The overlay with Achievements is that you can restrict eligibility for Item Promotion drops based on unlocked achievements. You can use this with New Player Experience or Tutorial style achievements to award in-game items for completing the tasks.
Collectors
There are many types of players and a common one across all game genres is the "Collector" this is a type of player that likes to "100%" the game. Be carful to not bloat your game with meaningless achievements as this will simply frustrate the collector but do make sure to track and reward them for fully exploring your game.
Creating Achievements
Achievements like stats are created in your Steam Developer Portal, once created there you can access them via their ID, if your use Heathen's Steamworks ... which why aren't you it has a free version. Then you can import your Stats and Achievements into Unity or use our AchievementData structure to easily work with your achievements in code. ​ Valve's own documentation on the Stats and Achievement features is a good place to get started.
Quick Start
Log into your Steam Developer Portal and access your app's admin page. Look for the Technical Tools section and select the Edit Steamworks Settings option.
From there select the Stats & Achievements > Achievements option and create your new achievements. Make note of the value you use in the API Name field. You will use it when working with achievements in code. In Unity if you prefer to work with Achievements via an object reference then you can use our AchievementObject which is a Unity ScriptableObject that can be referenced and accessed like any other Unity Object.
Using Achievements
Heathen's Steamworks makes working with Steam achievements a trivial task and gives you multiple ways to work with them depending on your preference for "code-free" or "in-code" workflow.
Using Object References
A typical and comfortable approach for many Unity developers is to use an object reference. Heathen's Steamworks can import your Stats and Achievements from Steam creating ScriptableObjects that you can reference as you would any other Unity object. ​ To do this you first need to have Steamworks Foundation or Steamworks Complete installed and configured to work with your app by using the Game Object initialization method. With that working you can press Play in Unity Editor to start the simulation and allow Steamworks to initialize. Once it has been initialized you can select your Steam Settings object in your Assets folder, expand Achievements and click Import.
When completed all of your achievements will have been imported and listed by their API name, you can now expand the Steam Settings object in your Asset folder and see each achievement listed under it. These are Scriptable Objects of type AchievementObject.
You can create references to these and use them in typical Unity MonoBehaviour scripts as you would other objects.
The example above is showing you how you would create a reference to an achievement object. the field added at the top of the class would create a field in Unity Editor's Inspector for this script that would let you drag and drop an AchievementObject to it.
​
The Start method in the example is simply a crude example of checking if the achievement is achieved or not. You can simply set this value 'IsAchieved = True;' to unlock or lock it.
Using Value Types
A typical and comfortable approach for many Unity developers is to use an object reference. Heathen's Steamworks can import your Stats and Achievements from Steam creating ScriptableObjects that you can reference as you would any other Unity object. ​ To do this you first need to have Steamworks Foundation or Steamworks Complete installed and configured to work with your app by using the Game Object initialization method. With that working you can press Play in Unity Editor to start the simulation and allow Steamworks to initialize. Once it has been initialized you can select your Steam Settings object in your Assets folder, expand Achievements and click Import.
The above example does the same as the prior but works without any references. It demonstrates the use of the AchievementData structure. This is often preferred by developers who are more comfortable in C# than in visual editors and for projects that are DOTS based or otherwise looking to reduce the number of objects and references in the project.
​
You of course do not *have* to do this in a MonoBehaviour we did that in the example just as an example that a dev might be used to seeing.
Using Heathen API
Heathen's API is built on top of Steamworks.NET and styles the endpoints of Steam API to be more in line with C# standards and Unity patterns. The result is a much simpler and easier to use API but that very closely matches the raw Steam API for those more accustom to it.
Comentários