Xash3D-FWGS Emscripten Web Ports Monorepo 
This project is a Lerna-managed monorepo for running and compiling WebAssembly builds of Xash3D-FWGS, an open-source reimplementation of the GoldSource engine, in the browser using Emscripten.
npm install xash3d-fwgs hlsdk-portable cs16-client
import { Xash3D } from "xash3d-fwgs"
const x = new Xash3D({
canvas: document.getElementById('canvas'),
arguments: ['-game', 'cstrike'],
})
await x.init()
x.main()
x.Cmd_ExecuteString('map de_dust2')
x.Cmd_ExecuteString('sv_cheats 1')
x.Cmd_ExecuteString('noclip')
x.Cmd_ExecuteString('kill')
x.quit()
Credits & Acknowledgements
Special thanks to the people who made this project possible:
- @ololoken — graphics, WebGL2, and resolving many issues
- @ludufre — Metamod and AMX Mod X support, and Docker images
Included Packages
- xash3d-fwgs: Core engine build for WebAssembly.
- hlsdk-portable: Portable Half-Life SDK game logic.
- cs16-client: Counter-Strike 1.6 client build for the web.
- webxash3d-mserver: WebXash3D MServer written in TypeScript for in a game server list.
Docker Servers
Ready-to-deploy Docker images for Counter-Strike 1.6 and Half-Life web servers:
- cs-web-server: Vanilla CS 1.6 web server with client and dedicated server
- cs-web-server-metpamx: CS 1.6 web server with Metamod-P & AMX Mod X pre-installed
- hl-web-server: Vanilla HLDM web server with client and dedicated server
- hl-web-server-metpamx: HLDM web server with Metamod-P & AMX Mod X pre-installed
All servers support browser-to-server networking and are fully Dockerized for easy deployment.
Getting Started
Clone the repository
git clone --recurse-submodules https://github.com/yohimik/webxash3d-fwgs.git
cd webxash3d-fwgs
Install Dependencies
pnpm install
Game Content
You must provide your own game files (e.g., from Steam):
steamcmd +force_install_dir ./hl +login your_steam_username +app_update 70 validate +quit
Compile and run
To build and run a project, go to the examples/ folder and choose the example that matches the game or setup you want.
hlsdk
Screenshots (black frames - mac book camera, blue frames - browser active outline)

cs16
Screenshots (black frames - mac book camera, blue frames - browser active outline)

tf15-client
Cannot be supported at this moment (wait for freevgui).
WebRTC Online Mod
Screenshots

Discord Community
Need help? Want to share your project or ideas? Join our Discord community to connect with others!
TODO
WebRTC/UDP proxy
Support WebRTC/UDP proxy (webxash3d-mserver).
Engine Touch Support (potentially)
Enable touch support at the engine level.
Requires isNeedTouch engine function support.
Fix Text Inputs (potentially)
Text inputs are not rendered as standard HTML input fields, which makes text input impossible on mobile devices.
Async/lazy loading (potentially)
Patch the FS module to load only the currently required game files using fetch, instead of loading all files into RAM.
Requires EAGAIN support from the engine.
Gles3compat improves (potentially)
Support GLES3Compat batching and fix Vertex buffer is not big enough for the draw call.Understand this warning warning.