![]() This can increase the time and cost of debugging and testing (automated or otherwise).Īs an alternative approach is to create a factory for each type of candy and power-up and then set the column that they are to spawn in instead. As far as disadvantages go, the game object that takes in the settable attributes needs to be capable of dealing with every possible permutation of every candy and power up in your game. This is a valid approach (Data Driven Design, wooooo!) and has several advantages but is something that should be done with intention (mostly so you can take advantage of aforementioned advantages). IE you need to set the color of a candy before you can create it, you will then also have to set the points that candy will be worth, what animation it plays when it is destroyed, the sound it makes when touched, etc. Just to stick my nose in (I do like me some solution architecture) its worth noting that if you make the attributes of a ‘candy’ dependencies of their creation then it likely that you will have to do it for all of them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |