https://github.com/sorebit/io-communication-server
TCP server for a uni project game
https://github.com/sorebit/io-communication-server
nodejs tcp-server
Last synced: about 2 months ago
JSON representation
TCP server for a uni project game
- Host: GitHub
- URL: https://github.com/sorebit/io-communication-server
- Owner: Sorebit
- Created: 2021-09-15T09:32:00.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T10:10:03.000Z (almost 5 years ago)
- Last Synced: 2025-10-08T23:51:32.361Z (9 months ago)
- Topics: nodejs, tcp-server
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TCP server used as part of uni team-project
> Basically, the project was a modular game where bots compete against each other in simple team matches.
> Each team developed a server (this repo), a Game Master (a client handling game logic), and Agents (bots playing the game).
>
> Then a tournament would be played to tell which team won. There were rounds where each team would provide their modules
> and if it handled games correctly, points scored by teams of bots would be summed up to determine the ultimate winner.
>
> Pretty complicated.
## Features
- Communication with other modules over **TCP**
- Logs (winston)
- colorful in tty (chalk)
- as json in log file
- [Tests](./test) (mocha)
- Implemented as a Finite State Machine
- *Probably* extendable to support other usecases
## Usage
- `npm install` - install dependencies.
- `npm test` - run tests.
- `npm start` - launch the server.
- `npm run debug` - launch the server in debug mode.
- Extra: `ncat localhost ` - launch dumb netcat client.
### Config
- `agentPort` - port used by **players**.
- `masterPort` - port used by **GameMaster**.
- `maxConnections` - max simultaneous **agent connections**.