After DOOM was ported to javascript and even made to run inside a PDF document, the time has come for a Go port, don't you think?
This is a CGo-free port of doomgeneric using ccgo/v4.
It is just a proof of concept. Supports only a few Linux/X11 targets. No sound. No plans to work on it more. Merge requests are welcome, though!
A screenshot of the Go port running on linux/amd64.
- linux/386
- linux/amd64
- linux/arm
These targets were attempted but are known to not work.
- linux/arm64: builds but crashes at runtime
On supported targets invoke $ go install modernc.org/doomgeneric@latest
.
On any Go platform invoke $ GOOS=<os> GOARCH=<arch> go build
, where os/arch must be a supported target.
On supported targets invoke $ doomgeneric -iwad DOOM.WAD
. To quit the intro demo and get the game menu press the <Esc>
key.
Quoting from doomgeneric README.TXT
Here it is, at long last. The DOOM source code is released for your non-profit use. You still need real DOOM data to work with this code. If you don't actually own a real copy of one of the DOOMs, you should still be able to find them at software stores.
- Clone the doomgeneric repository.
- Install ccgo/v4:
$ go install modernc.org/ccgo/v4@latest
(v4.25.0 or later required).
The steps below work only on supported targets. In the doomgeneric repository invoke:
$ cd doomgeneric
$ make clean
$ go mod init example.com/doom
$ go get modernc.org/libc@latest modernc.org/libX11@latest
$ ccgo --doom -exec make CC=gcc
$ CGO_ENABLED=0 go build doomgeneric.go
If you prefer using clang, omit the 'CC=gcc' part above.