Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riishabhraj/destroyer2
Multiplayer Battleship Game
https://github.com/riishabhraj/destroyer2
redis redis-client redis-server websocket-server websockets
Last synced: 23 days ago
JSON representation
Multiplayer Battleship Game
- Host: GitHub
- URL: https://github.com/riishabhraj/destroyer2
- Owner: riishabhraj
- Created: 2024-08-10T20:13:58.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-26T17:16:28.000Z (3 months ago)
- Last Synced: 2024-10-26T18:59:07.479Z (3 months ago)
- Topics: redis, redis-client, redis-server, websocket-server, websockets
- Language: JavaScript
- Homepage: https://destroyer2-04r7.onrender.com/
- Size: 345 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Battleship Game
A real-time multiplayer battleship game
## Table of Contents
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installing](#installing)
- [Customizing](#customizing)
- [Deployment](#deployment)
- [Built With](#built-with)## Getting Started
These instructions will get you a copy of the project up and running on your
local machine for development and testing purposes. See
[deployment](#deployment) for notes on how to deploy the project on a live
system.### Prerequisites
You will need Redis and Node.js with npm installed on your machine to get
started (visit https://redis.io/download and https://nodejs.org to
install Redis and Node.js with npm).### Installing
A step by step series of examples that tell you how to get a development
environment running:Clone the git repository
```bash
git clone https://github.com/riishabhraj/destroyer2.git
cd destroyer2
```And install npm dependencies
```bash
npm install
```Finally, start the Redis server in a different shell.
You may optionally specify a Redis configuration file as argument to
`redis-server````bash
cd path/to/destroyer2/db/
redis-server
# If you have a redis configuration file, instead run:
# redis-server redis.conf
```Back in the first shell, start the webserver:
```bash
npm run debug
```Navigate to http://localhost:8080 to get started!
### Customizing
You can customize the project by adding a `.env` file in the root of the project
and a Redis configuration file in the `db/` folder. Make sure to specify the
Redis configuration file when starting the Redis server.See the example [.env configuration](./.env.example) file and the customizing
## Deployment
Set a database password in the [.env ](./.env.example) file and in the
[redis.conf](./db/redis.conf) file. See the deployment guide for more infos and
detailed instructions:Deploy the app to a free Heroku instance:
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
## Built With
- [Node.js](https://nodejs.org/) - The server backend
- [express](https://expressjs.com/) - The web server
- [Redis](https://redis.io/) - The database
- [node_redis](https://github.com/NodeRedis/node_redis) - The Redis
client for Node.js
- [ws](https://github.com/websockets/ws) - The WebSocket server