Sign in to follow this  
Followers 0
ST34MF0X

TiaraCE

41 posts in this topic

Here's what's gone on the past week.

 

New features:

  • valid_map() now checks model data (PC maps only, currently).
  • Model tags have been added. You can access the vertices with ::vertices() and ::vertex_count() (PC maps only, currently).
  • Some exception errors were added for more errors that may occur with invalid maps or programming.
  • Some exception errors can now tell you the tag path and class of the offending tag.

Changes:

  • zlib was removed from the repository. It's still required to compile this project, however.
    • GCC and Clang have -lz which can link their respective internal zlib library to your project.
    • You can also download it for free from https://zlib.net/
  • A few functions now return or take references instead of pointers.
  • A crc32() checksum function was added for Xbox maps, though this isn't going to give you the same result that's in the header, as I'm unsure how this is calculated.
  • Some documentation comments /// were made.

Bug fixes:

  • The wrong file size was given for wrong_map().

 

ST34MF0X, Takka and WaeV like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

Vertices and triangles in model/gbxmodel tags can now be accessed. There are three model tag parser classes you can use:

  • TiaraTagModel
    • Xbox models only
    • Can read AND write triangles and compressed vertices (vertices can be decompressed individually with TagModelCompressedVertex::decompress())
       
  • TiaraTagGbxmodel
    • PC/Custom Edition models only
    • Can read AND write triangles and uncompressed vertices
       
  • TiaraTagModelUniversal
    • PC/Custom Edition and Xbox models can be used interchangeably
    • Can read triangles and uncompressed vertices (Xbox models' vertices are automatically decompressed - vertices are stored in a buffer)

TiaraTagModelUniversal is best for manipulating tag data as well as viewing model data in programs that accept both PC and Xbox maps.

 

For editing model data, you will want to use the platform-specific TiaraTagModel or TiaraTagGbxmodel.

Sunstriker7, Takka, ST34MF0X and 1 other like this

Share this post


Link to post
Share on other sites
On 12/4/2017 at 7:37 AM, Skeezix the Cat said:

Why no collision model tags?

Those were mapped out a while ago.

 

On 11/17/2017 at 11:18 AM, 002 said:
  • model_collision_geometry

 

ST34MF0X likes this

Share this post


Link to post
Share on other sites

zlib is now only an optional dependency. If you do not wish to link zlib, define WITHOUT_ZLIB when compiling the src/map.cpp file. Note that doing so will remove these features:

  • Loading compressed maps (skips decompression code and throws an exception error)
  • Compressing loaded maps with TiaraMap::compress (instead calls std::terminate)
  • Calculating the CRC32 of loaded maps with TiaraMap::crc32 (instead calls std::terminate)
WaeV likes this

Share this post


Link to post
Share on other sites

It's been a while since I worked on this (other stuff happened), so I figured I'd share a few benchmarks. Specs for the machine tested are: Intel Core i7-6700K, 16 GB DDR4, Samsung 850 EVO SSD.

 

As a worst-case, here's With_Whiteness.map which is under 0.84 seconds:

Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\With_Whiteness.map (796558 kB) took 0.393546 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\bitmaps.map (123547 kB) took 0.06261 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\sounds.map (41718 kB) took 0.0215847 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\loc.map (391 kB) took 0.000333924 seconds.
Reading all maps from disk took 0.483417 seconds.
TiaraCE::Map instantiation time: 0.353964 seconds.
Total time: 0.838726 seconds.

 

As a best-case, here's Blood Gulch which is under 0.18 seconds:

Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\bloodgulch.map (13936 kB) took 0.00748735 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\bitmaps.map (123547 kB) took 0.062807 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\sounds.map (41718 kB) took 0.0217566 seconds.
Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\loc.map (391 kB) took 0.00024297 seconds.
Reading all maps from disk took 0.0983064 seconds.
TiaraCE::Map instantiation time: 0.0739545 seconds.
Total time: 0.172989 seconds.

 

ST34MF0X likes this

Share this post


Link to post
Share on other sites

I updated the above post - turns out I totally forgot to specify an optimization level for the compiler, and I've also been working on the code a little bit. So rather than With_Whiteness and Blood Gulch taking 1.456 seconds and 0.30 seconds, respectively, With_Whiteness actually takes 0.84 seconds and Blood Gulch takes 0.18 seconds.

 

This includes loading everything (loc, bitmaps, sounds, and the map file) into RAM, not just the map file itself. However, if I were to load these maps without bitmaps.map, loc.map, or sounds.map (such as for a dedicated server):
 

With_Whiteness takes under 0.68 seconds (-19%):

Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\With_Whiteness.map (796558 kB) took 0.383308 seconds.
Reading all maps from disk took 0.385347 seconds.
TiaraCE::Map instantiation time: 0.28488 seconds.
Total time: 0.672336 seconds.

 

Blood Gulch takes under 0.03 seconds (-84%):

Opening C:\Program Files (x86)\Microsoft Games\Halo Custom Edition\maps\bloodgulch.map (13936 kB) took 0.00753896 seconds.
Reading all maps from disk took 0.00936774 seconds.
TiaraCE::Map instantiation time: 0.0168858 seconds.
Total time: 0.0272645 seconds.

 

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.