Scenes.

capture

03-02-2008 20:24:44

I am correctly working on building a solid framework for my game. At the moment i am working on how i am going to implement physics, and so far i am deciding to use NxOgre. So my next part of the framework is programing a way for my scenes to be loaded and rendered. I assume i will be using the dotScene loader or some variation of it, but then i would still need to set the physical bodies. From the looks around the forums here, i guess there are two options: do it by hand or use NxScene somehow?

From looking at those options, i would guess the best way to accomplish my goals would be to write a simple little application that loads a dotScene then allows the user to outline bodies around the meshes and set some options and then save the data from the bodies and stuff to an xml file. Then use the files to load a full scene in my game. Is this a reasonable idea or is there a better way that i have not found yet?

Also i've seen on the forums in some places that betajaen is working on a physics editor of some sort? Would this be the tool that i need, and if it is what kind of time delay is there before it might be finished?

reptor

03-02-2008 22:39:36

All I want to say is don't use XML as the final file format for your scenes!

You can get a lot bigger files compared to binary file formats and slower loading times, surprise surprise... especially if you want to have big worlds with lots of objects (tens of thousands), then your XML scene files are going to be ridiculously big compared to what they would be if you just write your data as binary, or as compressed binary.

Making up your own binary file format is not difficult. If you store your heightfield elsewhere, as I'm guessing you probably will, then you would maybe just have an object list in your binary scene file with information how to locate and orientate the objects.

I can imagine you could want to have separate configuration files (maybe scripts even) for your dynamic game objects. The static objects which are a fixed part of your scene need no such configuration files I think, they just need to know what 3D model they are.

As I see it, XML is for development and binary file formats are for release versions. Something for you to consider.

Just some opinions, take it or leave it :o

capture

03-02-2008 23:30:33

I like the idea of the binary file format. I think I will most likely stick with XML for my development of the scenes and then have a command-line tool that I will use to convert the XML files to binary before i load them in the game.

I still have the problem of creating my XML scene files though?