Archived

This topic is now archived and is closed to further replies.

neonstar

custom (possibly compressed) resource files

Recommended Posts

anyone know where i can find some information or code on how to implement your own resource file format with internal directories and such, and possibly some compression algorithms. if i have to, i''ll use LZS compression, but i''m most concerned with putting all of my artwork and sounds into one big file so people can''t modify them (or steal them!) and screw up my game. thanks for any info... david

Share this post


Link to post
Share on other sites
I''ve recently made a really simple VB app to compile files into a data file (I even tried implementing Huffman coding but as the compression ratio was crap I''ve left it out).

All you need to do is append all the files together, then at the very end of the resource file, write a FAT, with the filenames and their positions in the file.

If you''re thinking of using compression simply as a securiy measure then there is an easier way. Simply invert all the bits of the file in some pre-defined way as you write them to the resource, then your re-load code will have to do the opposite. That way, if someone does read the resource file and extract ATEXTURE.BMP, they won''t be able to double click it and see it mspaint .

On the other hand, if you want to use compression to save the users HD space then you deserve an award for being nice! You can try searching for zlib or gzip, freeware zipper''s. (I''ve got them but still scrathing my head over them really - I''ve got better things to do!)

You''re quite welcome to my VB compiler (and code). It''s not nice but it works!

Cheers

Matt



Check out my project at:www.btinternet.com/~Matthew.Bennett

Share this post


Link to post
Share on other sites

Hey Matt,

Aside from the resource stuff, i looked at your Joy Rider screenshots first and all i could say is WOW! You do your levels in AutoCAD? does that work well for them? how are you loading the AutoCAD files? Sorry for the barrage of questions, but cool 3D stuff like that always gets my attention because I really haven''t delved into that side of the cookie yet...

Thanks for the info!

David

Share this post


Link to post
Share on other sites
quote:
Original post by neonstar


Hey Matt,

Aside from the resource stuff, i looked at your Joy Rider screenshots first and all i could say is WOW! You do your levels in AutoCAD? does that work well for them? how are you loading the AutoCAD files? Sorry for the barrage of questions, but cool 3D stuff like that always gets my attention because I really haven't delved into that side of the cookie yet...

Thanks for the info!

David


I don't know where Matt found a description of the AutoCAD file format, but there are descriptions of Autocad files at Wotsit.org. And btw Matt, could you fix your homepage so it works in Netscape too? The links on the left won't work because of the java-script.

/. Muzzafarath
Mad House Software

Edited by - Muzzafarath on June 19, 2000 4:52:33 PM

Share this post


Link to post
Share on other sites
Dave-

Thanks for the comments. It has taken A LOT of work to get this far, but now the conversion apps are complete I''m in a really strong position to progress even furher.

To answer your question about reading ACAD files, I simply export it as a dxf, which is a text file, then pick out the bits I need and ignore everything else.

I''ve found it works really well for me. It allows me to be quite accurate in setting things like the width of the roads and the heights of the kerbs and stuff, plus it gives me a good visual idea of what I''m creating. Exporting into the game takes less than a minute too.

Like I said in another post, I don''t find Acad very creative so it''ll be difficult to make sure I don''t make really square looking cities. Anyway I''m already toying with the idea of creating some algorithms that modify and tweak the map. I was thinking of implementing a height-shifting algo so that I can model the city flat, and have it put all the hills and valleys in - with a little ''guidance'' from me that is.

Later

Matt





Check out my project at:www.btinternet.com/~Matthew.Bennett

Share this post


Link to post
Share on other sites