Author Topic: Any C/C++ library for roguelike without SDL dependency?  (Read 10110 times)

summoner

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Any C/C++ library for roguelike without SDL dependency?
« 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

TheCreator

  • Rogueliker
  • ***
  • Posts: 370
  • Karma: +0/-0
    • View Profile
    • Fame
    • Email
Re: Any C/C++ library for roguelike without SDL dependency?
« Reply #1 on: May 20, 2015, 10:45:03 AM »
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.
Fame (Untitled) - my game. Everything is a roguelike.

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Any C/C++ library for roguelike without SDL dependency?
« Reply #2 on: May 20, 2015, 11:28:09 AM »
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.

summoner

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Any C/C++ library for roguelike without SDL dependency?
« Reply #3 on: May 20, 2015, 11:55:57 AM »
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.
« Last Edit: May 20, 2015, 01:27:45 PM by summoner »

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Any C/C++ library for roguelike without SDL dependency?
« Reply #4 on: May 20, 2015, 02:13:44 PM »
Quote from: summoner
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

And now resulting libtcod.so does not have SDL dependency anymore:
Code: [Select]
$ 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)
« Last Edit: May 20, 2015, 02:18:34 PM by Cfyz »

summoner

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Any C/C++ library for roguelike without SDL dependency?
« Reply #5 on: May 21, 2015, 01:54:06 AM »
Quote from: summoner
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

And now resulting libtcod.so does not have SDL dependency anymore:
Code: [Select]
$ 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.