Author Topic: OP2Archive Application Development  (Read 37749 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: OP2Archive Application Development
« Reply #75 on: April 26, 2018, 12:48:39 PM »
It would probably require reasonably substantial changes to get the game to load ZIP files. Though I'm not sure it would be so much work as to preclude the possibility. I wouldn't consider this a high priority though.

If someone were to make a remake, then yeah, just pack the resources into zip files and go that route.


I have some concerns about the split between MapReader and MapWriter. Guess it's been a while since I've gone through OPU stuff. I think it makes sense to split stream reading from stream writing. I also made a mess of the VOL and CLM code, trying to support both operations in one class, and in hindsight would probably have split it into a reader and a writer class. Though I don't think I'd have extended the reader/writer split to map data.

Thinking about this deeper, my reasons are the map data is often both loaded and saved in the same session, the entire data set is processed as one atomic unit, and both loading and saving are highly symmetric.

On the other hand, VOL files are generally not both read and written in the same session, may be packed atomically but internal files are picked and chosen when reading from them, and are processed in a way that is far less symmetric. The packing code needs to collect files and filenames, possibly transform filenames for CLM, build a sorted index, add appropriate padding, and might even optionally compress the data though that was never implemented. For unpacking, you need to binary search the index, jump around in the file to find the data, verify headers are correct and match the index, and decompress data.