Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rlutil - simple utility collection for C++ and C

207 views
Skip to first unread message

aave

unread,
Mar 6, 2010, 4:29:39 AM3/6/10
to
From the RogueTemple forums:

rlutil
Tiny C++ and C utility collection for cross-platform console roguelike
development.

Just in time for the 2010 7DRL Challenge!

rlutil consists of mainly I/O functions that can be used to create
pure console mode roguelikes (or other apps) that work on both Windows
and Linux. I am aware of that there are libraries like curses that
does this, but since I have seen many people using e.g. simple
kbhit() / getch() combo for input, I think this has use for at least
making those games easily cross-platform while using familiar
functions. I also had many of these functions already coded and I like
building stuff from the ground-up.

Main functionalities include colored output, keyboard input that
doesn't require Return-keypresses and cursor manipulation. It also
behaves nicely whether you use C++ or C - meaning that e.g. it
automagically uses std::strings, streams and namespaces with C++.

WinAPI or ANSI escape codes are used depending on platform. I would
like to have Mac OSX compatibility, but I have no way of testing/
developing on that platform so contributions are welcomed.

Webpage: http://tapio.github.com/rlutil/
Documentation: http://tapio.github.com/rlutil/docs/HTML/index.html
Browse sources: http://github.com/tapio/rlutil
Download zip: http://github.com/tapio/rlutil/zipball/master
Clone url:
$ git clone git://github.com/tapio/rlutil.git

Sir_Lewk

unread,
Mar 6, 2010, 11:50:04 AM3/6/10
to

This looks neat, I'm not sure I entirely understand what niche it
fills. PDCurses is cross-platform and I've successfully built windows
binaries linking against it that worked without modification. Are
there situations where the cross platform-ness of PDCurses fails for
some reason? Is it meant to be used for cases where full-blown curses
would be overkill?

aave

unread,
Mar 6, 2010, 6:58:42 PM3/6/10
to
On 6 maalis, 18:50, Sir_Lewk <sirl...@gmail.com> wrote:
> This looks neat, I'm not sure I entirely understand what niche it
> fills.  PDCurses is cross-platform and I've successfully built windows
> binaries linking against it that worked without modification.  Are
> there situations where the cross platform-ness of PDCurses fails for
> some reason?  Is it meant to be used for cases where full-blown curses
> would be overkill?

Here's the short answer to your question: Easy porting of existing
projects and rapid prototyping.

To the longer one, I answered a similar query @ RogueTemple, here's my
extended thoughts:

Curses needs initialization (and cleanup). Granted, it is not very
hard, but with this you can just swap conio.h to rlutil.h and
kbhit() / getch() / gotoxy() based game is now playable on Linux too
(or at least very easy to port if other Windows specific stuff is
used.) After all, I've seen many threads on the internet asking for
these functions on Linux. Later, I might also add some WinAPI
compatibility functions as well as some specifically for roguelike
development targeted utilities (that have no relation to console I/O).

I would actually still recommend using curses (or more specifically,
ncurses / PDcurses) for I/O, but this library has its uses for easy
porting of existing projects and rapid prototyping. (Also, I think
PDcurses uses SDL graphical window, so it is not a pure console (I'm
not sure of this though).) I have not excluded the possibility to
include an optional curses wrapper that would hide most of the
initialization stuff, yet provide powerful functionality.

0 new messages