Discuss Scratch

Syncsgxtvibezz
Scratcher
5 posts

Multiplayer games on a website

Is there a way that you can put a scratch multiplayer game on a website because I am making a website for games
z8_
Scratcher
100+ posts

Multiplayer games on a website

You can put your scratch games with an embed. Go on the project's page and click on “Copy Link”. Then there will be a window which there will be a link to the project but also the code for an embed. Copy the code for the embed, go on your website and an embed with the embed code of the project.
Hope this helped!

@BatteRaquette58's 3 letter account dedicated to forums.
After 2 months, I am finally back!
The_894th_Orange_Cat
Scratcher
100+ posts

Multiplayer games on a website

It is possible, by converting the scratch file (SB3) to HTML and then embedding that in the website. There are a lot of resources to do that.

You could also embed the URL with HTML by (this has to be on a shared project) going below the notes and credits. There will be a button that says ‘copy link’. Click the button and there will be two panels. Copy the bottom one and use HTML to embed it on your website.

I honestly would do #2 because the steps are very simple no matter how long it is.

Basically, It's very complicated, but it's possible.

-The_894th_Orange_Cat.

-The_894th_Orange_Cat
EDGE_Test
Scratcher
10 posts

Multiplayer games on a website

This is definitely possible, but you need to learn how to encode and decode usernames. Sadly I am still working on a username decoder so I can't help you with that, but I am finished with a username encoder that works flawlessly. I came to a revelation with the replace item list block and it allowed me to make the encoder. Here's the logic behind it:

replace item (1) of [my list v] with [thing]//This block replaces an item in the list with a different thing.
join [apple ] [banana]//This block merges two different quantities together.
item (1) of [my list v]//This block detects for the given item number and sends it back.

The revelation I came across is this:

replace item (1) of [my list v] with (join (item (1) of [my list v]) [thing])//This is the really good part: The first item gets replaced by the whole list and then added by something else.

When I found this, I found out the best possible solution to make a username encoder. Here's how you do it:

define encode (username::custom) and wait
set [letter v] to (1)
repeat until <(done?) = [true]>
add (item # of (letter (1) of (username::custom)) of [alphabet v]::list) to [encode v]
if <(item (1) of [encode v]) > (9)> then
replace item (1) of [encode v] with (join (0) (letter (1) of (username::custom))
end
repeat ((length of (username::custom)) - (1))
add (item # of (letter (letter) of (username::custom)) of [alphabet v]::list) to [encode v]
if <(item (2) of [encode v]) > (9)> then
replace item (2) of [encode v] with (join (0) (letter (2) of (username::custom))
end
replace item (1) of [encode v] with (join (encode) (item (2) of [encode v]
delete (2) of [encode v]
end
set [done? v] to [true]

I hope this helps you. Keep in mind that I found this so if you use this please give credit! Thx!

Edit: Oh wait I didn't read your post. I thought you wanted to know how to encode and decode usernames for multiplayer games on this website. My bad

Edit 2: I know you weren't looking for this if you click this blue text here you will be redirected to Cubic's Username Decoder™ v2.0 if you want to know how to encode and decode usernames anyways.

Last edited by EDGE_Test (Nov. 21, 2021 18:51:39)

Syncsgxtvibezz
Scratcher
5 posts

Multiplayer games on a website

EDGE_Test wrote:

This is definitely possible, but you need to learn how to encode and decode usernames. Sadly I am still working on a username decoder so I can't help you with that, but I am finished with a username encoder that works flawlessly. I came to a revelation with the replace item list block and it allowed me to make the encoder. Here's the logic behind it:

replace item (1) of [my list v] with [thing]//This block replaces an item in the list with a different thing.
join [apple ] [banana]//This block merges two different quantities together.
item (1) of [my list v]//This block detects for the given item number and sends it back.

The revelation I came across is this:

replace item (1) of [my list v] with (join (item (1) of [my list v]) [thing])//This is the really good part: The first item gets replaced by the whole list and then added by something else.

When I found this, I found out the best possible solution to make a username encoder. Here's how you do it:

define encode (username::custom) and wait
set [letter v] to (1)
repeat until <(done?) = [true]>
add (item # of (letter (1) of (username::custom)) of [alphabet v]::list) to [encode v]
if <(item (1) of [encode v]) > (9)> then
replace item (1) of [encode v] with (join (0) (letter (1) of (username::custom))
end
repeat ((length of (username::custom)) - (1))
add (item # of (letter (letter) of (username::custom)) of [alphabet v]::list) to [encode v]
if <(item (2) of [encode v]) > (9)> then
replace item (2) of [encode v] with (join (0) (letter (2) of (username::custom))
end
replace item (1) of [encode v] with (join (encode) (item (2) of [encode v]
delete (2) of [encode v]
end
set [done? v] to [true]

I hope this helps you. Keep in mind that I found this so if you use this please give credit! Thx!

Edit: Oh wait I didn't read your post. I thought you wanted to know how to encode and decode usernames for multiplayer games on this website. My bad

Edit 2: I know you weren't looking for this if you click this blue text here you will be redirected to Cubic's Username Decoder™ v2.0 if you want to know how to encode and decode usernames anyways.


Thanks bro, that helps out a lot!!
Syncsgxtvibezz
Scratcher
5 posts

Multiplayer games on a website

z8_ wrote:

You can put your scratch games with an embed. Go on the project's page and click on “Copy Link”. Then there will be a window which there will be a link to the project but also the code for an embed. Copy the code for the embed, go on your website and an embed with the embed code of the project.
Hope this helped!

If you embed it, you will need to have your scratch username so you can play.

Powered by DjangoBB