🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Ant Archive Tools

Started by
-1 comments, last by Cooler 8 years, 10 months ago
Hello! I was making a game engine some time ago, and because I didn't have much time I scrapped it, and started to rewrite it, however I wanted to share with you a library that I wrote for the engine. The engine was called "Ant engine", hence the name. This library allows you to collect all your game files in a single encoded archive. Here are some pros and cons:
Pros:
  • No need to load the whole archive to view info about archive/files.
  • Can store info. that can be used by the user.
  • Big file size limit (if size_t type has a max value of 18446744073709551615, then the file max size is [font='Roboto-Regular']18446744100 GB[/font][font='Roboto-Regular']).[/font]
[font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']?Cons:[/font][/font][/font]
  • [font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']No compression (it may count as a pro, because it improves performance)[/font][/font][/font]
[font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']?The usage is simple:[/font][/font][/font]
  • [font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']Create an archive object, specifying the path and the open mode(just like in a fstream)[/font][/font][/font]
  • [font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']Add files, specifying the paths.[/font][/font][/font]
  • [font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']Use the write function to write the data to the archive.[/font][/font][/font]
[font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']?To extract just open the archive in "IN" mode and use the extract function.[/font][/font][/font]
Support wallet:

WMZ: Z203276490655


[font='Roboto-Regular'][font='Roboto-Regular'][font='Roboto-Regular']If you will like this library I may update it![/font][/font][/font]


The library wasn't tested much! If you notice a bug, then post it here, and I'll do my best to fix it!

This library uses Boost, so you need to download it!

How to build:
  • Extract the archive.
  • Enter the directory where you extracted it.
  • Open the terminal there.
  • Run "cmake ." (With the dot!).
  • Run "make".
  • The library will be in the "build" direcory!
This won't work with windows, because the visual studio compiler is quite outdated, so on windows, you'll need to use MinGW with Cygwin!

This topic is closed to new replies.

Advertisement