I'm writing a wrapper of the libtcod library for the Nimrod language: https://github.com/Vladar4/libtcod-nim/tags
Libtcod, a.k.a. “The Doryen Library”, is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.
Libtcod homepage: http://doryen.eptalys.net/libtcod
Features: http://doryen.eptalys.net/libtcod/features
For this moment (v0.9) I wrapped all functions and stuff and now testing and searching for bugs.
You can try to build samples.nim (build scripts provided), or run one provided with official package to see some cool features of this lib.
Unfortunately, windows-compiled samples.nim seems to crash for unknown reasons, when linix-binary runs pretty well. So, there is a lot work to do yet.
Version 0.95 is out!
All features are implemented. Now wrapper requires heavy testing, so go ahead! =)
Also, I completely rewrote parser module to Nimrod due to compatibility issues with some c-types, so now it uses native nimrod sequences, etc.
Changelog:
Hi there, I've saw your wrapper on the libtcod page thanks to jice, but i'm having troubles compiling the samples.
Here's the compiling log:
C:\Documents and Settings\Funcionario\My Documents\Downloads\libtcod-nim-0.95\libtcod-nim-0.95>nimrod c -p:libtcod -d:debug samples.nim Hint: used config file 'C:\Program Files\Nimrod\config\nimrod.cfg' [Conf] Hint: system [Processing] Hint: samples [Processing] Hint: libtcod [Processing] Hint: os [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: times [Processing] Hint: winlean [Processing] Hint: list [Processing] Hint: libtcod_define [Processing] Hint: unsigned [Processing] c:\program files\nimrod\lib\core\unsigned.nim(55, 12) Hint: 'T' is declared but not used [XDeclaredButNotUsed] Hint: math [Processing] SIGSEGV: Illegal storage access. (Attempt to read from nil?)
So I wonder if there's a problem in the wrapper itself or in the language library. Or if i'm doing something wrong.
Edit: Btw, I did a similar post on the libtcod forum.
I'm glad you like it! :)
If you need any more help, you can join our IRC channel at irc.freenode.net/#nimrod.
Hello. I've been having trouble trying to get my application to take input. I've tried various methods and so far, nothing has worked. The code looks like this:
import libtcod
libtcod.consoleInitRoot(cint 80, cint 50, "Game", vsync=false) echo "Beginning..."
action = libtcod.consoleCheckForKeypress(cint EVENT_KEY_PRESS)
libtcod.quit() system.quit()