For a c++ game so it can run on a linux machine or windows machine?
Like with windows I would use hooks but I wondered how I can do the same thing so my game can run on linux machines too?
For a c++ game so it can run on a linux machine or windows machine?
Like with windows I would use hooks but I wondered how I can do the same thing so my game can run on linux machines too?
Copyright © 2021 Jogjafile Inc.
Use a library to abstract the differences between platforms.
If you are writing a simple console-based application, then the C++ standard library is enough. For a graphical application, you will want to use something like LibSDL. It is common for games to use SDL. This allows the same game to run on Windows, Linux, and OS X without too much modification between platforms.
GLFW and SFML are some other alternatives.
If are writing a complex console-based application, like NetHack, you will need a library for console abstraction such as ncurses.