Tuesday, March 23, 2010

Wrapping up libtcod, swig, and cmake nonsense soon hopefully....

While I've enjoyed the libtcod, swig, and cmake work, my interest is seriously starting to wind down. Here's a status update:

libtcod-java - See this mailing list post. Nobody has answered yet, and I have no clue how to get it working right now. This might have to be stowed.

libtcod-php - Waiting to hear back from person who wanted it to see if they wanted php4 or php5. cmake apparently only support php4 naively.

libtcod-ruby - Apparently there is some interest in this, but it isn't working for them. Will be trying to sort that out.

libtcod-cmake-osx - Working with somebody via e-mail (slowly) in order to try to get this working.

libtcod-csharp - Working with somebody via e-mail to sort out crashes and problems I'm not seeing.

Bit of libtcod swig isn't wrapping - Heightmap is down to four functions not being wrapped. BSP looks like a bit of a lost cause. The SWIG documentation on function pointers and callbacks is almost unreadable. The only way I can figure to wrap it is to remove the callback, and create functions that return lists of all the nodes in the BSP in the requested order.

4 comments:

Tom said...

hey donblas, I sent you a PM on the libtcod forums. figured I'd pop in here in case you don't see it.

Short version: I got SWIG to wrap up BSP (at least for C#) and sent you a link to the changes.

jice said...

Hey Chris,

cmake seems to work pretty smoothly out of the box and I'm pretty confident we can switch the official release to it.

Concerning swig, I'm more doubtful. Seems to be a pretty touchy horse... As far as I understand, there's no fully functional wrapper yet ? Also the current python and common lisp bindings use special functions in the wrapper.c module. I don't see how swig could make the API work without them, sounds a bit like magic to me.
I'm not against converting the BSP callback approach to a StAX-like approach. That even sounds like a good idea, but for some modules (A* pathfinding), I don't see how we can avoid callbacks.

Also I think you may have started too many workshops at the same time. Maybe you should focus on C# first and see if you can push it to the end. And feel free to put that on a shelf for a few weeks and go back to magecrawl before you're completely burnt out and leave the roguelike scene for another 6 months... ;)

donblas said...

I've come to the conclusion that the SWIG wrapper probably won't be replacing any of the existing libtcod wrappers (minus libtcod-net possibly) any time soon.

However, With Tom's patch (if it works, I haven't looked at it yet), and some of my work, I think we'll have all the important modules wrapped. I figure we'll start with an "official" LUA module, see how that goes, and bang on other languages slowly until they are usable.

I figure once I get all the modules wrapped, I can start working on magecrawl again, while working the other issues out via e-mail.

Worthstream said...

Hello!
It's a shame that swig supports only php4. -_-

Php4 is quite old and it's being phased out, so it would be great having a version for php5.

Anyway, php4 is better that nothing ;)

Thank you again! :D