superjamie / alphaman-src

Source code to the 1995 DOS roguelike game Alphaman
MIT License
54 stars 6 forks source link

Linux port? #1

Closed ryanfantus closed 1 year ago

ryanfantus commented 1 year ago

Hi Jamie, any idea how tough it would be to port this to a native linux build?

superjamie commented 1 year ago

Hey! Always cool to see modern interest in Alphaman :sunglasses:

If you only want to play the game on Linux, DOSBox is the easiest way. The existing downloads you can find around the internet just work.

If you want a native binary for Linux and other OSes, it would probably be easiest to get this running on QB64, which is a modern BASIC environment with intentional QBasic/QuickBasic compatibility.

I've only looked at QB64 briefly, but it seems to have things which intercept DOS screen drawing to the video memory at 0xB800 like Jeff did in alpclib.c. I don't know if QB64 can accept external C like this. Maybe Jeff's code would run with very few changes, or maybe you'd need to port all his C/assembly stuff to QB64 screen drawing routines. Jeff made those parts small/efficient for code size constraints (one floppy disk) and performance reasons (286/386 without floating point) which aren't a concern to us today. Don't worry about QB64 being "slower than C" or anything like that.

If you wanted to rewrite the game in a new language (C, C++, C#, Rust, Python, JavaScript, etc) that's a big project. I'd love to do something like that. I have made a brief start in C and SDL privately, it currently just draws the title/game screen, has the strings decoded, and data structures for items. I probably lack the time to finish it.

A side note, I don't really want to accept modernisation of the code into this repo. I'd rather keep this as a snapshot in time of Jeff's original source.

However, if you fork it and get a QB64 build or other port working, let me know and I'll include it in the front page README so interested people can find it. You could also add your port to the Alphaman Roguebasin page or even start an entire new page for your project.

ryanfantus commented 1 year ago

Hey Jamie, thanks for the awesome reply here!

Sounds good re: keeping this repo totally virgin. I get that fully.

Maybe I'll see if I can hack together some semblance of a port myself. I think for my purposes, I'd probably want to wire it up to ncurses for native terminal output. Who knows, maybe it's not as tough as I assume :)