Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerenaux/westward
A collaborative MMORPG made in Javascript
https://github.com/jerenaux/westward
game javascript mmorpg nodejs online-game phaser3 phaserjs
Last synced: about 2 months ago
JSON representation
A collaborative MMORPG made in Javascript
- Host: GitHub
- URL: https://github.com/jerenaux/westward
- Owner: Jerenaux
- License: mit
- Created: 2019-12-27T10:55:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-23T16:01:20.000Z (over 2 years ago)
- Last Synced: 2024-09-23T17:32:00.135Z (about 2 months ago)
- Topics: game, javascript, mmorpg, nodejs, online-game, phaser3, phaserjs
- Language: JavaScript
- Homepage: http://www.westward-online.com
- Size: 301 MB
- Stars: 126
- Watchers: 7
- Forks: 40
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Westward
Westward is an open-source aspiring MMORPG written in Javascript. The game is not online at the moment as the project is not actively maintained anymore.
**Disclaimer**: Westward began as a closed-source project, and has grown that way for more than 2 years. As a result, the current codebase
is messy and not very collaboration-friendly. Documentation is sorely missing, the tests are a mess, and the code itself looks like
what a 2+ years codebase maintained by one guy can look like. You can make that change! I invite you to point out where the code is particularly
unclear and where the lack of documentation is particularly painful. I will give top priority to addressing these feedbacks.## Vision
As a **game**, Westward aims to be a collaborative MMORPG where the players have to build a nation, starting from scratch and progressively
settling a large continent. A more lengthy description can be found on the [description page of the game](https://www.dynetisgames.com/2018/03/04/westward/).As an **open-source project**, Westward aims to be a great collaborative experience for contributors of all sorts. The goal is also
to be a learning experience, for me as well as for developpers interested in gamedev. I hope the contributions and the community will grow into
a space for us to learn and have fun improving that game.For more insight into the evolution of the project, check out the [dev logs](https://www.dynetisgames.com/category/dev-blog/).
## Community
- [Twitter (@jerome_renaux)](https://twitter.com/jerome_renaux)
- [Slack](https://join.slack.com/t/dynetisgames/shared_invite/enQtMTc0NzU2MjgzNDExLTNiMTMwNDJmMGQ1Y2FjM2ZhYTFhMGYzNWEyYmE3MjQ2YzAyNzYwYjQyODllZTZlYzM3ZDM0MGRiMGQyNjIxNWM)
- [Discord](https://discord.gg/NzUnS7F)
- [Stomt](https://www.stomt.com/westward)
- :rocket: [The Wiki](https://github.com/Jerenaux/westward/wiki)## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
At some point a Docker image should be rolled out to facilitate that process (feel free to contribute on that front if that's your area of expertise!)### Prerequisites
- A recent version of Node.js
- A MongoDB instance listening on port `27017`### Installing
Clone this repository, then navigate to it and install the dependencies:
```
npm install
```You should also create a file called `.env` at the root of the directory. This is where the `dotenv` package will be looking for
environment variables. Your local version doesn't need to define any environment variables, but `dotenv` will complain if that
file is missing.```
touch .env
```## Running the game
The most straightforward way ton run the game server is to do:
```
node dist/server.js
```Then navigate to `localhost:8081` to play the game.
If you make modifications to the game, don't forget to rebuild it using webpack, which you can do by running:
```
npm run webpack
```Alternatively you can run `webpack-dev-server` to automatically watch for changes and rebuild when changes are detected. You can do so by running:
```
npm run watch:webpack
```The file `package.json` defines all the `npm run ...` commands that are available. Feel free to add more if you think that would be useful!
## Using Docker
Alternatively, you can use the Dockerfile to create a container with all the necessary components already installed. You need to have [Docker](https://www.docker.com) installed. Then, in the directory where you clones the project, run:
```
docker-compose build
```
```
docker-compose up -d
```The default port when using the Docker way is `80`, so you need to navigate to `:80` to be able to access the game (e.g. 192.168.99.100:80).
## Running the tests
Some tests have been set up, mainly focusing on testing the client/server API and some internal server functions. They can be run as follows:
```
npm run test
```These tests could be improved in a million ways, by being better documented, being more clean, or simply by adding more tests. In
an ideal world, the tests could act as a gateway to the codebase, providing a clear view of what is going on and helping contributors
dive in. It's not the case yet, but feel free to contribute on that front!## Deployment
The master branch of this repository is deployed on an AWS EC2 instance maintained by myself. I will not elaborate too
much on that aspect since it doesn't impact contributions, but I can provide more information if there is demand for it.## Built With
* [Phaser 3](https://github.com/photonstorm/phaser) on the client side - The best Javascript game engine
* [Node.js](https://nodejs.org/en/) on the server side
* [MongoDB](https://www.mongodb.com/) for the database## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting contributions.
## Authors
* **[Jérôme Renaux](https://github.com/Jerenaux)** - *Initial work, project maintainer*
See also the list of [contributors](https://github.com/Jerenaux/westward/graphs/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Thanks
Many thanks to the following people for supporting Westward on [Patreon](https://www.patreon.com/jeromerenaux):
- Sean Pope
- Flavius Poenaru, currently working on [Kaetram](https://github.com/Veradictus/Kaetram-Open), an open-source 2D HTML5 adventure## Donate
If you are interested in Westward and want to see it grow, I invite you have a look at my [Patreon page](https://www.patreon.com/jeromerenaux)
where you can find a listing of rewards for various levels of recurring contributions. Even the smallest contributions can go a
long way as a signal of your interest and your support.