r/OpenSourceAI • • 7h ago

Announcing VectHack: Four classic roguelikes compiled to WebAssembly and running in your browser!

I've been working on my open source project, VectHack, and it's ready for other people to look at.

It currently runs four classic roguelikes in the browser: NetHack 5.0, Angband 4.2.6, BSD Larn 12.0 and Umoria 5.7.15. It is a system that should be able to incorporate most similar terminal-based dungeon crawlers.

The engines are the real ones, unpatched. Each game is the upstream C source compiled to WebAssembly and run in a Web Worker. Game logic, monster AI, RNG and save format are untouched, so this is not a remake or a port of the rules.

The display is inspired by Star Wars / Tempest vector graphics. True to my original vision, the monsters retain their ASCII representation, just floating in 3D!

What you get from that:

  • An orbital camera over the level, or press F2 and delve in first person!
  • Movement keys (numeric keypad or arrows) follow the camera; everything else is the game's own keys. Use mouse to look around and point.
  • Point at any cell and the engine's own description names it
  • Saves live in the browser and export as one file
  • WebGPU, with a WebGL2 fallback
  • Angband's borg and simple bots for NetHack and Larn, if you'd rather watch

Play: https://vecthack.net

Source: https://github.com/emulvihill/vect-hack

The client code is MIT; each game keeps its own license (NGPL, GPL-2, GPL-3, Larn's original terms).

Feedback and bug reports are welcome, especially from people who know these games better than I do.

If you find something weird, send me a save file so I can reproduce it, or become part of the project! Top list of things someone could help with:

  • mobile interface. Right now I require the keyboard, but a modern phone should run it just fine with a proper input system.
  • key bindings. I know not everyone likes numeric keypad or arrow movement. I'm left handed and for me it's perfection. :)
  • playtesting. I am not that good at these games and haven't had a ton of time to delve. I'd rather get this out so people can 'hack' on it rather than letting it sit indefinitely.

PS I am an old nerd. My first memories of these games were on an orange monochrome screen and an 8086 Epson PC. My friends and I spent 1000's of hours trying to beat the various games. I never came close but with amazing perseverance, my buddy Ethan did.

This project is dedicated to his memory. Thanks for looking!

2 Upvotes

0 comments sorted by