Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Kavawuvi

TiaraCE Map Parser

22 posts in this topic

Members of Open Carnage never see off-site ads.

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
On 11/17/2017 at 10:48 PM, Kavawuvi said:

I'm writing this map parser for TiaraCE, though if anyone wants to use it in their programs, I'm releasing it under the MIT license. This project is written in C++.

 

Hey, I was not able to find any links to this parser? Is it unreleased right now?

 

I ask because I have been thinking of adding Halo map support in my homebrew 3D engine; however, I can't find any comprehensive documentation on the structure of the cache files and tags. So, being able to use an off-the-shelf parser would be more than ideal.

Share this post


Link to post
Share on other sites
13 minutes ago, yecoyega said:

Hey, I was not able to find any links to this parser? Is it unreleased right now?

 

I ask because I have been thinking of adding Halo map support in my homebrew 3D engine; however, I can't find any comprehensive documentation on the structure of the cache files and tags. So, being able to use an off-the-shelf parser would be more than ideal.

 

I started over on the parser and made a tool called Invader. Here's a link to the topic:

It's GPL version 3 if you want to check out the source code. https://github.com/Kavawuvi/Invader

ST34MF0X, yecoyega and Tucker933 like this

Share this post


Link to post
Share on other sites

Thanks for the quick reply.

 

1 minute ago, Kavawuvi said:

It's GPL version 3 if you want to check out the source code. https://github.com/Kavawuvi/Invader

 

It guess I won't be able to use it directly then, I haven't made the engine open-source yet. Still, it'll be good as a source of documentation. Thanks again.

 

By the way, since I already have you here, do you know of any better documentation/resource for the file formats used in Blam engine? I don't have much experience in reverse-engineering formats and getting some kind of pre-written documentation would be very helpful.

Share this post


Link to post
Share on other sites
Just now, yecoyega said:

Thanks for the quick reply.

 

 

It guess I won't be able to use it directly then, I haven't made the engine open-source yet. Still, it'll be good as a source of documentation. Thanks again.

 

By the way, since I already have you here, do you know of any better documentation/resource for the file formats used in Blam engine? I don't have much experience in reverse-engineering formats and getting some kind of pre-written documentation would be very helpful.

 

I wrote this a couple years ago. I'm probably going to update it soon, as there might be some outdated information.

We may have other information located in our tutorials section.

yecoyega, ST34MF0X and Tucker933 like this

Share this post


Link to post
Share on other sites
1 minute ago, Kavawuvi said:

I wrote this a couple years ago.

 

I'll take a look. Thanks for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.