00:00
00:00
lajbel
I love games, but I'm bad at making them.

Danie β˜• @lajbel

Game Boy 🐸

Game Dev 🐝

WarioWare DIY πŸ’£

Hyrule βš”οΈ

Joined on 4/21/21

Level:
14
Exp Points:
1,902 / 2,180
Exp Rank:
28,931
Vote Power:
5.57 votes
Rank:
Town Watch
Global Rank:
45,108
Blams:
23
Saves:
168
B/P Bonus:
2%
Whistle:
Normal
Trophies:
1
Medals:
596
Supporter:
2m

Scratch + Newgrounds.io

Posted by lajbel - September 8th, 2021


ohhi scratch developer, this is a remake of the original tutorial of how to use scratch with newgrounds.io


Main functions πŸ“¦

here we will see the main functions that we all want to use, such as medals and scoreboards


Step 1: Eval Variable

add a ☁️cloud variable with the name "eval"


iu_739452_9008270.png

this is to run javascript and use the newgrounds.io functions! 😺😺


Step 2: Connect()

now we will connect our game with Newgrounds.io before using any thing, you must put it in a 🚩FLAG event, to avoid errors


iu_739453_9008270.png

(replace the first value with your App ID and the second value with you encryptation code, you can find it in Api Tools of your project)


ready! now we can use the newgrounds.io functions!


Step 3: Newgrounds.io functions

we will quickly look at an example for each function


Get Medal

iu_739451_9008270.png

(replace the number by your Medal ID, you can find it in API Tools)


Post Score

iu_739454_9008270.png

(replace the first value with your ScoreBoard ID, you can find it in API Tools, replace the second value with the score to give)


Post Score with Variable:

iu_739455_9008270.png


Step 4: Package your game (IMPORTANT) πŸ“¦

now that you have used the api as you want, we need to compile it using a packager/compiler.


Using HTMLiefer

if you want use HTMLiefer compiler, you need use this template. Now put your project id and choose the options that you like, then press HTMLify!, this download a zip and you must upload it to your newgrounds project 🐸


Using TurboWarp

if you want use TurboWrap Packager, you need install this template, unzip and load it with import settings here. Now put your project id and choose the options that you like, then press Package, this download a zip and you must upload it to your newgrounds project 🐝


Cloud Save ☁️

cloud saves are great, and they are very easy to use.


Step 1: Eval Output Variable

add a ☁️cloud variable with the name "eval output"


iu_739456_9008270.png

the purpose of using this variable is to receive the content that eval can return, in this case, the value of the cloud saves


Step 2: Set a Cloud save


iu_739458_9008270.png

(yes, it's easy)


Step 3: Get a cloud save

we must add a wait because for some reason the variable is not updated at the time the other variable is updated, a small wait will fix the problem.


iu_739457_9008270.png


that's it, you can now use the wonderful cloud variables in scratch. By the way, with eval output you can also use GetUsername() and GetVersion() πŸ¦‹πŸ¦‹


No work ☹️

yes, it can happen that it does not work, it is normal, we are all human. I can help you, first I need you to check that you have done all the steps to the letter. If this does not solve your problem, I would appreciate it if you could change your Connect to this one (remplacing by your values)


Connect("55143:RrL4bDjH", "6kB/g/l9dLIdHFXLn4T69g==", { debug: true })


now, press f12 or ctrl shift c in your browser while testing your game, some messages will appear. Show them to me so I know how to help you! You can do it here or in pm 🦜🦜


Thanks πŸ’Œ

i would like to thank all the people who have helped with support and so on, and all the scratch developers who have shown their appreciation and support for this ❣️


@s-zenmode

@Dungeonation

@JimmyCarlos


I also appreciate people who send me invitations to their projects using ng.io, just make sure you invite me as a beta tester, as I don't want to take credit for your excellent project. Thanks πŸ’Œ


Bonus Links 🐝

Putting your Scratch Game in Newgrounds tutorial by midgetsausage

Real Game

Original post

Collection with some Scratch Games using Newgrounds.io API


Tags:

21

Comments

I tried it with SteakClock in the Desert, but it won't load completely. Stuck at 100%

You use Unknown/Private mode?

@Anonymous-Frog @LaJBel what's that?

Incongnito mode?

@Anonymous-Frog @LaJBel @LaJBel Yes I use it. It usually works fine for medals.

Yeah but in Scratch none, for the options of the compiler

Godspeed <3

THANK YOU SOOOOOOOO MUCH! +1 FOLLOWER

HUWIUHEQWHEIOUQWEHIUQWIHUERIHU2RIUHWERIHUWUFHFUHIUFIHWEHRUIWEHUR
---------
OH. MY. GOD. AMAZING!!!!!!!

Thank you so much

Followed

No way. This looks rad!

How much of the AppID and encyption code do I enter? The whole thing?
69420 or 69420:4hr5ITo2

All appid, and all enc code

And do I put them in brackets?

yeah

@Anonymous-Frog @LaJBel @LaJBel Could you fix this incognito issue?

THANK YOU

Thank you for making this, this will be very helpful for my Scratch game.

never use eval!

im made the medals in the gmae bit it will not appear for some reason

@BogivMusic why not?

whare can i find the Board ID?

To your game Project, api tools, scoreboards and make a scoreboard

@DemisurgeX @LaJBel Found out how to do it BUT the api is not working. the medals and score boards will not work.

wtf

@DemisurgeX @LaJBel @LaJBel thats what i said. https://www.newgrounds.com/portal/view/808945 see for your self

Do you intend on adding other newgrounds.io features or are the other stuffs already implemented? Like the get version features those stuff

More Results