Brifing

Battlezone Online: Bringing BZFlag to the Browser

A browser-based 3D tank game leveraging WebXR and Node.js for cross-platform multiplayer.

Hacker News: Front Page2 min

1Browser-Based Tank Combat

Battlezone Online provides a free 3D multiplayer experience directly within web browsers. It supports desktop, mobile, and VR headset platforms without requiring local software installation. The project functions as a client and server interface for BZFlag, allowing users to join public servers and engage in classic tank combat seamlessly.

2Technical Stack Architecture

The server architecture is built on Node.js, while the client utilizes Three.js for rendering. Communication between components is handled via WebSockets, WebTransport, and WebRTC protocols. This stack ensures low-latency interactions across various devices, maintaining compatibility with existing BZFlag infrastructure while enabling modern web-based access for all connected players.

3Immersive VR Integration

The game features native WebXR support for immersive VR experiences. It utilizes xr-launch.js to request sessions during user activation events like page focus or visibility changes. If a headset is detected, a one-tap button appears, allowing players to bypass 2D landing pages and enter the game environment directly in VR.

4Deployment and Containerization

Deployment relies on Docker images containing linux/amd64 and linux/arm64 variants. These images are built on Ubuntu 26.04 using Node.js 22. The CI pipeline runs on the same environment, ensuring consistency between development and production. Users are encouraged to use Docker for easier updates and configuration management behind reverse proxies.

5Release Management Standards

The project adheres to strict SemVer vX.Y.Z tagging for stable releases, excluding prerelease metadata. The release process requires a clean git status, ensuring that all changes, including version updates in public/version.mjs, are committed before tagging. Failed workflows are left as-is, with the CHANGELOG.md serving as the primary record of progress.

6Input and Control Systems

Controls are documented in detail, covering keyboard, mouse, touch, gamepads, and XR controllers. In VR, the system keyboard is triggered when text fields like Name or MOTD gain focus. The implementation ensures that input fields start fresh edits, preventing appending issues and providing a smooth experience for users within virtual environments.

7Licensing and Asset Provenance

The project is licensed under the GNU Affero General Public License v3.0. Asset licensing, including models and textures, remains complex due to varied origins. The team is actively working to document the provenance of all assets, encouraging contributors to clarify authorship in issues to ensure full legal transparency for the repository.

8Development Workflow Insights

Battlezone Online serves as a bridge for the legacy BZFlag ecosystem into the modern web. By automating server polling and providing a unified client, it lowers the barrier to entry. Future development focuses on refining WebXR interactions and maintaining clear, reproducible release cycles to support the growing browser-based player community.

Original article: Hacker News: Front Page — Battlezone Online: Bringing BZFlag to the Browser