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.

Author
Message
VG Teacher
14
Years of Service
User Offline
Joined: 27th Oct 2011
Location:
Posted: 22nd Nov 2011 13:23
I am using DarkBASIC Pro in the classroom. On a few computers, when a student uploads media to a game, the entire file path is shown, so only users with access to the student's network folder can run the game. Is there a setting I can change so that, like most of the computers, the file can be accessed by anyone with DB(and these students DO check the box that specifies that the media should be copied into the current directory)?

Thanks in advance!!!!!!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Nov 2011 14:22 Edited at: 22nd Nov 2011 14:23
Hi VG Teacher. Are you running the game from a separate location to the media folder? If not the default filepath is the current folder the executable is run from. It's better to keep the media in the same folder or a sub-folder. A standard way would be:

//MyGame/
//MyGame/MyGame.exe
//MyGame/Media/
//MyGame/Media/MyImage.png
//MyGame/Media/MyOtherImage.png
...etc.

EDIT: So you'd load media as follows:


VG Teacher
14
Years of Service
User Offline
Joined: 27th Oct 2011
Location:
Posted: 22nd Nov 2011 15:30
Thank you for your quick reply.

Yes, the media is in a sub-folder of the folder the executable is in. On most machines, it all works fine.

The students are saving everything in a folder on a network drive. Then they are giving me a zipped folder. All of the images are there, but they have a filepath to their personal network folder.

When I add media, it looks like the picture I attached, but when a few students add media, it shows the filepath, even though it's in the right folder, and their game will only run if I have access to their network drives. Or if I manually change the game.

So, I am wondering if there is a setting that I haven't found to access the media if it is in the correct folder, without typing the entire filepath.

Yikes. I hope that makes sense.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Nov 2011 16:38 Edited at: 22nd Nov 2011 16:38
Are you using this setting under settings?



If you are attaching the media you need to compile with "Attached Media", this compiles the images etc into the executable so you don't need the separate files, just the exe.

VG Teacher
14
Years of Service
User Offline
Joined: 27th Oct 2011
Location:
Posted: 22nd Nov 2011 17:13
Thank you, baxslash, I will check when the student logs in today.
bitJericho
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 23rd Nov 2011 15:37
If you don't want to wrap the media into the exe, the .dbp project file is a text file that will sometimes use the full paths instead of a relative one. You can edit them out manually in notepad by editing the dbp file itself.

I'm fairly certain the newest editor that ships with the latest update doesn't do this anymore, but I could be mistaken.


Login to post a reply

Server time is: 2026-07-10 01:59:09
Your offset time is: 2026-07-10 01:59:09