How to Add Achievements to Your Game // Steam Achievements in Unity Indie Game

  Рет қаралды 30,826

AuroDev

AuroDev

Күн бұрын

Пікірлер: 122
@RazyMon
@RazyMon Жыл бұрын
Ubisoft: This is too hard, I shall ignore it.
@richardmedzihradsky7952
@richardmedzihradsky7952 Жыл бұрын
I'm making my own game and this is exactly what I was looking for. Straight to the point, clear explanations, showing an example... Will definitely check out other videos! :)
@AuroDev
@AuroDev Жыл бұрын
Thanks, best of luck with the game! :)
@Game_Studio-w9p
@Game_Studio-w9p 7 ай бұрын
​@@AuroDevhey, I've followed the tutorial but it doesn't work the achievement section is not checked in steamwork :( please help me 😥😥
@funasylumstudio
@funasylumstudio 5 ай бұрын
Thanks papito, you're the clearest Steam dev guide on the KZbins. Also the fact that you gotta have images for every achievement is insane lol.
@maddogmccree88
@maddogmccree88 4 ай бұрын
Honestly, Auro has been the best game dev youtuber I've seen around with so many specific useful videos and tutorials for key research results of indie devs. You are the reason I created a new playlist on youtube called "GameDev" haha, thanks man keep it up and subbed as well
@AuroDev
@AuroDev 4 ай бұрын
Thanks for the very kind words! Best of luck on your gamedev journey :)
@maddogmccree88
@maddogmccree88 4 ай бұрын
@@AuroDev
@kitai_k
@kitai_k 11 ай бұрын
I'm korean indie game developer. Your video is so helpful. Thanks you.
@VyvyanTheGreat
@VyvyanTheGreat 8 ай бұрын
You're such a wonderful resource for this sort of thing - I always come back here when I forget how to do this! Thank you!
@Ivcifer
@Ivcifer 2 жыл бұрын
the dog kek thanks for teaching us, auro! I had no idea this integration was this simple.
@AuroDev
@AuroDev 2 жыл бұрын
Happy to hear it was helpful! And nicely spotted, I don't think many watched till the very end :D
@abnejne4737
@abnejne4737 5 ай бұрын
Great video! My game has been out for almost a year now, and many people have been asking for achievements. So, this is just the video I need to get started.
@KevinTramp
@KevinTramp 4 ай бұрын
Wonderful video ! I'm able to make my indie game thanks to you ! Easy to follow and clear. Good job !
@jonathanlorenz-indiedev
@jonathanlorenz-indiedev 2 жыл бұрын
Straight to the point! Great video, thank you!
@AuroDev
@AuroDev 2 жыл бұрын
Thanks! :)
@banjolasse6169
@banjolasse6169 11 ай бұрын
Excellent video! Got steamworks and achievements working within the hour.
@Fubiou
@Fubiou Жыл бұрын
Thank you very much, there is one more grateful one here!
@MadoLeoss
@MadoLeoss 2 жыл бұрын
I tried to copy your code but it didn't work at 3:57 there is no [Button] on my side. "Button couldn't be found" Is there a namespace that you didn't show? Would be good to see the entire file....
@AuroDev
@AuroDev 2 жыл бұрын
Ah yes, sorry about that! The [Button] tag is from Odin Inspector asset and it creates a clickable button in your inspector view. So it is actually not needed at all for the achievement functionality and just helps a bit with testing. So you can just leave out the [Button] tag and use f.ex. a simple UI button which calls the method, if you want to test it out.
@Arturnicus
@Arturnicus 3 ай бұрын
Calling the functions from the video by a UI button directly won't work. You first gotta make a wrapper function where the ACH_Testing id is defined and then call that with the button. like: public void CheckAchievement() { IsThisAchievementUnlocked("ACH_Testing"); }
@imrandurrani6817
@imrandurrani6817 2 жыл бұрын
Love you from Afghanistan you are creating great content
@AuroDev
@AuroDev 2 жыл бұрын
Thanks! :)
@jindrichsander9555
@jindrichsander9555 2 жыл бұрын
you still alive?
@itsmethedog3718
@itsmethedog3718 Жыл бұрын
Really good video, I'm not even a game dev, I just got curious about the process to add achievements to games.
@AuroDev
@AuroDev Жыл бұрын
Nice to hear! :)
@branidev
@branidev 2 жыл бұрын
I struggle little bit with all of that pictures Steam wants but your video help me a lot, so finally my game is on Steam as well ;) And this video will be definitely helpfull when i gonna decide add Achievements, Great content Auro ;)
@AuroDev
@AuroDev 2 жыл бұрын
Awesome, congrats on the release! :)
@branidev
@branidev 2 жыл бұрын
@@AuroDev not released yet gathering now wishlists
@AuroDev
@AuroDev 2 жыл бұрын
@@branidev Oh right, misread that! Well, best of luck heading for the release :D
@Ant0n009
@Ant0n009 Ай бұрын
Thanks Auro, this is super helpful. Any chance you can make a similar video on any tips for Steam Deck compatibility?
@wufflespuffs3744
@wufflespuffs3744 2 жыл бұрын
Ooo extremely useful to see for someone like me - Just starting out haha! Thank you!
@AuroDev
@AuroDev 2 жыл бұрын
Awesome! :)
@KevinTramp
@KevinTramp 4 ай бұрын
💡For anyone who doesn't understand at 3:57 the [Button] in the script. Just make 3 real buttons (right click in your hierarchy → UI → Button) and in the button component, just add those functions seen in the video. 💡
@Arturnicus
@Arturnicus 3 ай бұрын
No the functions from the video can't be called by a UI button. You first gotta make a wrapper function where the ACH_Testing id is defined and then call that. like: public void CheckAchievement() { IsThisAchievementUnlocked("ACH_Testing"); }
@Amelia_PC
@Amelia_PC 2 жыл бұрын
Achievements are always cool, mainly when it's a funny achievement (silly trophies are the best).
@AuroDev
@AuroDev 2 жыл бұрын
Agreed!
@firebiscuitgaming7624
@firebiscuitgaming7624 2 жыл бұрын
For achievements I used scriptable objects with each of them having a dedicated method for verifying their state. Then using facepunch I fetch the list of all the available achievement and load the ScriptableObjects matching achievement ID into a list. On game state update (not unity update) I run through that list and ask achievements to check their own state. This could be done on unity event too if needed.
@AuroDev
@AuroDev 2 жыл бұрын
Interesting! Do you have plans for some special interactions in the game if the player has unlocked achievements? Since trying to unlock the same achievement twice doesn't seem to have any downsides, I was thinking I'll only need the unlocking method in my game (I have no plans to add additional functionality around achievements). I'm curious to hear if you see some extra benefits of doing it your way over a very minimalistic implementation like what I showed in the video?
@firebiscuitgaming7624
@firebiscuitgaming7624 2 жыл бұрын
@@AuroDev I went with that specific approach because I wanted the achievement ScriptableObject be in charge of unlocking themselves when their conditions have been fulfilled. Using SO also allowed me to have achievements that share similar code but different parameters (for example coding an achievement for completing a tutorial and having 1 SO per tutorial to complete). The reason why I fetch the achievements from Steam first is indeed to avoid double unlocks. I'm running the achievement evaluation code as a result to game state change and not in a co-routine, so didn't want to evaluate already-unlocked achievements unnecessarily. But if I designed it such that they would run in a coroutine then I would need a copy of my game state or something which would complicate a bunch of other things too :)
@AuroDev
@AuroDev 2 жыл бұрын
@@firebiscuitgaming7624 Sounds reasonable! Always interesting to hear about different ways to implement things :)
@captainnoyaux
@captainnoyaux 2 жыл бұрын
Seems cool ! Do you mind sharing a sample ? Thanks for the explanation though !
@Fireball_Roberts
@Fireball_Roberts 2 жыл бұрын
Everything seems to work on my end. Thanks!
@Jhordi
@Jhordi 10 ай бұрын
Great video! I have a couple of questions, as a Dev with access to Steamworks, is it possible to see the Steam users that earned certain achivements of your game? Does Steamworks track those?
@AuroDev
@AuroDev 10 ай бұрын
Thanks! I don't think you can track the individual players who have unlocked an achievement. Not 100% sure though. Steam has a web API with some additional features so that might be worth looking into.
@ryanmcquiston8969
@ryanmcquiston8969 Жыл бұрын
I'm having an issue with the public void UnlockAchievement(string id) part. "There is no argument given that corresponds to the required formal parameter 'id' of 'SteamIntegration.UnlockAchievement(string id)'" I'm so confused.. is there a Facepunch.Steamworks namespace I am missing or something?
@ilonpilaaja
@ilonpilaaja Жыл бұрын
Hyvä video :D
10 ай бұрын
Thank you!
@1gammis
@1gammis 8 ай бұрын
Love the ach pic 😊
@Henry-ip8dd
@Henry-ip8dd 6 ай бұрын
I'm having a problem with the [Button] It is giving me an error of "The type or namespace name "Button" could not be found (are you missing a using directive or an assembly reference?)" I'm using VS 2022
@AuroDev
@AuroDev 6 ай бұрын
The "[Button]" line isn't actually needed. It's from Odin Inspector and it just makes it quicker to test the method with an inspector button. You can safely skip that part and call the method some other way.
@stigmamax9996
@stigmamax9996 Жыл бұрын
Merci pour ces infos
@herbi467
@herbi467 7 ай бұрын
Kiitos!
@Bishmanrock
@Bishmanrock 2 жыл бұрын
I'm getting a Steamworks.Data not found in the Steamworks namespace, has anything changed does anyone know?
@mantavisions2362
@mantavisions2362 2 жыл бұрын
he's using facepunch, so if you are using regular steamworks dot net then its a different line of code. I did this: public void UnlockAchievement(string id) { if(!SteamManager.Initialized) { return; } SteamUserStats.SetAchievement(id); SteamUserStats.StoreStats(); } }
@Bishmanrock
@Bishmanrock 2 жыл бұрын
@@mantavisions2362 Thank you! I did hear Facepunch mentioned in the video but didn't realise it was reliant on it. Thanks for the code!
@legendforever1454
@legendforever1454 2 жыл бұрын
Thanks bro
@AuroDev
@AuroDev 2 жыл бұрын
No problem!
@RayMax1
@RayMax1 4 ай бұрын
great
@Dailyfiver
@Dailyfiver 3 ай бұрын
when I have an "ahc.Trigger();" line, how do I tell it which specific achievement to unlock?
@AuroDev
@AuroDev 3 ай бұрын
When you define "ach" variable on the line above ("new Steamworks.Data.Achievement(id))", you need to refer to the correct ID of your achievement. The trigger method then doesn't need any input anymore.
@Dailyfiver
@Dailyfiver 3 ай бұрын
@@AuroDev OOOOOH thank you so much
@SimonSlav-GameMakingJourney
@SimonSlav-GameMakingJourney 2 жыл бұрын
Are you planning to use achievements to track the player's progression?
@AuroDev
@AuroDev 2 жыл бұрын
Not specifically for that reason (I am planning on using Steam Stats for that), but I'm sure checking the completion% of the achievements now and then can give some good indication how the game is being played.
@CryT4x
@CryT4x Жыл бұрын
04:30 how do u get the right window in unity? like how did you make the buttons. If i write "[Button]" it doesn't recognize it :c
@AuroDev
@AuroDev Жыл бұрын
It is a package called Odin Inspector. You can have the same effect by just calling the method though as the [Button] just makes the method easily callable from the inspector tab in editor.
@Overdrink7
@Overdrink7 Жыл бұрын
Thanks a lot
@IDrankALavaLamp
@IDrankALavaLamp 6 ай бұрын
You can lose an achievement?
@BertuhDev
@BertuhDev Жыл бұрын
Aghhh, I am becoming crazy. Your videos are good dude, such effort-well explained, but can't manage to made it work. It works for the Steamworks example, i can give archievements for that. But with my game achievements are just not working and i don't get to the point D;
@Shrink_Assault
@Shrink_Assault Жыл бұрын
Same, i can't get steam to actually unlock the achievement or pop up. Edit: For some reason, creating a new achievement fixed the issue.
@iannnavas
@iannnavas 2 жыл бұрын
Thank you so much for this video! It helped a lot! Can I ask you a question? Would you intend to make a video about "Achievements localization" 🙂? I have no idea about what that means and it would be interesting to understand WHAT is that and HOW TO DO that. 🙂
@AuroDev
@AuroDev 2 жыл бұрын
I am happy to hear that! :) Maybe at some point I could do a video about localizing achievements. By localizing achievements, you can have the player see the achievement in their own language, f.ex. german instead of the default English language. It's fairly simple to do and Steam has a separate section for it in the backend settings. With a lot of languages it can just be a bit tedious to do :D
@iannnavas
@iannnavas 2 жыл бұрын
@@AuroDev Hahaha got it! Thanks for this explanation! 🙂
@Armaan8014
@Armaan8014 Жыл бұрын
For some reason the achievements are only unlocking on Windows, not Mac. Could anything in this code be Windows - only?
@AuroDev
@AuroDev Жыл бұрын
I haven't tried them with Mac. It might be worthwhile to check the Facepunch.Steamworks wiki or the support thread for it on Steam's dev forums to see if anyone else has run into this issue.
@fred_proenca
@fred_proenca Жыл бұрын
I'm having the same problem! Have you found out why? Thank you
@Daniel-gb9yk
@Daniel-gb9yk Ай бұрын
Facing the same problem, has anyone found out why? Thanks a lot!
@_thatguymark_
@_thatguymark_ Жыл бұрын
That doesnt seem like the full picture. Is that behind a patreon sub? Initalise code do we put that where it cant be destroyed on load. the button two does that code go onto the objects that trigger the achievement?
@RoboDev-mn1gg
@RoboDev-mn1gg 2 жыл бұрын
Hi, if I don't want to publish steam page but only test steamworks api features in unity with opened dev steam account, is it possible to test achievements? I'm afraid that when I click "publish to steam", my steam page will be published so I don't want it. I clicked only "save" button at achievements steamworks page but in unity when I invoke achievement status, status is still "false" .
@AuroDev
@AuroDev 2 жыл бұрын
You will need to publish the changes in Steamworks (not just save) before they come into effect. Maybe worth verifying as I am going from memory, but publishing the changes won't publish your steam page - you need to separately publish the steam page in your app's overview before it becomes public.
@Feinei
@Feinei 2 жыл бұрын
I don't know what is going on, but the UnlockAchievement part isn't working. Everything else works fine, but if I check if it's unlocked, it returns false, then I click unlock, the code runs and I get the debug.log message saying it was unlocked, and then when I check again, it still returns false
@AuroDev
@AuroDev 2 жыл бұрын
Hmmh weird... I don't remember encountering an issue like that. If you made sure there isn't a typo anywhere, my first guess would be that the new value didn't get sent to Steam servers for some reason. Unfortunately I don't have any specific solution in mind for the issue, but I would first double check everything for typos and then somehow verify that the connection from your game to Steam is working properly (try to print your friends list for example).
@Feinei
@Feinei 2 жыл бұрын
Yup, it seems the steam servers weren't updating properly. I noticed that despite them being implemented they werent showing up on the store page so I decided to give it some time. Now without changing anything it's all working properly Cheers for the video mate, it was very helpful, and the one on facepunch integration too!
@valentijnrecord5348
@valentijnrecord5348 2 жыл бұрын
@@Feinei Same problem, I’ll try again tomorrow then
@muscatalexj
@muscatalexj Жыл бұрын
Great stuff. How would you go about triggering an achievement when a player enters a collider?
@overcookedwalrus4482
@overcookedwalrus4482 Жыл бұрын
You could use the function void OnCollisionEnter() and use a box collider with the on trigger check mark clicked... then in the oncollisionenter function trigger the achievement!
@halotroop2288
@halotroop2288 Жыл бұрын
Why does everything in Steamworks only seem to have tutorials for Unity, or Source 2013 (from Valve, in 2013) if at all?
@williamhiciano394
@williamhiciano394 Жыл бұрын
how do i go about testing my achievements if my game is still not out? you cant set up achievements in a demo or playtest :/
@AuroDev
@AuroDev Жыл бұрын
I believe you can already test them before the game is out. As long as the Steam integration works, you should be able to trigger the achievements and then check if your player id has unlocked them or not.
@williamhiciano394
@williamhiciano394 Жыл бұрын
@@AuroDev hey thank you for answering, ove tried when i put the app id of the main game, i get a null reference, but when i put the id of the demo or playtest i cant unlocj the achievement, but im able to get my steam name and even my friend list and print it in the console
@AuroDev
@AuroDev Жыл бұрын
@@williamhiciano394 Ah yea, if you have a separate demo app id, you can't use that to unlock achievements from the main game. You would need to have separate achievements for the demo app to unlock achievements in the demo.
@williamhiciano394
@williamhiciano394 Жыл бұрын
@@AuroDev hey, i been checking out and apparently there is no way of adding achievements on a demo or playtest, the options to add it is just not there, just wondering if there is another way of testint that out
@AuroDev
@AuroDev Жыл бұрын
@@williamhiciano394 I checked that I never added achievements to my demo (but I can see the section where I could add achievements to the demo) so I don't have more in-depth experience about this. Asking from Steam support is a good idea - they can be very helpful at times.
@zachwise476
@zachwise476 6 ай бұрын
I now understand what people mean by: Bedroom eyes.
@funasylumstudio
@funasylumstudio 5 ай бұрын
It's weird, after I added Steam Achievements, it still says "number of achievements: 0". Anyone know why that is?
@maxpetersson4177
@maxpetersson4177 11 ай бұрын
Is there an event that fires when the user connects and or disconnect?
@ThescreamingRooster
@ThescreamingRooster Жыл бұрын
i know this was made a while ago but... where do you put the script?
@AuroDev
@AuroDev Жыл бұрын
Doesn't matter, as long as it's included in the scene (or you could also make it static I suppose). So feel free to throw it on any object!
@ShayanMemon
@ShayanMemon 11 ай бұрын
can you make video for how to add trading cards
@AuroDev
@AuroDev 11 ай бұрын
I might make one when I add trading cards for my next game.
@ShayanMemon
@ShayanMemon 10 ай бұрын
@@AuroDev OK BRO I AM WAITING I WANT TO KNOW HOW TO ADD LEVEL XP TRADING CARD ON STEAM GAME I REALLY NEED YOUR HELP THIS ONE
@reessoft9416
@reessoft9416 10 ай бұрын
@@ShayanMemon He's not here to make videos just to please your own personal requests. TURN YOUR CAPS LOCK OFF, and stop acting like a petulant child. Act like a programmer, and go and do some research, so that you can solve the issue yourself.
@ReeceMcQuoid
@ReeceMcQuoid 11 ай бұрын
does this also apply to games made in 'game guru' i understand game guru is an extremely rudimentary game development tool, but im brand new to this and was wondering if i was able to add achievements if using game guru
@AuroDev
@AuroDev 11 ай бұрын
I'm not familiar with game guru, but the process is very likely to be different than what I show in this video. Probably best to check if there is a gameguru focused wrapper for Steam integration (or just find out how other devs in gameguru handle it).
@awidawiujdhawdawdaw9251
@awidawiujdhawdawdaw9251 2 жыл бұрын
Instead of triggering it by a button, how can I trigger the achievement when the scene starts?
@AuroDev
@AuroDev 2 жыл бұрын
You just call the method within your code. Maybe if your scene has some script that only that scene has, you could call it in the Start().
@awidawiujdhawdawdaw9251
@awidawiujdhawdawdaw9251 2 жыл бұрын
@@AuroDev thank you for that. I have another question, how would i be able to grant an achievement once a player has reached a certain play time?
@AuroDev
@AuroDev 2 жыл бұрын
@@awidawiujdhawdawdaw9251 You would need to track the playtime either through your own code or through Steam integration and then when the time reaches a specific point, trigger the achievement.
@Syktat
@Syktat Жыл бұрын
I searched for this out of curiosity but i didnt expect elon musks skinwalker to teach me this...
@AuroDev
@AuroDev Жыл бұрын
Best elon comparison I've gotten :D
@emersonferreira5753
@emersonferreira5753 2 жыл бұрын
steam leaderboard, please? :)
@AuroDev
@AuroDev 2 жыл бұрын
Hmmh, maybe at some point! I haven't used it myself yet. But if I do, I can definitely make a video about it!
@emersonferreira5753
@emersonferreira5753 2 жыл бұрын
@@AuroDev Ok, Thanks! :D
@rinatennouji5988
@rinatennouji5988 Жыл бұрын
Imagine you got achievements in real life.
@AuroDev
@AuroDev Жыл бұрын
"Last Day On Earth unlocked"... Could be terrifying :'D
@bjornlouer3185
@bjornlouer3185 Жыл бұрын
Your video is not fully! you post [Button] when i copy your text its missing the [Button] what must i enter above the script you didt show that.
@AuroDev
@AuroDev Жыл бұрын
Sorry about that. The [Button] is from Odin Inspector package and simply makes it easy to call the method from the inspector window. It is not needed for the achievements.
@JEMsTv_
@JEMsTv_ 2 жыл бұрын
Why does he remind me of Elon Musk? lol
@AuroDev
@AuroDev 2 жыл бұрын
Well, it's not for having too much money at least :')
@oleksandrmartysh85
@oleksandrmartysh85 11 ай бұрын
Useless video! There is no 'Steam.Data' class in Steam SDK.
How to Upload a Game to Steam - Step by Step Guide
11:45
AuroDev
Рет қаралды 125 М.
I Added Achievements to my Indie Game!
12:04
BenBonk
Рет қаралды 50 М.
How much Money my Game made (1 month)
13:48
AuroDev
Рет қаралды 21 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Creating a Polished Roguelike in 10 days?!
9:31
IDKBOX
Рет қаралды 50 М.
How To Award Steam Achievements In Your Unity Game
8:00
Dapper Dino
Рет қаралды 32 М.
The Art Of Video Game Achievements
12:05
Foekoe
Рет қаралды 543 М.
How to Start Making Games with No Experience
10:55
Goodgis
Рет қаралды 205 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 747 М.
How to Market Your Game on Steam
21:57
Noclip Crew
Рет қаралды 40 М.