For reference, I'm using Windows 7 and I have previous experience with
Perl, Java, and other programming languages (especially PHP) but it's
been years and I'm rusty, so consider me an advanced hobbyist when it
comes to programming.
While libtcod seems like a great resource, I feel like it provides
maybe a little too much work already done for me, and I'd like to go
through the learning process myself. So... what's a good alternative
first step? Do I gather correctly that "curses" is the library for
drawing a text console? If so, which implementation, how does one
install it, and how do I draw my first window and "@" symbol?
(By the way, when it comes to installation, I'd like to put all files
in a single directory so that I can carry my game around on a thumb
drive and run it on other Windows computers. So if there's a choice,
I'd rather not install libraries in my Python root directories... not
sure exactly what my options are though.)
> While libtcod seems like a great resource, I feel like it provides
> maybe a little too much work already done for me, and I'd like to go
> through the learning process myself. So... what's a good alternative
> first step? Do I gather correctly that "curses" is the library for
> drawing a text console? If so, which implementation, how does one
> install it, and how do I draw my first window and "@" symbol?
hi, I wrote the Kooneiform articles, I admit I'm a little biased toward
libtcod :). But there are a few other libraries I've been meaning to try
out too. You can't go wrong looking at the Roguebasin pages to start:
http://roguebasin.roguelikedevelopment.org/index.php?title=Python#Roguelike_games_in_Python
http://roguebasin.roguelikedevelopment.org/index.php?title=Category:Library
Many of those Python RLs have source available so that'll get you
started. It'll be a little more challenging using Windows and Curses but
I think it's doable.
You also could always go with something like Pygame and simulate a
console as libtcod does, but then of course you couldn't play in a
terminal.
hth, GO
Hi George, thanks for the articles, I'll certainly use them as I flesh
out the game. Certainly libtcod is a great resource if I were making
Roguelikes on a regular basis... for now, though, I just want to make
one as an exercise in programming.
So far I've figured out that WConio is the library for controlling
terminals (like curses on Linux) but am having trouble getting it up
and running. The documentation (http://newcenturycomputers.net/
projects/wconio.html) says "Place _WConio.pyd and WConio.py in a
directory in your Python path." I've done so and am getting the error
"DLL load failed: %1 is not a valid Win32 applicaton." when I try to
import WConio. Perhaps my problem is that I'm running 64 bit windows
and WConio prefers 32-bit? I have no other hypotheses at the moment.
I'll take a look at UniCurses, thanks for that link!
I wasn't able to find any information about a library called simply
"console", perhaps because it's difficult to Google nouns like that.
> So far I've figured out that WConio is the library for controlling
> terminals (like curses on Linux) but am having trouble getting it up
> and running. The documentation (http://newcenturycomputers.net/
> projects/wconio.html) says "Place _WConio.pyd and WConio.py in a
> directory in your Python path." I've done so and am getting the error
> "DLL load failed: %1 is not a valid Win32 applicaton." when I try to
> import WConio. Perhaps my problem is that I'm running 64 bit windows
> and WConio prefers 32-bit? I have no other hypotheses at the moment.
>
> I'll take a look at UniCurses, thanks for that link!
> I wasn't able to find any information about a library called simply
> "console", perhaps because it's difficult to Google nouns like that.
I've seen similar errors in the libtcod forums when 64-bit Python users
attempt to use the 32-bit libtcod Python binding; you may just have to
use a 32 bit Python installation for certain libraries. Something like
virtualenv might help you out here as you start to experiment. I've also
heard of people using PDCurses for Windows but have no experience with
that myself.
Sorry, when I wrote 'console' I was just using the term generically. :)
Same thing is also happening with UniCurses and the PDCurses.dll ...
"%1 is not a valid Win32 application". I suppose it'd be much easier
on me if I just switched to a 32 bit Python installation. That is,
unless some helpful member of the community replies in the next 24
hours with an awesome solution... (dramatic pause...)
On an unrelated note, am I the only one who sees libtcod and
immediately thinks of T. Coddington Van Voorhees VII?
So, I think I can use this version of curses... if only there were
some documentation!
Yes :D
Why not just ignore the extra features of libtcod and just use it as a
framebuffer?
The libtcod has one of the better console interfaces for just saying
"I want a character of colour X to show up at location P".
--
Jeff Lait
(POWDER: http://www.zincland.com/powder)