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 / texture/object directory?

Author
Message
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 29th Sep 2007 03:53
i have observed in a lot of codes when people loaded images and models they did not have to specify the exact directory, (just whatever is in their game folder

but for some reason i can't avoid setting the full directory of my media without a "can't load" error.

like this
load image "C:\Matrix Experiments\textures\floor3.bmp",1
load object "C:\Matrix Experiments\dx8 models\vehicles\aliencar.x",1

how do other people do it so the directory only contains the folder wih the exe?

like this

load image "Matrix Experiments\textures\floor3.bmp",1
load object "Matrix Experiments\dx8 models\vehicles\aliencar.x",1


this way i can move the game around into different directories without changing the code

dont hate people who rip you off,cheat and get away with it, learn from them
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 29th Sep 2007 05:05
It's probably because you have a source code file (.dba) loaded, but no project file (.dbpro). The editor is a bit confusing and i still have difficulty loading and saving, but in the top bar of the window, it should say the .dba and the .dbpro.
THe easy way to do it is to doubleclick on the .dba in your project folder, and it will give you the option to create the .dbpro file if it does't exist already. If you do this, then it should automatically load stuff in that project folder like you want.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 29th Sep 2007 05:43
it, dosent.

i am guessing something inside of dbpro file should be edited

ill take a look around there, see if anything helps me

dont hate people who rip you off,cheat and get away with it, learn from them
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 29th Sep 2007 05:51
and, i didnt find anything useful

i loaded my dbpro and everything

maybe its not dbpro file,

i downloaded this other guys first project (just to check it out) and his game didn't have a dbpro file yet i could freely move the game around to any folder

dont hate people who rip you off,cheat and get away with it, learn from them
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 29th Sep 2007 06:30
i played around with it for a while and somehow (not even sure hor or why) made it soi could move the game around to any folder i want and it still works. But the directories inside the game are still c:\game folder.

and i could run it in c:\stuff\more stuff\data\game folder.

dont hate people who rip you off,cheat and get away with it, learn from them
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 29th Sep 2007 17:18
Its the .exe file that needs to be on ur C: in ur first example..
its the .exe that loads it, and if it dont create the .exe file the, go and look in the TEMP folder in the DBPro folder and i will find dbp_program.exe... That is the last compiled file in .exe format.

Noonster
18
Years of Service
User Offline
Joined: 10th Jul 2006
Location: Idaho, USA
Posted: 30th Sep 2007 17:11 Edited at: 30th Sep 2007 17:20
Is your media already inside your Projects folder? As an example, if I have a model somewhere other than the Projects folder, I would use the path "C:\Documents and Settings\My Documents\CFX Models\modelname.x" for example. However, if I move the model (and related texture of course) to the game folder inside my Projects folder, then the path I would use when loading it would simply be "modelname.x" (i.e. LOAD OBJECT "modelname.x", objNum). I could (needlessly) also use the entire path to my project/game by using -- in my particular case: "C:\Program Files\The Game Creators\Dark Basic Professional Online\Projects\MyGameFolderName\modelname.x"

Hopefully, I'm not off course in what you are asking, or what you have already tried. From your path above ("C:\Matrix Experiments\dx8 models\vehicles\aliencar.x",1) it appears that you do not have the media in your game folder within the Projects folder.

Hope this was helpful.
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 30th Sep 2007 17:36
Perhaps the problem is where the exe is being saved. Go to the project tab in the editor and look for "EXE Filename", make sure it is saving the exe in the directory for your project and not somewhere like "%temp\dbp_program.exe"

-Jeff

Space Game WIP

Login to post a reply

Server time is: 2024-09-27 05:12:06
Your offset time is: 2024-09-27 05:12:06