Internal Resources

Blitz3D Forums/Blitz3D Beginners Area/Internal Resources

PoliteProgrammer(Posted 2007) [#1]
Hi. I've seen quite a few examples of .exe files that do not require any resources, be they images, sounds or any other files.

Is there a way to compile an executable from Blitz that can run on a different computer without including the images or sound files?

Thanks


puki(Posted 2007) [#2]
I assume you mean a 'packer' that packs all the media into the exe:
http://www.blitzbasic.com/toolbox/toolbox.php?cat=10


GfK(Posted 2007) [#3]
Is there a way to compile an executable from Blitz that can run on a different computer without including the images or sound files?
No. If you don't include your graphics and sound files in one form or another, then your game flat out won't work.

You might try Molebox. The ones that create temporary files on your hard drive are a waste of time if you're expecting any level of security. Plus they probably won't work very well on Vista since it doesn't like you to dump extra files all over the user's hard drive, save for a few key places.


SLotman(Posted 2007) [#4]
Well, for images you can just save then as RAW in RGB format, store the values into DATA lines and then create the texture on the fly with CreateTexture()...

I guess the same could be done with 3D models and sound, but I havent done it yet.


Subirenihil(Posted 2007) [#5]
3D models yes, but as far as I know, there is no way to access sound buffers. :( Which kinda makes it impossible to do that way. To do sound, import the sound file in as data statements, and create a file and load the file back in using LoadSound. Long way 'round, but it is possible. You can use
SystemProperty$("tempdir")
to locate the temp directory. Be sure to remove the file before closing you program!