mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Merge branch 'master' into clarify-docs
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
# pixel.horse
|
||||
|
||||
A fork of Pony Town, a game of ponies building a town.
|
||||
A [Pony Town](https://pony.town) custom server
|
||||
|
||||
## Licensing
|
||||
|
||||
Pony Town's code is released to public domain. The art and music assets are released under the CC BY-NC 4.0 non-commercial license.
|
||||
The assets cannot be used for commercial purposes in any way including crowdfunding such as Patreon or PayPal donations without permission.
|
||||
See `LICENSE_CODE.txt`, `LICENSE_ART.txt` and `LICENSE_MUSIC.txt` files for definitions.
|
||||
To discuss licensing, contact `[email protected]`.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -43,7 +50,7 @@ npm install
|
||||
|
||||
## Setting up OAuth keys
|
||||
|
||||
Get OAuth keys for authentication platform of your choice (github, google, twitter, facebook, vkontakte, patreon)
|
||||
Get OAuth keys for authentication platform of your choice (github, google, twitter, facebook, vkontakte)
|
||||
|
||||
### Github
|
||||
|
||||
@@ -147,9 +154,10 @@ Add `config.json` file in root directory with following content. You can use `co
|
||||
"adminPort": 8091,
|
||||
"host": "http://localhost:8090/",
|
||||
"local": "localhost:8090",
|
||||
"adminLocal": "localhost:8091",
|
||||
"secret": "<some_random_string_here>",
|
||||
"token": "<some_random_string_here>",
|
||||
"adminLocal": "localhost:8091",
|
||||
"proxy": false, // set to true or to the ip of your proxy server if hosting pony town behind a proxy like nginx
|
||||
"secret": "<some_random_string_here>", // use a long and random string here, it's crucial for your security that nobody else knows this value
|
||||
"token": "<some_other_random_string_here>", // use a long and random string here, it's crucial for your security that nobody else knows this value
|
||||
"db": "mongodb://<username>:<password>@localhost:27017/<database_name>", // use values you used when setting up database
|
||||
"analytics": { // optional google analytics
|
||||
"trackingID": "<tracking_id>"
|
||||
@@ -220,22 +228,13 @@ npm start
|
||||
|
||||
**This will not update spritesheets**; for that, you must use `npm run build-sprites` as discussed previously, or run a [development build](#running-in-development) with the `--sprites` flag.
|
||||
|
||||
### Adding/removing roles
|
||||
### Beta environment (with dev tools and in-development features)
|
||||
|
||||
```bash
|
||||
node cli.js --addrole <account_id> <role> # roles: superadmin, admin, mod, dev
|
||||
node cli.js --removerole <account_id> <role>
|
||||
npm run build-beta
|
||||
node pony-town.js --login --admin --game --tools --beta
|
||||
```
|
||||
|
||||
To setup superadmin role use following command
|
||||
|
||||
```bash
|
||||
node cli.js --addrole <your_account_id> superadmin
|
||||
```
|
||||
|
||||
Admin panel is accessible at `<base_url>/admin/` (requires admin or superadmin role to access)
|
||||
Tools are accessible at `<base_url>/tools/` (only available in dev mode or when started with --tools flag)
|
||||
|
||||
### Starting as multiple processes
|
||||
|
||||
```bash
|
||||
@@ -253,14 +252,18 @@ It is recommended to run processes with larger memory pool for large user bases
|
||||
node --max_old_space_size=8192 pony-town.js --game main
|
||||
```
|
||||
|
||||
### Beta environment (with dev tools and in-development features)
|
||||
### Recommended production server update procedure
|
||||
|
||||
```bash
|
||||
npm run build-beta
|
||||
node pony-town.js --login --admin --game --tools --beta
|
||||
```
|
||||
1. Build everything
|
||||
2. Issue a restart notice (from admin panel `<base_url>/admin/`)
|
||||
3. Wait around 30s
|
||||
4. Issue shutdown servers command (from admin panel `<base_url>/admin/`)
|
||||
5. Wait for the user count to become 0
|
||||
6. Restart the server
|
||||
|
||||
### Running in development
|
||||
You do not need to shut down the server to build.
|
||||
|
||||
### Running in development (compiles faster and has extra tools)
|
||||
|
||||
```bash
|
||||
npm run ts-watch # terminal 1
|
||||
@@ -275,9 +278,28 @@ gulp dev --test # run with tests
|
||||
gulp dev --coverage # run with tests and code coverage
|
||||
```
|
||||
|
||||
### Adding/removing roles
|
||||
|
||||
```bash
|
||||
node cli.js --addrole <account_id> <role> # roles: superadmin, admin, mod, dev
|
||||
node cli.js --removerole <account_id> <role>
|
||||
```
|
||||
|
||||
To setup superadmin role use following command
|
||||
|
||||
```bash
|
||||
node cli.js --addrole <your_account_id> superadmin
|
||||
```
|
||||
|
||||
### Additional tools
|
||||
|
||||
Admin panel is accessible at `<base_url>/admin/` (requires admin or superadmin role to access)
|
||||
Tools are accessible at `<base_url>/tools/` (only available in dev mode or when started with --tools flag)
|
||||
|
||||
## Customization
|
||||
|
||||
- `package.json` - settings for title and description of the website
|
||||
- `changelog.md` - your public updates
|
||||
- `assets/images` - logos and team avatars
|
||||
- `public/images` - additional logos
|
||||
- `public` - privacy policy and terms of service
|
||||
@@ -291,6 +313,7 @@ gulp dev --coverage # run with tests and code coverage
|
||||
|
||||
### Custom map introduction
|
||||
|
||||
- `src/ts/common/entities.ts` - adding entities
|
||||
- `src/ts/server/start.ts:35` - adding custom map to the world
|
||||
- `src/ts/server/map/customMap.ts` - commented introduction to customizing maps
|
||||
|
||||
@@ -305,3 +328,33 @@ git update-index --assume-unchanged src/ts/generated/sprites.ts
|
||||
```
|
||||
|
||||
Read more about it [here](https://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository).
|
||||
|
||||
### Adding assets
|
||||
|
||||
1. Edit sprites (`assets-source` folder)
|
||||
2. Compile sprites (`gulp dev --sprites`)
|
||||
3. Add relevant code
|
||||
4. (In some cases) compile sprites again
|
||||
|
||||
## Changelog
|
||||
|
||||
### Pony.Town v0.53.2
|
||||
- Added changes from Pony.Town update v0.53.2 (https://pony.town/about)
|
||||
- Updated readme with further instructions on updating server and adding assets
|
||||
- Updated pony compression to handle up to 63 items per slot instead of 31
|
||||
- Added Visit PT button
|
||||
- Added disclaimer notice to Home and About
|
||||
- Updated licenses
|
||||
- Removed some unused assets
|
||||
- Updated Contributor list
|
||||
- Removed "Pony Town" from public pages
|
||||
|
||||
### Pony.Town v0.53.1
|
||||
- Added option to import and export settings and actions on action bar
|
||||
- Added different colors of cushions for house customization
|
||||
- Fixed scroll wheel not working on Firefox
|
||||
- Fixed not being able to place items behind interactive items like boxes or barrels
|
||||
- Fixed issue with crystal light
|
||||
|
||||
### Initial release - Pony.Town v0.53.0
|
||||
- Added custom servers
|
||||
|
||||
Reference in New Issue
Block a user