RE: XML was RE: [GD-General] RE: A portable preferences library
Brought to you by:
vexxed72
From: Gareth L. <GL...@cl...> - 2003-12-16 12:25:39
|
Hopefully you aren't building a mesh from that at run time ? XML is good, XML is great. But please tell me that you aren't considering having mullion polygon meshes in text format ready to be parsed at runtime ? On a side note, those of you with the 'luck' to work on pc games, you can just use the msxml parser, which is pretty fully featured. > -----Original Message----- > From: Jorrit Tyberghein [mailto:Jor...@uz...] > Sent: 16 December 2003 12:14 > To: gam...@li... > Subject: Re: XML was RE: [GD-General] RE: A portable > preferences library > > > Alen Ladavac wrote: > > >>We use XML a lot in Crystal Space (http://crystal.sf.net). > It does tend > >>to give very > >>big files but we also found that it doesn't matter. > >> > >> > > > >Just how big that is? Can you please compare size of a mesh > in XML format to > >the same mesh in, say, .3ds or .lwo? > > > > > I didn't make the map files so I don't have any of the model > files that > were used but I can show you an example of a simple mesh in CS: > > <meshobj name="cube"> > <plugin>thing</plugin> > <params> > <v x="-1" y="0" z="1" /> > <v x="0" y="0" z="1" /> > ... (more vertices follow) > <material>brick</material> > <p> <v>0</v> <v>1</v> <v>2</v> </p> > <p> <v>3</v> <v>2</v> <v>4</v> <v>5</v> </p> > ... (more polygons follow) > </params> > </meshobj> > > So this is indeed pretty verbose. > > > > > > >>CS supports reading > >>from ZIP files > >>so map files are usually placed in compressed archives. XML > compresses very > >>well (due to the high redundancy) so the size disadvantage > nearly completely > >>disappears in that case. > >> > >> > > > >Can you also please compare size of a zipped XML mesh and a > zipped .3ds, or > >.lwo or similar format of the same mesh? > > > > > Sorry. Don't have the needed models to do that. > > >Also, in case that zipping really does remove the redundancy > well enough to > >allow us to ignore the size difference, did you check your > effective loading > >throughput? Meaning how much MB/sec can you read from the > disk. To make sure > >that the parser is not slowing your loading. Ideally, you > should be limited by > >the transfer rate of the disk, not by the CPU. > > > > > The PlaneShift game (made with CS) has about 25 megabytes > (uncompressed) > of XML files (aggregated > in four big files) of level data. On my Linux system at home > (an Athlon > XP2000) the levels load > in about 16-20 seconds. That includes the following operations: > - Extracting the XML data from the ZIP. > - Parsing of XML. > - Creation of all objects. > - Loading of all textures used in the levels and > preparing them for > use with OpenGL. > - Creation of the kdtree for the visibility culler. > - Loading of the lightmap data for the 100000 polygons > that are in > those levels. > - Creation of oriented bounding boxes for collision > detection (this > is the most > time consuming operation of all things mentioned here). > > I don't have seperate numbers for XML parsing but it is a relatively > small part > of the entire thing. Of course this is done using a hand-made > XML parser > which > is very lean and mean and is optimized specifically towards reading. > > Greetings, > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 > |