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.

Newcomers DBPro Corner / Can't make EXE files include media

Author
Message
JMS
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: California
Posted: 21st Jan 2008 03:38
I feel like a total noob for having this problem, but this is the first time I've actually created something good enough that I would considering sharing it with others.

Anyways, I can't get my EXE files to include my media (3 .png files). It runs fine when I run it from the editor or run the EXE on my computer but if another computer tries to run it, it says its missing media. How can I get this to work?

Thanks
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 21st Jan 2008 04:10
First be sure to reference your media from within the exe's route, wich could be within a folder.

Then add this media to your project. Go to the add media section and include each one of them.

Select that the build type includes media. Compile and build the exe.

Also remember that when loading them, don't reference its route like:
"C:\My Game\My Images\Image.png", where "C:\My Game\" is where the exe is, you must do it like this: "My Images\Image.png"

Further on my stuff at...
TurboSquid.com
The3dStudio.com
JMS
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: California
Posted: 21st Jan 2008 04:32
I'm sorry I still don't understand. This is how I have it set up:
Editor is set to include media

Both my media and my EXE are in this folder "C:\Program Files (x86)\The Game Creators\Dark Basic Professional Online\Projects\Tank Game\"

That doesn't work.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Jan 2008 05:07
OK, your media is now in "C:\Program Files (x86)\The Game Creators\Dark Basic Professional Online\Projects\Tank Game\" right?

When you build a final exe, the images are built into the exe, so that path doesn't exist any more. Directories are relative to the start folder (project directory).

The simplest way is to have all media in the same folder as the DBA file and use only the filename in the Load lines. But, if you place all the media in a folder called media then an example Load line would be:

Load Image 1,"Media\Filename.bmp"

This is how it is in DBC and I believe it's no different in DBP even though you can now add media to the project.

TDK_Man

JMS
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: California
Posted: 21st Jan 2008 05:17
@TDK
Thank you, that solved the problem .

Login to post a reply

Server time is: 2024-09-27 10:31:34
Your offset time is: 2024-09-27 10:31:34