Page 1 of 1

Any suggestion for my XML configure file?

Posted: Wed Jun 13, 2007 1:42 pm
by Yusaku
I began to use Irrlicht for my game and tried to use XML as my config file (which contains window width, height info), however, I found it seems like only AFTER we create a device, we could use "createXMLReader".

So my problem is: without window width and height info from XML file, I can't create device, however, without the device I couldn't read XML...

Any suggestion for this situation? I really don't want to also integrate any library like tinyXML to my system...

Thx a lot!

Posted: Wed Jun 13, 2007 2:00 pm
by Saturn
How about not using XML for your config. ini file style is very easy to parse and doesn't need a complex parser like XML does. Also ino style is easier to read than XML for a human user too. I don't see a feature in favor of XML in this context.

Posted: Wed Jun 13, 2007 3:10 pm
by greenya
I had this problem too.

And there is only 2 solutions I found:
- create NULL video device (you will not have ability to render, but device will be valid pointer and you will be able to createXMLReader);
- especially for this kind of config (that is needed before device creation) -- do not use XML but some simple own text or binary format.

I choose second way, because only the idea of recreating device for such simple thing kills my mind :)

P.S.: but all other data (like scene configuration etc.) I storing in XML.

Posted: Wed Jun 13, 2007 5:14 pm
by mispunt
or use another XML parser (TinyXML perhaps ;))

Posted: Wed Jun 13, 2007 6:06 pm
by LLDD
Use irrXML so you can get an xml reader before the device creation.
________
CHEVROLET STRAIGHT-6 ENGINE SPECIFICATIONS

Posted: Sat Jun 16, 2007 3:24 am
by Yusaku
Thx guys! Since I should finished the other parts of my program, just leave configure problem at this stage... anyway, thx for all ur suggestions!

I'm thinking... probably it's not a good idea to tightly integrate everything in the core of engine? (like this case, we need a "device" to read file, but some data for creating a device is inside the file -_-#) In my own engine (it's just a wapper of Irrlicht now and I'm planning to build up a REAL engine for crossplatform mobile games), I will have 3 parts: render system, file system, sound system and hopefully it could be easily to fix into any kind of games...