So I’m new to the whole “classes” thing. I’ve been latching on to AS2 for forever, but having started developing on the UDK I have been forced to learn about classes, states and the like. It’s a little daunting but Im getting the hang of it.
From what I understand you create a class for object types in your game, and you can create subclasses that extend another classes properties. e.g.: neutral, aggressive and friendly NPC classes all extend the “controller” class which deals with things like movement and gravity.
I’m used to cramming everything in to functions. Loading levels, characters, special effects, sound management, enemy ai, etc. I did it all through functions in one frame. My mind is not accustomed to having all of my code separated in to handy chunks like classes, so I can’t really get my head around how to construct a basic engine (lets say platformer).
So I just wanted some personal input. How do you set up your engine? Do you have a main “controller” class that you subclass for other classes? Do you use classes to attach level assets, or do you leave that to the main “engine” in your FLA? Do you use classes for special effects? Sorry if I’m not making too much sense. Classes are a little abstract for my usual pattern of programming.
Thanks in advance!
Brendan