{"id":13570892,"url":"https://github.com/inolen/quakejs","last_synced_at":"2025-04-08T13:03:29.386Z","repository":{"id":10121627,"uuid":"12190874","full_name":"inolen/quakejs","owner":"inolen","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-24T02:16:36.000Z","size":1903,"stargazers_count":1511,"open_issues_count":63,"forks_count":216,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-01T12:08:45.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inolen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-08-18T05:40:15.000Z","updated_at":"2025-03-29T06:34:58.000Z","dependencies_parsed_at":"2024-01-18T04:23:05.819Z","dependency_job_id":null,"html_url":"https://github.com/inolen/quakejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inolen%2Fquakejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inolen%2Fquakejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inolen%2Fquakejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inolen%2Fquakejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inolen","download_url":"https://codeload.github.com/inolen/quakejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847601,"owners_count":21006099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T14:00:56.176Z","updated_at":"2025-04-08T13:03:29.347Z","avatar_url":"https://github.com/inolen.png","language":"JavaScript","readme":"# QuakeJS\n\nQuakeJS is a port of [ioquake3](http://www.ioquake3.org) to JavaScript with the help of [Emscripten](http://github.com/kripken/emscripten).\n\nTo see a live demo, check out [http://www.quakejs.com](http://www.quakejs.com).\n\n\n## Building binaries\n\nAs a prerequisite, you'll need to have a working build of [Emscripten](http://github.com/kripken/emscripten), then:\n\n```shell\ncd quakejs/ioq3\nmake PLATFORM=js EMSCRIPTEN=\u003cpath_to_emscripten\u003e\n```\n\nBinaries will be placed in `ioq3/build/release-js-js/`.\n\nTo 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.\n\n\n## Running locally\n\nInstall the required node.js modules:\n\n```shell\nnpm install\n```\n\nSet `content.quakejs.com` as the content server:\n\n```shell\necho '{ \"content\": \"content.quakejs.com\" }' \u003e bin/web.json\n```\n\nRun the server:\n\n```shell\nnode bin/web.js --config ./web.json\n```\n\nYour server is now running on: [http://0.0.0.0:8080](http://0.0.0.0:8080)\n\n\n## Running a dedicated server\n\nIf 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)).\n\nAlso, networking in QuakeJS is done through WebSockets, which unfortunately means that native builds and web builds currently can't interact with eachother.\n\nOtherwise, running a dedicated server is similar to running a dedicated native server command-line wise.\n\nSetup a config for the mod you'd like to run, and startup the server with `+set dedicated 2`:\n\n```shell\nnode build/ioq3ded.js +set fs_game \u003cgame\u003e +set dedicated 2 +exec \u003cserver_config\u003e\n```\n\nIf you'd just like to run a dedicated server that isn't broadcast to the master server:\n\n```shell\nnode build/ioq3ded.js +set fs_game \u003cgame\u003e +set dedicated 1 +exec \u003cserver_config\u003e\n```\n\n### baseq3 server, step-by-step\n\n*Note: for the initial download of game files you will need a server wth around 1GB of RAM. If the server exits with the message `Killed` then you need more memory*\n\nOn your server clone this repository. `cd` into the `quakejs` clone and run the following commands:\n\n```\ngit submodule update --init\nnpm install\nnode build/ioq3ded.js +set fs_game baseq3 +set dedicated 2\n```\n\nAfter running the last command continue pressing Enter until you have read the EULA, and then answer the `Agree? (y/n)` prompt. The base game files will download. When they have finished press Ctrl+C to quit the server.\n\nIn the newly created `base/baseq3` directory add a file called `server.cfg` with the following contents (adapted from [Quake 3 World](http://www.quake3world.com/q3guide/servers.html)):\n\n```\nseta sv_hostname \"CHANGE ME\"\nseta sv_maxclients 12\nseta g_motd \"CHANGE ME\"\nseta g_quadfactor 3\nseta g_gametype 0\nseta timelimit 15\nseta fraglimit 25\nseta g_weaponrespawn 3\nseta g_inactivity 3000\nseta g_forcerespawn 0\nseta rconpassword \"CHANGE_ME\"\nset d1 \"map q3dm7 ; set nextmap vstr d2\"\nset d2 \"map q3dm17 ; set nextmap vstr d1\"\nvstr d1\n```\n\nreplacing the `sv_hostname`, `g_motd` and `rconpassword`, and any other configuration options you desire.\n\nYou can now run the server with \n\n```\nnode build/ioq3ded.js +set fs_game baseq3 +set dedicated 2 +exec server.cfg\n```\n\nand you should be able to join at http://www.quakejs.com/play?connect%20SERVER_IP:27960, replacing `SERVER_IP` with the IP of your server.\n\n## Running a content server\n\nQuakeJS 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.\n\n### Repackaging assets\n\nWhen 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.\n\nTo run this process:\n\n```shell\nnode bin/repak.js --src \u003cassets_src\u003e --dest \u003cassets\u003e\n```\n\nAnd to launch the content server after the repackaging is complete:\n\n```shell\nnode bin/content.js\n```\n\nNote: `./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.\n\nOnce the content server is available, you can use it by launching your local or dedicated server with `+set fs_cdn \u003cserver_address\u003e`.\n\n## License\n\nMIT\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finolen%2Fquakejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finolen%2Fquakejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finolen%2Fquakejs/lists"}