Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Textures -> Datafile -> Custom Compression [MatrixUtils]

Author
Message
Grasmann
16
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 13th Apr 2013 18:33 Edited at: 15th Apr 2013 20:08
Hi

I'm currently creating my own container file format for my
game engine.

However, I ran into a problem.

The containers should contain textures, objects, sounds, and so on.
Currently the textures are saved from a memblock to the container.
While the jpg file has 19Kb the resulting container had 1,6Mb.
This increase of something like 8531% was just unaccaptable.

So, I created a small prototype of a compression and got some nice results.
It's crashing before the file is completely stored in the
container, but the intermediate results are pretty promising.

Code:

You will need the Matrix1Utils to compile this.

The process always crashes around 70%-80% leaving the
unfinished file. I can't figure out why it's crashing XD.


It doesn't even give me a reason or an error message.
It just "doesn't work anymore".

A little bit of help would be appreciated XD, I got the feeling
somthing fishy is going on.

Just put any image file into the project folder and adjust the
globals.

EDIT: Turns out the problem was "INC" command in
combination with double integer variables -_-".
"INC" is expecting a integer value.

Login to post a reply

Server time is: 2025-05-17 23:37:28
Your offset time is: 2025-05-17 23:37:28