I have worked so many years with other engines that I am a bit stuck in habits one could say. It’s not a problem per se but it confuses my way of thinking. For example, I need to create, if needed, 11 small objects with same sprite (checking a table, this is solved and working). The objects are boolean, exist/visible or not and no other functions are connected with them.
What is the best and simplest approach to this? Should I have 11 objects premade and placed in collection and made invisible? Seems overkill to use factory. On the other hand I am not familiar with factory.
Sure, if you know that it will always be 11 objects then by all means create a .go file for the object “prefab”, and then add 11 of these to your collection and interact with them through code.
Factories could of course be used, but I think they make more sense for things that spawn and get destroyed over the course of a level/game. Think projectiles, item pickups, enemies, blocks, balls, coins and so on
Is there a “visible” option or do I need to move it outside of the screen or should I for example adjust the alpha? Am simply trying to find the best practice for various situations.