Skip to content

ag-game/doomgeneric

Repository files navigation

doom-logo-png

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!

sshot-png

A screenshot of the Go port running on linux/amd64.

Supported targets

  • linux/386
  • linux/amd64
  • linux/arm

Failing targets

These targets were attempted but are known to not work.

  • linux/arm64: builds but crashes at runtime

Installation

On supported targets invoke $ go install modernc.org/doomgeneric@latest.

Cross compilation

On any Go platform invoke $ GOOS=<os> GOARCH=<arch> go build, where os/arch must be a supported target.

Running

On supported targets invoke $ doomgeneric -iwad DOOM.WAD. To quit the intro demo and get the game menu press the <Esc> key.

Obtaining DOOM.WAD

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.

Generating the Go code

Prerequisities

  • 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.

Go Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published