NCurses-like functionality - Does anyone know a library?

Started by
1 comment, last by BitMaster 9 years, 6 months ago

Hello,

Sorry if this is a bit of a strange request. I'm guessing this forum likely gets requests for 3D libraries. But I'm wanting to write a game with a graphical style similar to that of Dwarf Fortress, Nethack, etc. I need a library / way of rendering a Window with 2D monospace text in it, preferably with colors as well. It must be cross-platform (Linux, Windows, OSX) and should hopefully be able to interface with the Vala programming language, although this is not necessary.

For reference, I'm coming from Python. Python had a library know as pygame, which had a sub-library called pygcurses (a cross-platform ncurses clone using SDL). Here's a link to it for reference: http://inventwithpython.com/pygcurse/. If something like this existed for a compiler language like C++ / Vala, that would be brilliant. Unfortunately, various searches have brought up nothing.

I have been told that OpenGL + Pango (http://www.pango.org/) may be able to do it, but I'm not sure how I would go about this.

Thanks,

Zesterer.

Advertisement

PDCurses? (although I don't know how well it works, I just looked it up now)

That should be enough for the platforms you mentioned I think, but note that both ncurses and PDCurses are based off the curses API so in theory if you stick to it you should be able to freely switch between both APIs depending on the platform.

There also seems to be a port of ncurses to Windows, but not sure how up to date it is (or if it's still maintained at all).

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
The last time I checked Dwarf Fortress was using PDCurses. There is also libtcod but I never really used it and it appears to not be actively developed anymore.

Sniffing around on Rogue Basin might produce more libraries or similar libraries for different languages.

This topic is closed to new replies.

Advertisement