Need help making an online game

I was making an inline minigame collection and used the networking code from my other but changed the link so the servers are not linked but for block game it works perfectly and for the minigame collection it does nothing.

If anyone can help I’m all ears.

Sincerely
William Boersma

@leonidas you have been helpful in the past with this kind of stuff

Can you add more detail about what you are trying to do and exactly what isn’t working?

Do you mean online instead of inline?

Do you get any error messages in the console logs?

What have you debugged so far?

Hi @yaustar I did mean online.And I can’t figure out what’s wrong when I use it one game works perfect on the other does absolutely nothing.

Press HERE To Go To The Code

One error
[network1.js?id=43076026&branchId=722e806b-90af-4767-8829-42f1605b9f52:76]:

@yaustar I don’t see what the difference is here.

Hi @WilliamBoersma31, that’s too little information to help you out.

The only thing that comes in my mind is check using the console or the debugger if data is properly defined / has correct values before using it in the teleport method.

1 Like

Hi @Leonidas I fixed the error but it still does nothing.

If you wanna take a quick glance at my code it’s linked HERE

I’ve launched your project and got the following error:

Check the following thread on how to resolve that on glitch:

1 Like

Hey @Leonidas how do you whitelist a link?

What do you mean you just have to copy the website or comments like here
An example: This is weird i need help

I’m refering to this post

Dec '20

Hi @Karl47,

You need to whitelist the playcanv.as domain name on your glitch.me project, or use a cors extension on your browser while developing as @agent178 said.

@Leonidas @Gabriel_Dobrzynski the weird thing is I didn’t have to do that with the other game.

Weird, Im not sure.

@Gabriel_Dobrzynski What do you mean?

that is the weird thing

@Gabriel_Dobrzynski Yes because it’s weird because it’s the same code for this one i have to do a whole bunch of extra stuff but with the original it just worked

1 Like

@leonidas nothing is working and I can’t seem to get that same error I really need help

HERE is the glitch code
and
HERE is the playcanvas code

Hi @WilliamBoersma31,

Take a look at the multiplayer example project, @yaustar recently updated the code and it works quite ok:

https://playcanvas.com/project/406048/overview/tutorial-realtime-multiplayer

2 Likes