Global Vars vs Array System - performance difference?

0 favourites
  • 2 posts
From the Asset Store
Globals 2.0
$3.60 USD
10% off
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hi folks,

    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:

      Store Angle Data of up to 20 Objects all the time after manipulation Measure constantly distances between my 20 Objects and the Mouse Cursor position Manipulate Angle Data of any of the 20 objects next after next

    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...



  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)