Discuss Scratch

melonie123
Scratcher
51 posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

the subject tells it all
Programmer1121
Scratcher
1000+ posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

Try Checking out some clean chatrooms for a chatbox but for multiplayer games I know nothing except that they are very difficult
I doubt that even BIazeheart might be able to, Try Making Simple Multiplayer Games V2 (Updated tutorial!) but thats the most i can help you with
melonie123
Scratcher
51 posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

thank you!
deck26
Scratcher
1000+ posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

Multiplayer doesn't have to be that difficult - see my demo of the basic idea https://scratch.mit.edu/projects/77775784/ and my example https://scratch.mit.edu/projects/63501310/ (check the stage script).

Chat rooms have to use white lists so the easiest thing is to have a list of words or phrases which are OK and save the item numbers for the selected text making sure they are all the same length (add leading zeroes for any item numbers which would be too short).
melonie123
Scratcher
51 posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

ok but is there a way to make a safe chat without a whitelist?
deck26
Scratcher
1000+ posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

melonie123 wrote:

ok but is there a way to make a safe chat without a whitelist?
No there isn't
melonie123
Scratcher
51 posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

well then can you explain very simply (because im only 11) how to make a chat room then? Or mabye a multiplayer game?
deck26
Scratcher
1000+ posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

My demos show all you need for multiplayer. If you can't follow the ideas then perhaps you're not quite ready for that yet. That's not a criticism, I'm sure you already find some things simple that you found difficult some time ago.

There are chat rooms which you could search for but the main requirements are as follows. But essentially there's a limit to how much it can be simplified.

- user input (selecting from lists of available words/phrases or allowing free input but then eliminating what isn't acceptable). So you need to be comfortable with lists and probably with splitting input into individual words.

- encoding the text as numerical digits so they can be stored in cloud variables (using the list item numbers makes this simpler)

- you probably want usernames included so need to understand encoding/decoding text - see http://wiki.scratch.mit.edu/wiki/Global_High_Scores for an example

So each ‘message’ is probably stored as an encoded username followed by encoded text followed by a separator. You need to decide how many old message you keep and when you start deleting them (perhaps done manually). New messages just get added to the end of the cloud variable in encoded form and anyone running the project has to detect when the cloud variable has changed and decode the messages to a list.

Personally I'd probably give each message an id number so only the new messages need to be decoded but as long as you decode in a custom block with no screen refresh you may be OK.
melonie123
Scratcher
51 posts

I need to know how to make an online multiplayer game with a chat box please help me!!!

ok thanks!

Powered by DjangoBB