Hacker Newsnew | past | comments | ask | show | jobs | submit | 523453245's commentslogin

You will end up with code like this:

https://github.com/elonafoobar/elonafoobar/blob/develop/src/...

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: