How do games such as aa Game have high levels in the structure of their code? I mean if we want create a game with high levels, should we create and use a class for each level? I do not want code from you. only I want know for creating a game with high levels in android, What we should do in coding? Is it good if we create and use a class for each level?
-
1\$\begingroup\$ possible duplicate of How should I manage game levels in a flash games? (the argumentation applies to pretty much any object-oriented programming language, not just flash) \$\endgroup\$ – Philipp Jul 1 '15 at 7:59
-
1\$\begingroup\$ Or Problem creating levels using inherited classes/polymorphism - the same question about C++, the same answer. \$\endgroup\$ – Philipp Jul 1 '15 at 8:01
-
\$\begingroup\$ What's an "aa Game"? \$\endgroup\$ – Anko Jul 5 '15 at 10:12
The simple answer is that in general, your levels should be defined as data, and your code should be the same for all levels, it just reads the data to know what to do.
-
1\$\begingroup\$ This is good practice in general, keep the code reusable for different data. \$\endgroup\$ – Ḟḹáḿíṅḡ Ⱬỏḿƀíé Jul 1 '15 at 15:24