QUOTE(KYA @ 16 Jun, 2008 - 06:21 AM)

@Wolf
I would have a game engine object so you can declare a pointer to it and manipulate it in the loop as such.
That's not necessary, I just have the main code file with parameters as global variables. Even though it's almost exactly the same thing, there's a reason many games are written flat with object entities. If you've only got one instance of an object ever, then it shouldn't be an object at all and if it's big enough place it in it's own code file. But if you're making a struct, having an array of them and functions placed in it's own lil code file- you might as well use OOP since the langauge supports it. Honestly what, do you want to run two of your game at once for the "woots"?
I keep my main flat because I have a mode handler function that's easier to write and look at when it's written in flat code.
A good use of OOP is object, but remember you can easily add functionality to them- which makes things like writing a save feature REALLY EASY (because I wish I did this before sometimes>_<)
Basically "OOP Support" means the code was designed with features or requirements for it. For games you have to use it cleverly, but if you overuse it, things get slow. Nothing beats a good ol C at being as close to assembler as possible without actually being unless there's a language I don't know about.
@staycrisp
OK well actually, you write a function that opens the file and reads a number denoting how many entities there are in the file to load. Then, you have a loadObjectFromFile(HANDLE handle) for the object which used the handle for whatever method you're using to open the file and initializes the fields with what's in the file. You need to initialize room for all the entities (using their constructors with a constructor that takes no arguments- doesn't need to) in the map either ahead of time or one-by-one as long as there is more data to read.
After initializing, you then call the method and the newly created object has the properties in the text file. You do this for each object. Basically the function doing all this is your map loading function.
This post has been edited by WolfCoder: 16 Jun, 2008 - 06:09 AM