uchicago-cs / chiventure

A text adventure game engine developed in UChicago's CMSC 22000 - Introduction to Software Development
40 stars 13 forks source link

Research TUI libraries #15

Closed borjasotomayor closed 5 years ago

borjasotomayor commented 5 years ago

Research a few libraries for building Text-based User Interfaces, possibly including libraries for building terminal-based games. For each library, we'll provide some pros and cons (and maybe some sample code).

Possible libraries to look into:

adomiter commented 5 years ago

Number 1: NCurses

Basic info: In c file: #include To link: gcc -lncurses prog.c (Source: http://www.cs.ukzn.ac.za/~hughm/os/notes/ncurses.html)

Explanation of where to get: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html#WHATIS

PROS:

CONS:

THINGS TO LOOK INTO:

omorkved commented 5 years ago

Number 2: SDL PROS:

CONS:

Things to look into:

sebvil commented 5 years ago

On how to get ncurses: for linux, it is simpler to run sudo apt-get install libncurses5-dev libncursesw5-dev

omorkved commented 5 years ago

More info on SDL_mixer: http://sdl.beuc.net/sdl.wiki/SDL_mixer

example of an SDL_mixer function int Mix_Volume(int channel, int volume); ->Looks relatively easy to user/understand

omorkved commented 5 years ago

Number 6 Turbo Vision: Written in C++ (also versions in Pascal) https://www.openhub.net/p/tvision Good project site and place to download: http://tvision.sourceforge.net/

PROS:

CONS:

My conclusion is that Turbo Vision is not a super likely contender against NCurses and SDL. Still wanted to include for comparison

adomiter commented 5 years ago

NCurses continued...

Number 3: CDK Curses Development Kit (a library of widgets)

PROS:

CONS:

Things to look into:


Number 4: PDCurses -a curses library for environments that don't fit the termcap/terminfo model.

PROS:

CONS:

Things to look into:

adomiter commented 5 years ago

Additional sources to learn more about the NCurses library and its functions:

borjasotomayor commented 5 years ago

Quick tip: when you are researching libraries, and you find yourself wishing you could smash two libraries together (because neither of them has exactly what you want, but the union of the two does), googling for "X with Y" can be surprisingly effective (to see whether someone has already worked on integrating those two libraries, or to see whether someone has developed a library that attempts to provide the best of both worlds).

A cursory search for "ncurses with SDL" leads to two libraries:

libtcod looks particularly promising given that it is game-oriented and may even facilitate tasks like drawing maps, etc.

adomiter commented 5 years ago

Number 5: Libtcod

PROS:

CONS:

Things to look into:

omorkved commented 5 years ago

Number 7: Concol

This library is mainly concerned with color support

PROS:

Con:

Look into: Their examples folder: https://github.com/rofl0r/concol/tree/master/examples

borjasotomayor commented 5 years ago

All: Great job documenting all your research! If you have not already done so, you should now try to narrow this down to 2-3 libraries for issue #16. You can discuss that here but, if you discuss it out-of-band (Slack, in person, etc.) make sure to post a comment explaining why you feel those 2-3 libraries are the most promising ones.

omorkved commented 5 years ago

(Note to Team: See Sam's comment in #16 for our collective response to this)

All: Great job documenting all your research! If you have not already done so, you should now try to narrow this down to 2-3 libraries for issue #16. You can discuss that here but, if you discuss it out-of-band (Slack, in person, etc.) make sure to post a comment explaining why you feel those 2-3 libraries are the most promising ones.

omorkved commented 5 years ago

We have chosen ncurses for now (see Sam's comment in #16 )--may add an additional library on top of it in later sprints if we choose to support additional features.

(@mpcsh I think I'm suppose to ask you to approve me closing this issue)

omorkved commented 5 years ago

@mpcsh Reopened. Is this issue complete?

borjasotomayor commented 5 years ago

Yes, please go ahead and close it.

mpcsh commented 5 years ago

Issue Score: ✓+

Comments: Great work here! This is a model issue.