I want to know if it impacts my games performance, say on mobile devices
(which i cant test atm because I am on the Free Edition)
if I use Global Variables instead of an Array to:
All my data manipulation comes mainly from the mouse cursor position.
I am new - so if this question has an absolute "no why would it have an impact - makes no sense?!" answer then please excuse.
Just need to know HOW I build my project further in the right direction from the beginning as you surely understand.
Oh and - why Mouse on Mobile Device? I want to transform my mouse interactions in touch interactions later...
Develop games in your browser. Powerful, performant & highly capable.
There shouldn't be any performance impact using one over the other. Using 20 global variables will be a pain to use so arrays are the way to go for this.
Although, it seems instance variables (each object) would be better still. Then it's only a matter of doing a FOR EACH OBJECT and reading / writing the values.