00:00
00:00
Newgrounds Background Image Theme

piratefmxo just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Newgrounds.io Help & Support

74,885 Views | 172 Replies
New Topic Respond to this Topic

Response to Newgrounds.io Help & Support 2025-01-02 01:16:04


Here's a test program: https://www.newgrounds.com/projects/games/6333685/preview


All APIs work except for "CloudSave.setData" because it performs a POST. The JS console shows the CORS errors.

To address that, the fix needs to be on the server. Something like this on the header:


Access-Control-Allow-Origin: https://uploads.ungrounded.net 


At 1/2/25 12:21 AM, jacklehamster wrote:Do you have an example that works?
Seems using xhr or fetch doesn't make much difference. I think the Access-Control-Allow-Origin needs to be set on the response header from newgrounds.io
At 1/1/25 09:22 PM, PsychoGoldfish wrote:
At 1/1/25 04:47 PM, jacklehamster wrote:Hi there,

Would it be possible to enable CORS for the https://uploads.ungrounded.net domain?
I think we could use the CloudSave.setData method to save games on Newgrounds, but currently that call is blocked by CORS policy. I think it could work if the "uploads.ungrounded.net' domain was allowlisted.

This is the error I got when trying:

Access to fetch at 'https://newgrounds.io/gateway_v3.php' from origin 'https://uploads.ungrounded.net' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'none'. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

fetch is very iffy. you are better off using xhr


Response to Newgrounds.io Help & Support 2025-01-02 01:45:27


At 1/2/25 01:16 AM, jacklehamster wrote:Here's a test program: https://www.newgrounds.com/projects/games/6333685/preview

All APIs work except for "CloudSave.setData" because it performs a POST. The JS console shows the CORS errors.
To address that, the fix needs to be on the server. Something like this on the header:

Access-Control-Allow-Origin: https://uploads.ungrounded.net
At 1/2/25 12:21 AM, jacklehamster wrote:Do you have an example that works?
Seems using xhr or fetch doesn't make much difference. I think the Access-Control-Allow-Origin needs to be set on the response header from newgrounds.io
At 1/1/25 09:22 PM, PsychoGoldfish wrote:
At 1/1/25 04:47 PM, jacklehamster wrote:Hi there,

Would it be possible to enable CORS for the https://uploads.ungrounded.net domain?
I think we could use the CloudSave.setData method to save games on Newgrounds, but currently that call is blocked by CORS policy. I think it could work if the "uploads.ungrounded.net' domain was allowlisted.

This is the error I got when trying:

Access to fetch at 'https://newgrounds.io/gateway_v3.php' from origin 'https://uploads.ungrounded.net' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'none'. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

fetch is very iffy. you are better off using xhr


90% of the time if you get a CORS error in the API, it's probably our server dumping an error page (vs a proper API response) because something was used incorrectly.


I was looking at our error logs and noticed a bunch of cloudsave calls that were not sending a string value, but rather a JSON object. Upon further investigation, I wasn't handling improper data types correct, so instead of getting a helpful API response, you would be getting a generic NG error page, which wouldn't render any CORS headers.


I got that fixed so you're likely seeing proper error responses now. You'll just need to serialize the data you want to save to a string before you post it. You can use whatever string format you want.

Response to Newgrounds.io Help & Support 2025-01-02 02:20:34


Thank you for fixing that! I'm able to use the API to save data now.


At 1/2/25 01:45 AM, PsychoGoldfish wrote:
At 1/2/25 01:16 AM, jacklehamster wrote:Here's a test program: https://www.newgrounds.com/projects/games/6333685/preview

All APIs work except for "CloudSave.setData" because it performs a POST. The JS console shows the CORS errors.
To address that, the fix needs to be on the server. Something like this on the header:

