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

What's the purpose of splitting the game in a separate lib? #14

Closed
IceSentry opened this issue Aug 21, 2021 · 3 comments
Closed

What's the purpose of splitting the game in a separate lib? #14

IceSentry opened this issue Aug 21, 2021 · 3 comments

Comments

@IceSentry
Copy link

I'm not sure if it's appropriate to ask here, but I was curious what exactly is the benefit of splitting the game in it's own lib. Is it to help with compile time?

@NiklasEi
Copy link
Owner

I think the compile-time benefits are negligible for the template. In general, I prefer a lib for anything containing non-trivial logic.

  • Better & easier testing
  • You might want multiple binaries using the same libs (think e.g. multiplayer game sharing libs for server/client binaries)
  • You could split a growing game into several libs (then you might start to get faster compile times after changes in just one of the libs)

@NiklasEi
Copy link
Owner

I'll close this for now. If you are not happy with my answer, feel free to reopen 🙂

@IceSentry
Copy link
Author

Oh sorry, forgot to close it myself, yeah, I'm happy with your answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants