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.

DarkBASIC Professional Discussion / Cannot do "Load Image" Command

Author
Message
AmazingGaming
13
Years of Service
User Offline
Joined: 23rd Sep 2012
Location: Good Question....
Posted: 26th Jun 2013 03:58
So I am working through this tutorial..

http://www.thegamecreators.com/?m=view_product&id=2030&page=3d_tutorial_8

and the "Load Image" command does not work..when I run the program this is what I see..

http://gyazo.com/528127cea5108f970a0872a1e32520fe

Its just black! No grass texture at all..How can I make it where I can actually see the grass texture?

I am new at darkbasicpro so bare with me
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jun 2013 04:04 Edited at: 26th Jun 2013 04:04
Did you make a grass texture grass09.bmp, and put it in the game folder?

AmazingGaming
13
Years of Service
User Offline
Joined: 23rd Sep 2012
Location: Good Question....
Posted: 26th Jun 2013 04:11
@Pincho Paxton Yes in fact, I placed it everywhere to see if it would locate it. for example I placed it at the following..

"Images\grass09.bmp"
"Media\grass09.bmp"
"Media\Bitmaps\grass09.bmp"
"Media\textures\grass09.bmp"

And I still get a black screen
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 26th Jun 2013 05:20
You need to either
a)put it in the folder the .exe is created in
or
b)include the full path of the file in the command ie load image "Images/grass09.bmp",1
AmazingGaming
13
Years of Service
User Offline
Joined: 23rd Sep 2012
Location: Good Question....
Posted: 26th Jun 2013 14:05
@James H Do I put the files in the project folder or in the media folder for dark basic pro?

And also to include the full path of the file would I start by typing "c\darkbasicpro\etc"?
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 26th Jun 2013 15:46 Edited at: 26th Jun 2013 15:47
The files you load in can be placed in the folder or any subfolders inside of it. Ultimately any paths are relative to the .exe files location at the start of the program, so you won`t have to include the full path name from the drive, unless of course you state otherwise in the path name or by use of the file command set. So if you want to load from the project folder you don`t need any additional path name, just the file name, if you create an Images folder in the project folder and load from there then you would simply type "Images/filename.bmp" etc.
That said if for whatever reason you choose to have files not in the same folder or its subfolders you could choose to type in the full path name as you suggest or you could navigate the current directory based from the .exe location using the file command set but imo using relative paths is far easier and more useful. Likewise you can change where the .exe is created in the IDE options if you want to. Your best bet is to play around a little with a very simple project for this purpose so that you can get familiar with your options.

Login to post a reply

Server time is: 2026-07-07 00:32:09
Your offset time is: 2026-07-07 00:32:09