Access-Control-Allow-Origin: https://uploads.ungrounded.net
At 1/2/25 12:21 AM, jacklehamster wrote:Do you have an example that works?
Seems using xhr or fetch doesn't make much difference. I think the Access-Control-Allow-Origin needs to be set on the response header from newgrounds.io
At 1/1/25 09:22 PM, PsychoGoldfish wrote:
At 1/1/25 04:47 PM, jacklehamster wrote:Hi there,

Would it be possible to enable CORS for the https://uploads.ungrounded.net domain?
I think we could use the CloudSave.setData method to save games on Newgrounds, but currently that call is blocked by CORS policy. I think it could work if the "uploads.ungrounded.net' domain was allowlisted.

This is the error I got when trying:

Access to fetch at 'https://newgrounds.io/gateway_v3.php' from origin 'https://uploads.ungrounded.net' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'none'. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

fetch is very iffy. you are better off using xhr

90% of the time if you get a CORS error in the API, it's probably our server dumping an error page (vs a proper API response) because something was used incorrectly.

I was looking at our error logs and noticed a bunch of cloudsave calls that were not sending a string value, but rather a JSON object. Upon further investigation, I wasn't handling improper data types correct, so instead of getting a helpful API response, you would be getting a generic NG error page, which wouldn't render any CORS headers.

I got that fixed so you're likely seeing proper error responses now. You'll just need to serialize the data you want to save to a string before you post it. You can use whatever string format you want.


Response to Newgrounds.io Help & Support 2025-02-02 09:35:58


I'm hesitant to admit how in over my head i am but how does the api interface with game maker studio 2?

I made a game using 95% game maker drag and drop, and decide to put it on here for others to see.

Now i want to add some medals, just some little goofy ones , but i can't figure out the very basics of it.

Currently i just have this script triggered at the start of the game. it's not even compiling without error. what would the appropriate form of this be?


ng_connect(5...9:O...8, M...==);

ng_initialize_medals_and_scoreboard()

ng_request_login()

ng_unlockmedal(Is This Thing On?)


Response to Newgrounds.io Help & Support 2025-02-07 22:29:04


Hello,


I'm trying to make a App.checkSession on my NodeJS local server and apparently the json is working when I use the https://www.newgrounds.io/help/communicating-with-the-server/ form, but when I try doing a POST request on my server, a curl or postman, it keeps returning "message": "Missing required request", "code": 100. Am I missing something?


Body Json. No Params. No Header. No Auth.


Try my Newgrounds Flash Player alternative

BBS Signature

At 2/7/25 10:29 PM, Sonucais wrote:Hello,

I'm trying to make a App.checkSession on my NodeJS local server and apparently the json is working when I use the https://www.newgrounds.io/help/communicating-with-the-server/ form, but when I try doing a POST request on my server, a curl or postman, it keeps returning "message": "Missing required request", "code": 100. Am I missing something?

Body Json. No Params. No Header. No Auth.


Got it, just in case someone needs to fix this, it's because if needs headers 'Content-Type': 'application/x-www-form-urlencoded'. Leaving a little code just in case someone was looking for this solution.


...

const NEWGROUNDS_API_URL = 'https://www.newgrounds.io/gateway_v3.php';
const APP_ID = 'XXXXX:XXXXX';

const { session_id: SESSION_ID } = req.body;

const requestData = {
   app_id: APP_ID,
   session_id: SESSION_ID,
   debug: false,
   execute: {
    component: 'App.checkSession'
   }
  };

	const requestBody = {
		request: JSON.stringify(requestData)
	};

  console.log('POST:', requestBody);

  axios.post(NEWGROUNDS_API_URL, requestBody, {
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
	}).then(response => {
    const data = response.data;
 
    console.log(data);
	console.log(data.result);
	console.log(data.result.data);
	console.log(data.result.data.session);

...

})
   .catch(error => {
    console.error('Error:', error);
    res.status(500).json({ error: 'Error' });
   });

Try my Newgrounds Flash Player alternative

BBS Signature

Response to Newgrounds.io Help & Support 2025-02-17 00:53:16


I remember there being anti-spam features, so I'm wondering how reasonable auto-saves are when a particular user might be triggering 30 per minute or so for a few minutes. It wouldn't be a lot for me to restrict it to a few times per minute, just wondering how necessary.

Response to Newgrounds.io Help & Support 2025-02-17 08:23:32


At 2/17/25 12:53 AM, MSGhero wrote:I remember there being anti-spam features, so I'm wondering how reasonable auto-saves are when a particular user might be triggering 30 per minute or so for a few minutes. It wouldn't be a lot for me to restrict it to a few times per minute, just wondering how necessary.


Every 2 seconds sounds unnecessarily excessive. I’d caution against it even if it didn’t trigger our DDos protection at the user level, it could flag the app ID as being spam if your player base gets big.

Response to Newgrounds.io Help & Support 2025-02-17 18:06:10


hey, im making a longer style game where players may go hours in between earning medals. Ive found in playtesting that after a while the session times out and you can no longer earn medals. Medals in the game are saved locally and re-awarded when booting up the game, so its not the worst thing ever, but I imagine a handful of people might miss this so i wanna squish the issue if I can. It seems like its a known issue, I've found people discussing it years back on the broken medals thread, but can't seem to find a real fix.

im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u

also possible this issue only occurs on the preview version and im just unaware of that, if so sorry lol


check out my games !

BBS Signature

Response to Newgrounds.io Help & Support 2025-02-17 18:14:15


At 2/17/25 06:06 PM, kaiakairos wrote:im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u


There seems to be an issue with the ping command – the session apparently times out even if you keep pinging. It's not just you, and it's not due to incorrect use. PsychoGoldfish is aware of it; see the discussion here.

Response to Newgrounds.io Help & Support 2025-02-17 19:26:40


At 2/17/25 06:14 PM, Ralix wrote:
At 2/17/25 06:06 PM, kaiakairos wrote:im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u

There seems to be an issue with the ping command – the session apparently times out even if you keep pinging. It's not just you, and it's not due to incorrect use. PsychoGoldfish is aware of it; see the discussion here.


thanks for letting me know, glad its gettin worked on. for the time being, is there a way around this? My game has a generic "open the game" medal, i was thinking maybe trying to award that medal every 5 minutes or so could potentially work, but waiting around for an hour to test that is pretty annoying lol


check out my games !

BBS Signature

At 2/17/25 07:26 PM, kaiakairos wrote:
At 2/17/25 06:14 PM, Ralix wrote:
At 2/17/25 06:06 PM, kaiakairos wrote:im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u

There seems to be an issue with the ping command – the session apparently times out even if you keep pinging. It's not just you, and it's not due to incorrect use. PsychoGoldfish is aware of it; see the discussion here.

thanks for letting me know, glad its gettin worked on. for the time being, is there a way around this? My game has a generic "open the game" medal, i was thinking maybe trying to award that medal every 5 minutes or so could potentially work, but waiting around for an hour to test that is pretty annoying lol


Yep, the workaround is just what you're doing - to have your game save data on which medals should be unlocked since you can still save data locally even if the session times out, and make the game send API calls to unlock all of the medals whenever the player loads the game's page. Since people are kind of used to not having medals show up as being earned immediately anyway, there probably won't by many people who notice or mind. Unlocking a medal every 5 minutes probably won't work - we've tried sending commands other than ping (specifically App.checkSession), to no avail.


My newsfeed has random GameDev tips & tricks

Response to Newgrounds.io Help & Support 2025-02-19 13:03:52


At 2/17/25 06:14 PM, Ralix wrote:
At 2/17/25 06:06 PM, kaiakairos wrote:im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u

There seems to be an issue with the ping command – the session apparently times out even if you keep pinging. It's not just you, and it's not due to incorrect use. PsychoGoldfish is aware of it; see the discussion here.


The session issue has finally been fixed, so as long as you're passing a session with the ping command the session shouldn't expire during gameplay anymore

