I was wondering if there is a maximum amount of global variables that should be included in a HTML5 game, or if the amount of these variables doesnt matter?
My main question is because i am building a tower defence game that utilises random event generation from a list, with each event held in a group. plus a variety of global variables monitoring score, resources and also how you deal with different alien races through a text adventure component of the game.
I already have a lot of global variables and am unsure if to many could be a problem or not.
thanks for any info.
There is no problem with having a very large number of global variables. There is no limit on them.
Develop games in your browser. Powerful, performant & highly capable.
excellent, i didnt think there was a limit but i was concerned it might affect gameplay or framerate or something if i had to many global variables doing things in the background of the game.