Chocolate Doom WebAssembly port with WebSockets support

Overview

Wasm Doom

This is a Chocolate Doom WebAssembly port with WebSockets support.

Requirements

You need to install Emscripten and a few other tools first:

brew install emscripten
brew install automake
brew install sdl2 sdl2_mixer sdl2_net

Compiling

There are two scripts to facilitate compiling Wasm Doom:

./scripts/clean.sh
./scripts/build.sh

Running

Copy the shareware version of doom1.wad to ./src (make sure it has the name doom1.wad)

Then:

cd src
python -m SimpleHTTPServer

Then open your browser and point it to http://0.0.0.0:8000/

Doom should start (local mode, no network). Check doom-workers if you want to run multiplayer locally.

Inspect src/index.html for startup details.

Check our live multiplayer demo and blog post.

stdout procotol

To show important messages coming from the game while it's running we send the following formatted stdout messages, which can be parsed in the web page running the wasm:

doom: 1, failed to connect to websockets server
doom: 2, connected to %s
doom: 3, we're out of client addresses
doom: 4, ws error(eventType=%d, userData=%d)
doom: 5, ws close(eventType=%d, wasClean=%d, code=%d, reason=%s, userData=%d)
doom: 6, failed to send ws packet, reconnecting
doom: 7, failed to connect to %s
doom: 8, uid is %d
doom: 9, disconnected from server
doom: 10, game started
doom: 11, entering fullscreen
doom: 12, client '%s' timed out and disconnected

License

Chocolate Doom and this port are distributed under the GNU GPL. See the COPYING file for more information.

You might also like...
TCP Port Redirection Utility
TCP Port Redirection Utility

Overview PortBender is a TCP port redirection utility that allows a red team operator to redirect inbound traffic destined for one TCP port (e.g., 445

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

Encapsulates the two protocols of OpenVpn and Ikev2, you only need to enter the server IP and port number to realize the connection and status display, and the specific situation of the connection can be displayed at the same time。

NewVpnCore 封装了OpenVpn和Ikev2两种协议,只需要输入服务器IP和端口号即可实现连接和状态显示,同时可以显示连接的具体情况。 UniteVpn Core(第一版) 1. 模块说明 unitevpn:封装了vpn的操作和统一不同协议信息的模块 ikev2:IKEV2协议的源码 op

ScummVM (UWP Port) with improvements for stability
ScummVM (UWP Port) with improvements for stability

ScummVM UWP port with few improvements for stability Source | Original Project Features Resolve crash issue when (folder removed or moved) Add loading

Multi-protocol Port Mapping client library

libplum - Multi-protocol Port Mapping client library libplum (Port Lightweight and Universal Mapping) is a library allowing to forward ports on Networ

📡 TCP/UDP port redirector

rinetd, by Thomas Boutell and Sam Hocevar. Released under the terms of the GNU General Public License, version 2 or later. This program is used to eff

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

MASSCAN-NG: Mass IP port scanner This is an Internet-scale port scanner. It can scan the entire Internet in under 5 minutes, transmitting 10 million p

Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Free Media Player for Windows and Linux with Youtube support.

SMPLAYER SMPlayer is a free media player for Windows and Linux with Youtube support.

Comments
  • Game not run if you try to remove

    Game not run if you try to remove "-nomusic" argument

    The game freezes if you try to remove the "-nomusic" argument from the carmack.js file.

    I'm trying to reproduce the Doom as IS using a original WAD from my copy, but i can't enable the music on the game.

    Can anyone help me with this?

    image
    opened by ebellumat 0
  • dirent.h present but cannot be compiled

    dirent.h present but cannot be compiled

    It said to report this to you so. checking dirent.h presence... yes configure: WARNING: dirent.h: present but cannot be compiled configure: WARNING: dirent.h: check for missing prerequisite headers? configure: WARNING: dirent.h: see the Autoconf documentation configure: WARNING: dirent.h: section "Present But Cannot Be Compiled" configure: WARNING: dirent.h: proceeding with the compiler's result configure: WARNING: ## ----------------------------------- ## configure: WARNING: ## Report this to [email protected] ## configure: WARNING: ## ----------------------------------- ## checking for dirent.h... no

    opened by MechaXYZ 0
Simple, small, C++ embeddable webserver with WebSockets support

Seasocks - A tiny embeddable C++ HTTP and WebSocket server for Linux Features Simple C++ API Serves static content from disk API for building WebSocke

Matt Godbolt 624 Jan 3, 2023
Doom classic port to lightweight RISC‑V

Doom classic port to lightweight RISC-V This is a port to try and make adapting/running doom to simple RISC-V platform easier with the code to adapt w

Sylvain 56 Dec 1, 2022
Port-Fin(port finder) is a tool which scans for open and closed port on a website/host.

Port-Fin(port finder) is a tool which scans for open and closed port on a website/host. This tool scans the state of the well known/common ports.

AnonabdulJ 4 Dec 14, 2021
C library for easy WebSockets server.

libwebsock C library for easy WebSockets servers. This library allows a developer to quickly develop WebSocket servers by focusing on the actual logic

Payden Sutherland 208 Nov 12, 2022
WebSockets in C for Embedded Applications

WebSockets in C WIC is a C99 implementation of rfc6455 websockets designed for embedded applications. WIC decouples the websocket protocol from the tr

Cameron Harper 59 Dec 28, 2022
2048 written in C and compiled to WebAssembly

2048.wasm 2048 written in C and compiled to WebAssembly Play Use the arrow keys ( ᐊ ᐅ ᐃ ᐁ ) to slide the tiles. press n to play over. Usage Compile C

Nishchith Shetty 48 Nov 1, 2022
Run statically-compiled WebAssembly apps on any embedded platform

embedded-wasm-apps Run native, statically-compiled AssemblyScript, Rust, C/C++, TinyGo, Zig, etc. apps on any platform How it works The approach is si

Volodymyr Shymanskyy 112 Dec 20, 2022
C++ Requests: Curl for People, a spiritual port of Python Requests

C++ Requests: Curl for People Announcements The cpr project has new maintainers: Fabian Sauter and Tim Stack. TLDR C++ Requests is a simple wrapper ar

Huu Nguyen 5.2k Jan 6, 2023
Sonic the Hedgehog (1991, Sega Genesis / MegaDrive) C Port

SoniCPort Sonic the Hedgehog (1991, Sega Genesis / MegaDrive) C Port Dependencies SDL2 (if COMPILE_SDL2 is set to ON) pkg-config (for builds that requ

CuckyDev 105 Dec 11, 2022
Dynamic patch `wslhost.exe` to listen port on any interface.

WSLHostPatcher Dynamic patch wslhost.exe to listen port on any interfaces. How it work The localhost port actually forward by wslhost.exe on Windows,

CzBiX 404 Dec 25, 2022