Discord Presence in GameMaker Studio 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone welcome back to game maker cast it's mickey and in this video tutorial we're going to be taking a look at a free plugin that allows us to advertise our game on discord through the use of clicking on a profile you can see that i've been running game maker studio 2 for 6 minutes now let me switch over and run my program and with my program running if someone were to click on my name you can see that i'm working on game maker cast tutorials i'm on level one three fighting a main boss and every couple seconds you can have this update you can see i'm on 1.1 and fighting a main boss or you can do every other and you can do it whenever the user switches levels so we're going to be taking a look at this so let's roll the intro and let's get right into it so i'm going to be taking you from all the steps and creating an application and then advertising for it so i'll have the link to this discord applications in the description but what we'll want to do here is create a new application now you want to make sure that your game isn't already in here and you can contact the developer support if you're very sure that your game is not already in here we can go ahead and add it so let's just actually add a simple one as an example we'll say tutorial and uh sure landing page and i'm gonna hit create here and now we're on this page here we can give it an application icon so i'll go ahead and i'll upload that and in here we can give it a description and then we can also change the name so i'll just say description in here and basically what you want to do is you want to make sure that this client id and the secret and public key well the publicly is fine but the client and the secret you never really want to let out to the public i'm okay with doing this in this video because i'm going to delete it once we are all done so i'm going to save my changes and then the next thing i want to do is go down to rich presence you can see we have art assets here so i want to choose a cover letter again i'm just going to upload my logo here once we have my logo i'm going to add an image so i'm going to add this logo dark padding now one thing to make sure i'm going to hit save changes and you can see it's uploaded now there's a good chance that if you hit refresh like i'm going to on this page you won't see the art asset there and it's basically due to caching so we need to give it a couple minutes to show up so while we're waiting for this to show up let's switch over to github and check out the plugin now the plugin that we're going to be using again is a free plugin it's called neko presence and it's by nk rapidvin sorry i have totally made that name bad so anyway this person here check out the repository again this will be linked in the description below but basically what you want to do is you have a whole bunch of files here you can ignore these unless you feel like building from the source otherwise you want to go over to releases and you want to grab the one that you are using in game maker studio so i'm using game maker studio 2.3 so i want to make sure that i download this one right here now once that's downloaded let's open a new project in game maker studio and let's import it so i have my brand new project here and i'm going to go to tools and import my local package i'm going to go over to my downloads and make sure i choose this guy here once it's open you can see we have an extension and the object i'm just going to go ahead and add all of them in now i want to make sure i go to my room which you can see has nothing in it and i'm going to put that presence object the demo in here now let's switch over and open up the demo and check it out so the very first thing is initialize discord you can see that it takes a discord app id so that means we need to copy in our client id here so let's do that now and then if i expand this a little bit we're not using any steam id so i'm going to leave that blank now in the create sorry in the step update there's absolutely nothing except this black box which basically goes to discord and updates the information i'll skip over the key press escape because we know what that does when we're loading an image you can see that just sets the sprite index to whatever the image id is and basically this is going to discord to check to see if we have an avatar and it will load it in as the sprite the social event is what we really care about i'm going to expand this so we can see what we're working with so we can see that once everything is ready so discord is ready it sets the timestamp so that knows how long we're currently playing our game it also sets some information so we have some small text some large text and then we have some state and details so i'm just going to go ahead i'm i'm going to run this program now because i'm already in discord we should see my image come up and that means when i go over to discord and i click on my name you can see that we are using tutorial page landing or sorry tutorial landing page and which is what we made our application then we have this is some details and this is a state so what we want to do is play with those two so once again we'll close this go back to game maker and you can see that we can change this to say something like level three one and we could say fighting a boss or gaining experience now this icon here it actually refers to the icon that we uploaded so let's switch over to the developer console and discord and see if our images have been cached so i had to pause the video i switched back to discord and nothing had been cached yet so it probably took about 10 minutes for this image to show up but let's carry on so we want to copy this image here and if we go back to game maker studio we can change this icon to be that particular image so let's run the program again and once it's running let's go up into discord and let's click on my name and you can see we can now have the image we have the landing page we have the level we're gaining experience the other cool thing that we could do is we could also play around how this is going to look so if you bring up the developer dashboard again and we go down to visualizer you can see that we have all this stuff here so if we want to know how those things would look we could do something in here and let's just put in some information so you can see how everything kind of just falls into place here so it gives you a quick idea of how to get it going and you can see that which is a simple extension we already have everything we need so the one thing just to make sure is if you're looking to update it all we really need to do is use the set presence in the demonstration all i did is i created a level or i should say a line one variable and a line two and then all i did is in an alarm i'll say alarm zero i set line one to say let's just choose a random range between zero and 360. and then i went in and i looked at the social capture here and i'm just going to copy what i have here and in my alarm 0 i'll just set it and i will say this is going to be equal to the string version of line 1 and then we have to set our alarm again and then once again i want to make sure i set this on the create event and i know i'm not using line two there so if everything is set up i would probably have this as persistence so it just continuously runs throughout the game and now that i run everything as long as i have not made any errors and i switch over to discord you can see that we are gaining experience and you can see our level is switching every couple seconds now i probably wouldn't do this every couple seconds like i'm doing here as you'll probably run into a problem where you are using up too much of the api and you will probably get kicked for a little bit before you can get back on anyway that is the quick plug-in and want to show you how awesome it is once again i'll have all the links in the description below and thank you for watching again thank you everyone for watching and a special shout out to the following patreon users for their continued support paul edward victor jujube84 robert annie ian andrea and vil thank you all so much for your continued support if you have a request please leave it in the comments below and remember you can find all of the information in the description of the video thanks again
Info
Channel: GameMaker Casts
Views: 808
Rating: undefined out of 5
Keywords: tutorial, gamemaker studio, gamemaker, gamemaker studio 2
Id: Bo85wIoF8gI
Channel Id: undefined
Length: 7min 56sec (476 seconds)
Published: Wed Dec 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.