Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split libtcod into multiple libraries. #147

Open
4 tasks
HexDecimal opened this issue May 24, 2023 · 0 comments
Open
4 tasks

Split libtcod into multiple libraries. #147

HexDecimal opened this issue May 24, 2023 · 0 comments

Comments

@HexDecimal
Copy link
Collaborator

Libtcod's size makes it difficult to port, maintain, and document. It has too many things at once and some of my tools can't handle that very well.

  • Move all field-of-view and line-of-sight functions to libtcod-fov, this is a good module which should be made independent, I think more projects would use it if it wasn't attached to libtcod.
  • Move rendering, console, and tileset features to libtcod-terminal, this will also move the dependencies on SDL and utf8proc outside of libtcod.
  • libtcod-pathfinding, Redesign the pathfinder as a new library. The current functions are not great but it's hard to refactor them in this state. The new pathfinders should be more generic.
  • libtcod-noise, Refactor noise generation into a library which does not use floating point math. This would make it useful compared to alternative noise generators.

Open issues related to the new libraries will be moved to those other libraries.

New libraries should have a simple CMake script, and should be simple to port to Vcpkg and Conan. Especially if they don't have dependencies anymore. Tools like cmake-init might help.

Libtcod itself should be kept for backwards compatibility but splitting it up should take priority over stability. These changes will break the ABI.

Other options considered:

  • RNG tools are better outside of libtcod. The ones in libtcod only need to stay for compatibility.
  • I'm not really sure what to do with the BSP, heightmap, and GUI tools yet. Anything I'm not sure of will be kept in libtcod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant