L
ladlon
Guest
Hi. I'm creating a game in which the playfield is randomly generated, so I have a bunch of code placing random walls, building things, placing treasures, etc.
Currently, I have the code contained within a (persistant) object created for the sole task of holding the 'setup' script.
Is this the proper method? I'm not sure what else I would attach it to. The player controls would be kept in the player object... the enemy behavior in the enemy object... but, I'm not familiar with a 'root' area for general code (building the level, etc).
Of the info I've seen so far, it SEEMS I should be storing it in a persistant custom object made for that sole purpose... so that's what I am doing currently.
Technically, the script only needs to run at the start of the game (build the level), but after that (during the game) nothing there is needed (...at least until a new level is required). So, am I doing this the best way currently?
Currently, I have the code contained within a (persistant) object created for the sole task of holding the 'setup' script.
Is this the proper method? I'm not sure what else I would attach it to. The player controls would be kept in the player object... the enemy behavior in the enemy object... but, I'm not familiar with a 'root' area for general code (building the level, etc).
Of the info I've seen so far, it SEEMS I should be storing it in a persistant custom object made for that sole purpose... so that's what I am doing currently.
Technically, the script only needs to run at the start of the game (build the level), but after that (during the game) nothing there is needed (...at least until a new level is required). So, am I doing this the best way currently?