I’ve written one several times over.
I suppose I ought to put it up online somewhere for y’all to use.
In the meantime, you can use the stuff I posted with my Gosper Glider Gun.
http://www.cplusplus.com/forum/lounge/75168/
Screwing with colors cross-platform is complicated by the arcane way that NCurses does it, so you need to set it up properly (with
start_color() and with a loop and
init_pair()), and then use
COLOR_PAIR() when selecting a color. Here is an example that mixes that initialization loop with actually displaying a color table:
http://www.cplusplus.com/forum/general/11032/#msg52049
Be sure to read the caveats that come with using colors in that link.
A simpler option would be just to use
putp()
to send a VT-100 compatible color command to the terminal, which you can probably get away with if you are targeting people using modern xterm or <whatever your system's terminal emulator is>. Example dumb library that does it through printf():
http://www.cplusplus.com/forum/general/18200/#msg92479
Again, terminal emulators are often not your friend when it comes to color...
...or with input. Getting extended input properly is a pain as well, but if what you have going for your game works, then you are currently golden.
Re. PDCurses:
There are a variety of PDCurses implementations and targets. The best of them (the GUI one that creates its own window for your application) is still very old, very unmaintained, and clunky. It will get the job done, but there will likely be some corner case where you are irked.
Also, PDCurses and NCurses are not identical APIs. Both have extensions to the spec, and the extensions are not compatible, even when over the same problem domain.
All that said, it is a valid option. Make sure you select a better-than-default font when you initialize PDCurses and enjoy!
Re. WINE:
Have you checked it out? It implements the Windows API, including Console Functions, and you can choose to work with either X11 (most everyone) or NCurses (people stuck on a terminal without X running) backend support.
https://wiki.winehq.org/Wine_User's_Guide#Text_mode_programs_.28CUI:_Console_User_Interface.29
In other words, with Wine, you can simply compile and run your program as-is.
Final thoughts:
Keep in mind that no matter what you do, there is going to be effort in making it work cross-platform, and your end-users will have to make sure that they are set-up properly to compile and/or use it.
Sorry.