Skip to content

This repository is an example of an authoritative game server using socket.io, and three.js

License

Notifications You must be signed in to change notification settings

whitwhoa/open-browser-fps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is horribly outdated and was written many years before I properly understood how to implement these things. Therefore I would not use this as an example # of the "correct" way of doing this. However there could still be some useful bits in there...somewhere...

Open Browser FPS

This repository is an example of an authoritative game server using node.js, socket.io, and three.js.

Installation

  1. Download this repository into your server's webroot
  2. Configure a virtual host with the public root set to /your/servers/webroot/open-browser-fps/client
  3. Open file ./open-browser-fps/server/index.js and change the port number of the socketio server to whichever port you want it to run on (the default is 3000)
  4. Open file ./open-browser-fps/client/index.html and change the following line to point to the address of your new virtual host:
var socket = io('http://local.openbrowserfps.com:3000');
var socket = io('http://your.host.name:your-socketio-port#');
  1. Browse to ./open-browser-fps/server/ and run command nodejs index.js to spin up the socketio server
  2. Open your web browser and navigate to the url you configured for your virtual host
  3. When the page loads, the command line will log that a new user has connected. You will be able to move around, but you will not see another character.
  4. Open another browser tab and browse to your url. You will now see the character from your other browser tab.

Notes

  • There is currently no "shoot" functionality, if anyone tries.
  • If I remember correctly, I was in the middle of optimizing peer interpolation when I last left off with this project. If anyone has any suggestions on a better way to handle it please open an issue and let me know.
  • If anyone has any feedback on how to improve upon this project I would love to hear what you have to say. Opening an issue would be the best way for now.
  • This project is a mash of several other projects and plugins. When I have more time I will track them down and add them to the bottom of this readme. Author's credit remains in comments.

About

This repository is an example of an authoritative game server using socket.io, and three.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages