Temple of The Roguelike Forums
Development => Programming => Topic started by: summoner on May 20, 2015, 09:31:48 AM
-
For my current project, I already implemented my input and display function.
Are there any C/C++ library for roguelike without any dependencies?
libtcod is a good library but it depends on SDL.
Thank you very much for your help
-
It depends what you call a 'dependency', why you want to avoid it, and what you need the library for. "C/C++ roguelike" is not a very precise term (the very 'roguelike' word is pretty vague these days). At least say if this is going to be ASCII or tiles, and which platform are you targeting.
-
Do you mean non-windowing functionality like FOV and generators? Obviously libtcod does not use SDL for anything besides windowing so I believe you can get rid of it by modifying makefiles to exclude the console subsystem.
As for other utility/mechanics C/C++ libraries, sadly I do not know about any.
-
I tried to avoid SDL because I implemented another library for input/rendering.
So I actually need the core mechanics like FOV and map generator, which should be independent to target platform.
Do you mean non-windowing functionality like FOV and generators? Obviously libtcod does not use SDL for anything besides windowing so I believe you can get rid of it by modifying makefiles to exclude the console subsystem.
I did try that but gave up.
Errors occurred everywhere after I tried to remove some input/render functions in header files.
-
Errors occurred everywhere after I tried to remove some input/render functions in header files.
It should not be that hard. I removed direct references to SDL from libtcod.h and libtcod_int.h, then edited out SDL and output subsystem implementations from makefile:
libtcod-nosdl.diff (http://pastebin.com/TtTxiZcq)
And now resulting libtcod.so does not have SDL dependency anymore:
$ ldd libtcod.so
linux-vdso.so.1 => (0x00007fff50946000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5479649000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5479445000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5479227000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5478e67000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5479bc1000)
-
Errors occurred everywhere after I tried to remove some input/render functions in header files.
It should not be that hard. I removed direct references to SDL from libtcod.h and libtcod_int.h, then edited out SDL and output subsystem implementations from makefile:
libtcod-nosdl.diff (http://pastebin.com/TtTxiZcq)
And now resulting libtcod.so does not have SDL dependency anymore:
$ ldd libtcod.so
linux-vdso.so.1 => (0x00007fff50946000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5479649000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5479445000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5479227000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5478e67000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5479bc1000)
Thanks for help.
I think you are using version 1.6.0. I will switch from 1.5.1 stable to that version and retry.