DEV Community

Cover image for Building a realtime multiplayer browser game in less than a day - Part 4/4

Building a realtime multiplayer browser game in less than a day - Part 4/4

Srushtika Neelakantam on June 12, 2020

Hello, and welcome to the final part of this article series where we are looking at the step-by-step implementation of a realtime multiplayer game ...
Collapse
 
awesomepants profile image
Awesomepants • Edited

Hi!
I'm a little confused on how to do this step: "Hit the base URL of your server from all the three windows."
How do I find the url of the local file? (Thanks in advance!)
Edit: I figured this out, and I'll leave this here for reference, in case anyone else doesn't know how to do this. (I am relatively new to web development)
It's fairly simple. You just need to open your browser and type in localhost:5000 (make sure your server is running first!)
For some reason I thought I had to input the file path.

Collapse
 
brickfoe profile image
BrickFoe

Can I add my own assets/animations to make the game more unique?

Collapse
 
srushtika profile image
Srushtika Neelakantam

Yes, of course! Just replace the ones in the project. Do you have any specific questions on that?

Collapse
 
brickfoe profile image
BrickFoe

You use cdn links for the assets. Can i just add my own png images all willy nilly or do i have to do something else

Thread Thread
 
srushtika profile image
Srushtika Neelakantam

Replacing the links should do it!

Collapse
 
arttukuikka profile image
Arttu Kuikka

Hello i am getting this error(imgur.com/a/jLGwZwg even thought i have added the ably key

Collapse
 
srushtika profile image
Srushtika Neelakantam

Hi, it's expecting an authUrl, not a direct API key. If you'd like to use the API key directly instead to authenticate (which is not recommended btw for the frontend clients) - you'll need to replace the key authUrl with key in the init method. Here's an example: ably.com/documentation/core-featur....

If you are still facing issues, please feel free to open a support ticket at ably.com/contact and the team can help out.

Collapse
 
anibalardid profile image
Anibal

Hi ! Amazing !! Do you have a demo url ?

Collapse
 
srushtika profile image
Srushtika Neelakantam

Hey! I've temporarily hosted the demo at go.ably.io/play-space :)

Collapse
 
angel17 profile image
Angel Superstore

I enjoy reading your post. This is so informative! ornamental iron works

Collapse
 
mdx77 profile image
Nicolas

Hello, thanks for sharing your work. I have a server hosting all the files. How can I code to have server.js run?

Collapse
 
alankritjoshi profile image
Alankrit Joshi

This is great. I was working on building a mutliplayer game with Phaser and my Go server. I will have to figure out an alternative for P2.js or patch it in somehow.