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 ...
For further actions, you may consider blocking this person and/or reporting abuse
ive got error while trying to run the server - at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
at Module._load (node:internal/modules/cjs/loader:1074:27)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at require (node:internal/modules/helpers:126:16)
at Object. (C:\Users\mosit\Desktop\multiplayer live game\public\server.js:1:19)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\mosit\Desktop\multiplayer live game\public\server.js'
]
(C:\Users\mosit\Desktop\multiplayer live game\public*server.js:1:19)*
where is dotenv ?
Hello i am getting this error(imgur.com/a/jLGwZwg even thought i have added the ably key
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 keyauthUrl
withkey
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.
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.
Can I add my own assets/animations to make the game more unique?
Yes, of course! Just replace the ones in the project. Do you have any specific questions on that?
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
Replacing the links should do it!
Hi ! Amazing !! Do you have a demo url ?
Hey! I've temporarily hosted the demo at go.ably.io/play-space :)
Hello, thanks for sharing your work. I have a server hosting all the files. How can I code to have server.js run?
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.
I enjoy reading your post. This is so informative! ornamental iron works
very bad instruction
what you mean by " go to ably dashbord and add this code to script.js !!! "