Response to Newgrounds.io Help & Support 2025-02-19 13:09:46


At 2/19/25 01:03 PM, PsychoGoldfish wrote:
At 2/17/25 06:14 PM, Ralix wrote:
At 2/17/25 06:06 PM, kaiakairos wrote:im using 3p0ch's godot 4 ngio script to handle everything. their script does Gatway.ping every 5 minutes to keep the session from timing out, but it doesn't seem to work, even when lowering the timer. If yall know a solution that would be very much appreciated, thank u

There seems to be an issue with the ping command – the session apparently times out even if you keep pinging. It's not just you, and it's not due to incorrect use. PsychoGoldfish is aware of it; see the discussion here.

The session issue has finally been fixed, so as long as you're passing a session with the ping command the session shouldn't expire during gameplay anymore


i saw on the discord!! thank u for the timely fix


check out my games !

BBS Signature

Response to Newgrounds.io Help & Support 2025-04-14 21:51:04


HUHiu_1384288_20972744.png


No. You aren't tripping. This was in fact, written by SpareEnderboy.

Response to Newgrounds.io Help & Support 2025-05-04 09:39:41


At 4/14/25 09:51 PM, SpareEnderboy wrote:HUH


found the ngio.zip i needed and now the api works


No. You aren't tripping. This was in fact, written by SpareEnderboy.


Hello! I'm a newer programmer, and I've been struggling to understand the use of the cloud save/load functions for the Gamemaker 2 API.


The Gamemaker 2 API doesn't have a " Medal.getList " equivalent. So, I want to use the cloud save/load functions to check if a user has gotten certain medals, in order to unlock other medals (without needing to collect the medals in one sitting).


But there isn't much documentation on how to specifically call and use the cloud save/load functions, as well as it's limits (at least as what I could find/understand <:) ).


  • 1.) Do I need to call specific functions in a specific order to initialize a cloud save/load? Like setting up a ini file or establishing the newgrounds connection?


  • 2.) Is there a way to check if a cloud save exist for a user?


  • 3.) What are the differences between ng_loadCloudSave(), ng_pullCloudSaveData(), and ng_loadSlot() / ng_loadSlots()?


  • 4.) Is it possible to do " switch/if...else..." checks with cloud save data? When I tried setting and checking temp variables as the ng_pullCloudSaveData(), I would only pull the default value.


  • 5.) Do I need to do a " if ng_getSlotLoadStatus() == 1 " check in order to save/load a cloud save? Or would I only need to use it to load a cloud save? Or is this only needed for ng_loadSlot()?


  • 6.) Is it possible to save/load as fast, and as much as I want to the cloud (i.e. save/load in step event)? Or do I need to wait in-between saves (i.e. save in create event, then load in alarm event)?


I've been messing around with the cloud save functions for HOURS, and everything I tried has either resulted in 0 changes in the code, or black screen crashes <:(((


At 8/30/25 04:19 PM, SumMadLad wrote:Hello! I'm a newer programmer, and I've been struggling to understand the use of the cloud save/load functions for the Gamemaker 2 API.

The Gamemaker 2 API doesn't have a " Medal.getList " equivalent. So, I want to use the cloud save/load functions to check if a user has gotten certain medals, in order to unlock other medals (without needing to collect the medals in one sitting).


Hello!

I have no experience with Newgrounds.io in GameMaker, but by checking the source, there seems to be a function ng_initialize (alias ng_initialize_medals_and_scoreboard) which performs Medal.getList and saves the result to “medals” variable. But I'm not sure if you can access it from GameMaker script – is there something like that in the library?


I think getting Medal.getList to work would be a better solution than having to manually save & load medal statuses with cloud saves, if it's doable.


You can also try asking this question in the official Newgrounds.io Discord server, which is more active than this topic.


At 8/30/25 04:35 PM, Ralix wrote:
At 8/30/25 04:19 PM, SumMadLad wrote:Hello! I'm a newer programmer, and I've been struggling to understand the use of the cloud save/load functions for the Gamemaker 2 API.

