I’m just getting started with JS and curious how one would calculate the total of (5) different variables. I have a game that rewards points for acquiring things. Things are on a separate timeline, and once they have been acquired, points are awarded, then players may choose their next task.
I could force players on a linear path and just add them together (eg; task one = 500 points, task two is 750 points, etc), but we allow players non-linear gameplay.
Would this be done with some form of database or through JS and maybe an Array?
Thanks in advance for any suggestions.