Giter Site home page Giter Site logo

ezobraz / nwn-voice-chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 91 KB

Proximity Voice Chat for NWN1

License: GNU General Public License v3.0

NWScript 22.75% Shell 0.33% HTML 6.87% JavaScript 53.88% Less 16.18%
neverwinter-nights neverwinter-nights-enhanced-edition neverwinternights

nwn-voice-chat's Introduction

Proximity (3D) Voice Chat for NWN1

Screenshot 2022-05-15 at 15 37 34

Disclaimer

The whole thing was made in the most simple way possible, and currenlty is in early "alpha", so expect some bugs.

How does it work?

Game Server dumps player locations in a log files, then Voice Chat Server grabs that data and shares it among the connected players who are in the same location.

On the client-side it's basicaly a tab in a browser that handles all the audio streaming, while players can mute and unmute themselves direclty from the game (thanks to the new NUI support)

Technologies used

Websockets (with socket.io), WebRTC (with peer.js), Three.js (for proximity sound), node.js + express.js as a webserver, tail and chokidar to watch log files.

For server administrators

  1. Install node and npm for your OS
  2. git clone this repository
  3. Put absolute path to your server's log.0 directory in server/config.json
  4. Generate certificates (or use letsencrypt if you have a domain name)
cd server/cert && chmod +x generate-certificates && ./generate-certificates.sh
  1. Create/Edit your module and add scripts from module-scrips folder to your module
  2. Attach onClientEnter and onClientLeave scripts to their respective events
  3. Inside onClientEnter script, change VC_URL to your domain or server ip with 3000 port. It will be shown to players
  4. Run the Game Server with your module
  5. Build and launch the Voice Chat Server
cd server
npm i
npm run build
npm run start

For players

  • Join the server that has this voice chat plugin installed
  • Notice the floating "Voice chat" window
  • Alt+Tab and open a new firefox/safari/etc tab with the url you saw in the floating window
  • Enter the 4 digit pin number you saw in the floating window
  • Return to the game and press "On" button so others could hear you

It will not work in Chrome or any Chrome-based browsers like Brave, Edge, etc. Use Firefox.

nwn-voice-chat's People

Contributors

ezobraz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.