The Gamemaker 2 API doesn't have a " Medal.getList " equivalent. So, I want to use the cloud save/load functions to check if a user has gotten certain medals, in order to unlock other medals (without needing to collect the medals in one sitting).

Hello!
I have no experience with Newgrounds.io in GameMaker, but by checking the source, there seems to be a function ng_initialize (alias ng_initialize_medals_and_scoreboard) which performs Medal.getList and saves the result to “medals” variable. But I'm not sure if you can access it from GameMaker script – is there something like that in the library?

I think getting Medal.getList to work would be a better solution than having to manually save & load medal statuses with cloud saves, if it's doable.

You can also try asking this question in the official Newgrounds.io Discord server, which is more active than this topic.


Thank you for the quick reply! I'm not entirely sure if I would be able to pull the medal list from the ng_initialize_medals_and_scoreboards() function.


ng_initialize_medals_and_scoreboards() doesn't take any arguments, and setting a variable to ng_initialize_medals_and_scoreboards() will only get an " undefined ".


I think I would have to create functions in java (like the GMS 2 api), then import them into Gamemaker to be read. which I have no idea where to even begin with that, since I don't have knowledge on java, or how to take the ng.io api into java to code with.


I only started learning Gamemaker back in late-may early-june, and I only know it's own coding language GML💔


I'll try to check in with the discord soon. Apart of me is afraid they might suggest creating the functions, or not do the idea


Thank you again for taking time out to respond tho! Been tough trying to get help for this specific problem, so getting any suggestion is exciting :D


At 8/30/25 11:51 PM, SumMadLad wrote:Thank you for the quick reply! I'm not entirely sure if I would be able to pull the medal list from the ng_initialize_medals_and_scoreboards() function.


Hi, you're absolutely right, I checked, and you can't interact with the JavaScript library unless you create functions to import into GameMaker.

By the way, since you're learning, Java and JavaScript are two different languages and aren't even very similar. In the context of Newgrounds.io and web scripting in general, it's JavaScript. Java is used mainly for multiplatform executable applications.


At 8/30/25 11:51 PM, SumMadLad wrote:I think I would have to create functions in java (like the GMS 2 api), then import them into Gamemaker to be read. which I have no idea where to even begin with that, since I don't have knowledge on java, or how to take the ng.io api into java to code with.


Yeah, I understand.


For me, it's the opposite; I know the JavaScript you need to call, but getting it to work with GML is the problem. :P


So I took a stab at it, and I think I managed to update the extension with two new functions:

  • ng_is_connected()
  • ng_check_medal(medal)

The first one is to check if you have a valid user session (it's pointless to try to get any information if the user isn't even connected yet), and the second one is what you want, check that a Newgrounds medal is already unlocked.


I didn't add anything to give you the entire list of medals from Medal.getList, because imported functions must return either string or a number, so returning a list of objects would be much trickier. But hopefully you don't have too many medals and it's okay to check them individually.


You can see the project here.


I described some steps to add new functions in the description, in case you would eventually feel confident to try. JavaScript syntax isn't too dissimilar from GML – for example, this is the entire JS I added:


function ng_is_connected() {
  var username = ng_get_username();
  return username != null && username.length > 0;
}

function ng_check_medal(medal_name){   
   // medals are not loaded yet
   if (medals == undefined)
      return "false";

  // find the medal matching the medal_name   
  for (var i = 0; i < medals.length; i++) {
     var medal = medals[i];

     if (medal.name == medal_name || medal.id == medal_name) {         
        return medal.unlocked;
     }
  }
  return "false"; // GML converts this to false. The return type must be string or double
}

Does it look like something you could read and potentially edit?


---


I still didn't want to dig into cloud saves, because it's done differently than the rest of the library, using HTTP asynchronous requests directly from GameMaker, and I'd have to spend a while learning the proper way to do it in GML to be able to help you with that.


But if you try importing the modified extension, does it work for you and help you do what you need?


Also, what would be an example of a medal that relies on other medals? Because perhaps there's a way to do it differently (e.g. if it's score-based, you could load the player's highest score at start and continue with that).


At 8/31/25 09:09 AM, Ralix wrote:
Yeah, I understand.

For me, it's the opposite; I know the JavaScript you need to call, but getting it to work with GML is the problem. :P

So I took a stab at it, and I think I managed to update the extension with two new functions:
The first one is to check if you have a valid user session (it's pointless to try to get any information if the user isn't even connected yet), and the second one is what you want, check that a Newgrounds medal is already unlocked.

I didn't add anything to give you the entire list of medals from Medal.getList, because imported functions must return either string or a number, so returning a list of objects would be much trickier. But hopefully you don't have too many medals and it's okay to check them individually.


OH MY GOSH YOU'RE INCREDIBLE DUDE, THANK YOU SOOOOO MUCH!! To go out of your way to not only make the function for this, but also an example project with an lil' guide!?!?!?!? I really can't thank you enough...

iu_1454376_8706666.webp


At 8/31/25 09:09 AM, Ralix wrote:
But if you try importing the modified extension, does it work for you and help you do what you need?

I was able to just import the modded extension with the "Import Local Package" like the normal GMS2 api. AND IT WORKS AMAZINGLY. IT WAS EXACTLY WHAT I NEEDED DUDE. THANK YOU THANK YOU THANK YOU 🙏🙏🙏🙏


I'm working on a non-online tag fighter for my first game! As I worked on implementing the api, I started to come up for the future medals.


I wanted a medal to unlock after collecting the 4 character combo trial medals. THEN have a completionist medal for collecting all non-secret medals.


At 8/31/25 09:09 AM, Ralix wrote:
I didn't add anything to give you the entire list of medals from Medal.getList, because imported functions must return either string or a number, so returning a list of objects would be much trickier. But hopefully you don't have too many medals and it's okay to check them individually.


I would need to check for few medals for that planned "completionist " medal... I'm confident I can find a way to store the medal statuses into an array (or hopefully a struct for readability), then do a for loop to check if all the medals are "true"/1. If I can't do that, I would happily just do a LONG check statement. I'm just grateful to even have a solution at all, let alone the function to actually check medals lol.


At 8/31/25 09:09 AM, Ralix wrote:
By the way, since you're learning, Java and JavaScript are two different languages and aren't even very similar. In the context of Newgrounds.io and web scripting in general, it's JavaScript. Java is used mainly for multiplatform executable applications.


I'm sure Java vs. Javascript is a veeeeeerryyy common noob trap lol. ⁽ʸᵒᵘ ᵐᵉⁿᵗⁱᵒⁿⁱⁿᵍ ᵗʰᵃᵗ, ᴵ ʳᵉᵐᵉᵐᵇᵉʳ ˢᵏⁱᵐ ʳᵉᵃᵈⁱⁿᵍ ᵗʰᵃᵗ ˢᵒᵐᵉʷʰᵉʳᵉ ᵒⁿ ˡⁱᵏᵉ ᵃ ᵍᵃᵐᵉᵐᵃᵏᵉʳ ᵒʳ ʳᵉᵈᵈⁱᵗ ᶠᵒʳᵘᵐ⁾ Which I'm glad that in this case the you could just jump in and just create javascript functions, without needing to do any java related steps.


At 8/31/25 09:09 AM, Ralix wrote:
I described some steps to add new functions in the description, in case you would eventually feel confident to try. JavaScript syntax isn't too dissimilar from GML...Does it look like something you could read and potentially edit?


I can def read and understand your javascript examples! It is pretty similar to defining functions in GML... The big thing that had me intimated is not really knowing what to use to program, then properly debug it, and apply the base ng.io javascript functions/logic.


I assume based on your guide, the base GMS2 api already has all the ng.io api connected and set up? So I use Notepad++ or Visual Studio to write the functions into the existing javascript file, then be able to debug it with Gamemaker?


At 8/31/25 09:09 AM, Ralix wrote:
I still didn't want to dig into cloud saves, because it's done differently than the rest of the library, using HTTP asynchronous requests directly from GameMaker, and I'd have to spend a while learning the proper way to do it in GML to be able to help you with that.


No worries on trying to teach me the cloud saves. it was just an alternative solution since I figured it would've been easier to use pre-existing functions as well as understanding for future use. If I ever need to learn cloud saves for a future project or idea, I'll be sure to check in with the discord :D


Again thank you so much for helping. I hope that this can be implemented into the api offically, as I'm confident I'm not the only one who would find some use to these functions🙏.


If you have like a ko-fi, itch.io, patreon, or anything, I'll be happy to shoot some support your way! I really cannot express how grateful I am, I was legit stressed and frustrated out of my mind for days, floundering with cloud saves and trying to find help


At 8/31/25 06:52 PM, SumMadLad wrote:OH MY GOSH YOU'RE INCREDIBLE DUDE, THANK YOU SOOOOO MUCH!! To go out of your way to not only make the function for this, but also an example project with an lil' guide!?!?!?!? I really can't thank you enough...
If you have like a ko-fi, itch.io, patreon, or anything, I'll be happy to shoot some support your way! I really cannot express how grateful I am, I was legit stressed and frustrated out of my mind for days, floundering with cloud saves and trying to find help


It's okay, I was glad to help, and I'm happy that it works. :)

I haven't really used the newer versions of GameMaker, so I was curious. I'm looking forward to your game!


At 8/31/25 06:52 PM, SumMadLad wrote:I wanted a medal to unlock after collecting the 4 character combo trial medals. THEN have a completionist medal for collecting all non-secret medals.


In that case, yes; checking other medal unlock status seems like the best way to do this.


At 8/31/25 06:52 PM, SumMadLad wrote:I assume based on your guide, the base GMS2 api already has all the ng.io api connected and set up? So I use Notepad++ or Visual Studio to write the functions into the existing javascript file, then be able to debug it with Gamemaker?


Yes, there were multiple files in the extension. The “newgroundsio.js” file is the official JavaScript Newgrounds.io API doing the heavy lifting, and “ng_library.js” contains the final functions using the official API that are exported to GameMaker.

You don't need to touch the official script, so ideally, modify/expand the library file.


Yes, Notepad++ or Visual Studio, but you won't get IntelliSense (code completion) in Notepad++ and Visual Studio is an overkill (takes ages to load and is more suited for entire projects rather than 1 file).

I use VS Code for JavaScript, which is more lightweight, JS support is built-in, and it has a ton of free available extensions (like GML, even).


I didn't see a way to debug the JS library in GameMaker – I couldn't open the browser console (Ctrl+Shift+I in Chrome) in debug mode? So I did it by debugging the build after uploading to Newgrounds preview (which is better to test Newgrounds.io in “real” conditions, anyway).


So to debug the JS library:

1) Upload the build to Newgrounds

2) Go to Preview

3) Open developer console

4) Find the library file in the "Sources" tab (assuming Chrome or Chromium-based browser)

iu_1454591_4428769.png

5) You can add breakpoints to stop when you reach some part of code to inspect variables

iu_1454592_4428769.png

You can also add logs:

  • console.log("Medal '${medal.name}' status: ${medal.unlocked}");

Which will then show up in the Console panel.


Hello, sorry if this has already been asked elsewhere.

I know a lot of older flash games like Cathode Raybots or Time Fcuk had support for user-generated content in the form of level editors. Is the ability for players to upload their creations and download other peoples' stuff in-game something that may come to the modern newgrounds api eventually, or is that something that will probably have to remain self-hosted?

I'd understand if it would need to be gated behind supporter status or something.