A lot of those variables could have been grouped into a struct [0]. Like all those key_<action> variables. Even if you think global state is fine you would only have one way of accessing it. It would be closer to this:
game_instance.key_mapping.charainfo
but I never see things like that. All I ever get to see is projects with almost thousands of global variables and not even 1% of them were necessary.
Honestly, not even game_instance needs to be global. You can just define it in your main() function on the stack and you're done.
A lot of those variables could have been grouped into a struct. Like all those key_<action> variables. Even if you think global state is fine you would only have one way of accessing it. It would be closer to this:
game_instance.key_mapping.charainfo
but I never see things like that. All I ever get to see is projects with almost thousands of global variables.
https://github.com/elonafoobar/elonafoobar/blob/develop/src/...
A lot of those variables could have been grouped into a struct [0]. Like all those key_<action> variables. Even if you think global state is fine you would only have one way of accessing it. It would be closer to this:
game_instance.key_mapping.charainfo
but I never see things like that. All I ever get to see is projects with almost thousands of global variables and not even 1% of them were necessary.
Honestly, not even game_instance needs to be global. You can just define it in your main() function on the stack and you're done.