Score, must it really be done the hard way?
I just want to confirm with people who have done this that there's not some work-around...
So I have a game with a lot of levels (50-ish) and each one has a collectible (let's call them stars for now) and a high score.
They all display on the level select screen, and there's a general high score, etc.
I have a variable for the progression of each level, like 1- 01 Prog, 1-02 Prog. They indicate the number of stars. I have one for EVERY level.
I have a high score variable for EVERY level.
I find that at certain places, I have to say "if level 1, do this, if level 2 do this" and iterate through every single level. one place this happens is at the level select screen. As in, if level icon is level 1, then make 1-01 Prog.
The obivous answer would be the ability to alter strings to form variables and do a loop, like the lua "string"..stringnum type syntax. But I've never found a way to even type variable names, let alone alter them.
so I just wanted to confirm with people who have completed these types of systems that you in fact MUST do this by brute force. I'm talking like over a hundred variables just for scores, and a couple places with huge "if" checks through all the levels to see which is the Current Level. in the grand scheme of things it's not a lot of work, but I want to make sure there's not a workaround... Thanks!
So I have a game with a lot of levels (50-ish) and each one has a collectible (let's call them stars for now) and a high score.
They all display on the level select screen, and there's a general high score, etc.
I have a variable for the progression of each level, like 1- 01 Prog, 1-02 Prog. They indicate the number of stars. I have one for EVERY level.
I have a high score variable for EVERY level.
I find that at certain places, I have to say "if level 1, do this, if level 2 do this" and iterate through every single level. one place this happens is at the level select screen. As in, if level icon is level 1, then make 1-01 Prog.
The obivous answer would be the ability to alter strings to form variables and do a loop, like the lua "string"..stringnum type syntax. But I've never found a way to even type variable names, let alone alter them.
so I just wanted to confirm with people who have completed these types of systems that you in fact MUST do this by brute force. I'm talking like over a hundred variables just for scores, and a couple places with huge "if" checks through all the levels to see which is the Current Level. in the grand scheme of things it's not a lot of work, but I want to make sure there's not a workaround... Thanks!
Comments
- Alex
_________________________________________________________________________________
Target Practice Template
Custom Soundtracks and Sound Effects For Sale
Vertical/Horizontal Level Select Template
Mac Mini For SALE!!!