forked from inolen/quakejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added pre-built binaries
- Loading branch information
Showing
7 changed files
with
51,806 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,78 @@ | ||
# quakejs | ||
# QuakeJS | ||
|
||
## Quickstart | ||
QuakeJS is a port of [ioquake3](http://www.ioquake3.org) to JavaScript with the help of [Emscripten](http://github.com/kripken/emscripten). | ||
|
||
git clone --recursive https://github.com/inolen/quakejs.git | ||
cd quakejs | ||
npm install | ||
To see a live demo, check out [http://www.quakejs.com](http://www.quakejs.com). | ||
|
||
## Assets | ||
|
||
## license | ||
## Building binaries | ||
|
||
MIT | ||
As a prerequisite, you'll need to have a working build of [Emscripten](http://github.com/kripken/emscripten), then: | ||
|
||
```shell | ||
cd quakejs/ioq3 | ||
make PLATFORM=js EMSCRIPTEN=<path_to_emscripten> | ||
``` | ||
|
||
Binaries will be placed in `ioq3/build/release-js-js/`. | ||
|
||
To note, if you're trying to run a dedicated server, the most up to date binaries are already included in the `build` directory of this repository. | ||
|
||
|
||
## Running locally | ||
|
||
```shell | ||
echo '{ "content": "content.quakejs.com" }' > bin/web.json | ||
node bin/web.js --config bin/web.json | ||
``` | ||
|
||
|
||
## Running a dedicated server | ||
|
||
If you'd like to run a dedicated server, the only snag is that unlike regular Quake 3, you'll need to double check the content server to make sure it supports the mod / maps you want your server to run (which you can deduce from the [public manifest](http://content.quakejs.com/assets/manifest.json)). | ||
|
||
|
||
Also, networking in QuakeJS is done through WebSockets, which unfortunately means that native builds and web builds currently can't interact with eachother. | ||
|
||
|
||
Otherwise, running a dedicated server is similar to running a dedicated native server command-line wise. | ||
|
||
Setup a config for the mod you'd like to run, and startup the server with `+set dedicated 2`: | ||
|
||
```shell | ||
node build/ioq3ded.js +set fs_game <game> +set dedicated 2 +exec <server_config> | ||
``` | ||
|
||
If you'd just like to run a dedicated server that isn't broadcast to the master server: | ||
|
||
```shell | ||
node build/ioq3ded.js +set fs_game <game> +set dedicated 1 +exec <server_config> | ||
``` | ||
|
||
## Running a content server | ||
|
||
QuakeJS loads assets directly from a central content server. A public content server is available at `content.quakejs.com`, however, if you'd like you run your own (to perhaps provide new mods) you'll need to first repackage assets into the format QuakeJS expects. | ||
|
||
### Repackaging assets | ||
|
||
When repackaging assets, an asset graph is built from an incoming directory of pk3s, and an optimized set of map-specific pk3s is output to a destination directory. | ||
|
||
To run this process: | ||
|
||
```shell | ||
node bin/repak.js --src <assets_src> --dest <assets> | ||
``` | ||
|
||
And to launch the content server after the repackaging is complete: | ||
|
||
```shell | ||
node bin/content.js | ||
``` | ||
|
||
Note: `./assets` is assumed to be the default asset directory. If you'd like to change that, you'll need to modify the JSON configuration used by the content server. | ||
|
||
Once the content server is available, you can use it by launching your local or dedicated server with `+set fs_cdn <server_address>`. | ||
|
||
## License | ||
|
||
MIT |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.