onedayitwillmake / RealtimeMultiplayerNodeJs

Realtime Mutliplayer Game Engine using Node.js / websockets for HTML5 that uses a client-server approach in which the clients send only sampled input to the server
549 stars 112 forks source link

Trouble running server #16

Open ruttyj opened 4 years ago

ruttyj commented 4 years ago

Hey,

I'm not able to run this step:

  1. Within another terminal, navigate to the root directory and run "python -m SimpleHTTPServer"

Can you please elaborate?

m0dE commented 4 years ago

Not to diss the creator of this repo, this repo is like 10 years old. there are many better alternatives out there like: https://github.com/moddio/taro https://github.com/timetocode/nengi https://github.com/geckosio/geckos.io

onedayitwillmake commented 4 years ago

Completely agree with @m0dE -

This repo is pretty out of date, if I was revisiting this concept again I would architect it quite different (although keeping the core ideas).

I would say, watch this conf talk I gave when I made this repo, and borrow ideas from it - but looking at the alternatives they look really great and up to date compared to this repo

onedayitwillmake commented 4 years ago

However to answer your question:

Within another terminal, navigate to the root directory and run "python -m SimpleHTTPServer"

Browsers add restrictions when browsing from the local file system (such as connecting to a websocket). Hence we use the above command, to start an HTTP server, which will serve the index.html so that you are not browsing HTML files from file://

If you're on windows, i'm nto sure what the steps would be - but anything that can serve the files will do