Terminal RPG

I am studying the creation of a terminal-based RPG, what are the accepted and recommended methods for writing this cross-platform way? I'm not sure which language I will use, but I need something with functionality to move the cursor and change the foreground color. Inspired by games like NetHack, such control would be ideal, and I want to be able to write it so that I can release it for windows and unix systems. I used ncurses for C ++, and I was wondering if there was anything like this for use with cross-platform projects.

Given: Java C ++ C C #

+7
source share
3 answers

If you plan to make terminal graphics, you can write your own wrapper functions for VT-100 terminal exit codes, which can, among other things, change the color of the foreground and background and move the cursor. All you have to do is write the correct escape codes.

http://www.termsys.demon.co.uk/vtansi.htm

Also, Java is probably the easiest way to be cross-platform, although itโ€™s obvious that for those who work in your game, Java runtimes are set. C and C ++ can be very cross-platform if you write your code carefully, especially if you have too many external dependencies (which is not necessary for a text game).

+2
source

I don't think there is a platform independent alternative to ncurses. It is best to use ncurses for Unix systems and pdcurses for Windows. Since the APIs are basically the same, you hopefully don't get too much duplicate code - just a couple of #ifdef here and there.

+3
source

You probably want to look into the PDCurses library ... it supports several different platforms.

+2
source

All Articles