custom image formats

Miscellaneous Forums/General Discussion/custom image formats

well i am trying to make a custom image format and some modules in BMAX to load the format, so is there anything i should know before doing this and any suggestions for how to format it

You're heading towards vague question of the month territory here ;)

A custom image format to achieve what? What will your image format do/have that existing image formats do not? With that information, we might be able to come up with some suggestions and things you should know. But at this stage, I don't even know if it's going to be vector, bitmap or fractal.

it is going to be bitmap

i am trying to make one that is is insanely hard to crack, i am making so no one can steal my work without working their arses off

so i guess something that will baffle people and fairly good compress, i am jsut going to be using this for personal use

Why reinvent the wheel? Use an existing image format and keep your images in a secure archive.

because i can and plus i want to see if anyone can crack my format

also i have no clue how to make BMAX use an archive to get the images and i don't like incbin because it makes the exe huge

you'll probably have better results taking a standard image format (such as PNG, JPG, whatever) and using a custom encryption algorithm, and decompressing them on the fly into a memorybank.

After all, even in your own custom format they're still going to be plain vanilla bitmaps in your computer memory after you decode them on your own, so you're not adding a whole lot by going through the hassle of coming up with your own compression algorithm as well. It's bound to be less efficient/slower than the tried-and-tested PNG/JPG/whatever included decompression routines.

No offense, but if your programming skills are up to par to come up with a fast and small/efficient custom image file format that rivals the 'standard' ones, you probably wouldn't need to ask the question from your original posting either...

So limit the slowdown by focussing on encrypting a standard file format instead, would be my recommendation.

i guess you are right. i guess i will try to come up with a way of using a .rar archive or something to hold the images and have the program unzip them into memory when running the game

I wrote my own archive yesterday, and I wonder how easy that was. Using RC4-encryption (see codearchive) and zip-compression (using pub.zlib) I got it up and running in 4 hours (including time to read bmax-sources to understand the way streams and filters work). Making this work in this short time is more a proof of BMax beauty and power than of my programming skills. That's the reason I love coding in Max, it's fun.

Basically it does the following:
* pack files into a single archive, compressing and encoding them
* install a filter to allow usage in any url-parameter, like LoadImage ("archive::picture.png").

When BMax wants the file as a stream, I read it into a bank, decode it, unzip it and throw a bankstream back.

But, like xlsior said: when it's in memory, everything is a plain bitmap, so it can be ripped theoretically. I just want to keep it all in one file and prevent the average user from ripping out musics and images.

Jake

PS: Leave me a mail if you got questions or want some code

Starforce 4, said to be uncrackable. Cracked. Ho hum.

If man can make it, man can break it.

I leave all my media unencrypted. If someone wants to mess with my textures\models in their own code then good luck to them. If they try to sell it commercially then there will be a problem but seriously, that just isn't going to happen is it?

And some people have enjoyed trying to customise the the game textures. Who am I to spoil their fun?

I've found grabbing media from other peoples games very useful for placeholders in the past. I think Wetrix had Warcraft sound effects in it for a while. And Pillage (Future Tactics) used tunes from NWA and the Beyond The Valley of the Dolls soundtrack for much of its development period.

YES, YES, YES

I leave all my media unencrypted. If someone wants to mess with my textures\models in their own code then good luck to them


"John Pickford" is right.


I've found grabbing media from other peoples games very useful for placeholders in the past.


"puki" has a new-found friend.

"puki" gives paw.

how about this, i leave all the media out for people to look at but the actual ones i use for the game are in an archive so they can't make an image blank thus giving them god mode in online mode

in theory it is completely possible, that is why i want someway to stop them from screwing with the images thus affecting actual game

(OT)Is incbin secure? Has anyone tried to rip out any incbinned media yet?(OT)

i hate using incbin, it makes the exe bloated

and in the docs it says it is crackable

i hate using incbin, it makes the exe bloated


but it makes the installation folder a LOT cleaner... IIRC the data segments don't automatically get loaded when you run the EXE anyway until you actually 'load' the incbin info in your program, so... the bloat is all relative. Beats the hassle of a ton of external files.

but updating a game takes a longer time then with external files

exchanging a small exe and adding 4 or 5 images is faster then rewriting a huge exe with all the media

That's true... for dynamic updates and such it's not as well suited as for a fairly 'complete' release that you don't expect to change often, if ever.

Link1426, have you got a link to your online game or webpage with info?

sorry, not at this moment

i am working on a map editer and trying to get a server together to test out some networking code, i am going to try out bnet from eikon's multiplayer tutorial first

i will probably make a small action game to just get the hang of it

OK, you might want to worry about the image encryption once you have the code up and running.

i was thinking that i could convert my images to data files and have the computer compile them into pixmaps