Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Compiling turing code with pictures and music?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
compmaster




PostPosted: Wed May 26, 2010 6:53 pm   Post subject: Compiling turing code with pictures and music?

Is it possible to make a stand alone exe for turing with WITH pictures and sound in them as well?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Wed May 26, 2010 7:00 pm   Post subject: RE:Compiling turing code with pictures and music?

Nope. Keep 'em in the same file. I don't think ANYTHING does that. Most major developers keep external resources in a compressed folder (not your standard RAR or ZIP formats though) to hide them from the user. The binary consists only of the code that runs the program, and in most cases is actually quite small, even for huge, impressive games (call of duty, flight simulator, etc.)
BigBear




PostPosted: Wed May 26, 2010 7:13 pm   Post subject: RE:Compiling turing code with pictures and music?

Have you tried it?

Yes, you just have to have the pictures in sound in the same folder or the specified path.
Tony




PostPosted: Wed May 26, 2010 7:27 pm   Post subject: Re: RE:Compiling turing code with pictures and music?

Insectoid @ Wed May 26, 2010 7:00 pm wrote:
I don't think ANYTHING does that.

May I introduce you to http://en.wikipedia.org/wiki/Demoscene ; although, to be fair, demos generate all of their media assets on the fly -- storing it all as data would take up too much space.

There is no difference between machine code and data, it's all binary 1s and 0s. One could say that a certain block of an executable describes an image; or a certain block of an image might happen to be a valid set of instructions.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DtY




PostPosted: Wed May 26, 2010 8:09 pm   Post subject: Re: RE:Compiling turing code with pictures and music?

Insectoid @ Wed May 26, 2010 7:00 pm wrote:
I don't think ANYTHING does that.
Java will create a JAR, which is just a zip file with all the media, on Mac OS X, applications are bundles, which are folders (that look like a single file to the end user) that contains all the media. On Windows, the common method is to store the media in the exe after the executable, your program would open up the exe as a binary file, read the headers to find out where the program ends, and grab the media there. This would probably be pretty tricky to do in Turing, and would mean that you have to create an exe every time you want to test.

[edit] Or what Tony describes, store the data as part of the program (that isn't run), load out of memory from there, that's probably impossible to do in Turing, though.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: