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 / Day 1 Blues :/

Author
Message
Maximus_UK
20
Years of Service
User Offline
Joined: 9th Jan 2004
Location: England
Posted: 9th Jan 2004 15:57
hi all, need alittle help here with something rather basic.

i am simply trying to put up a splash screen at the start of my 1st program.

i dont get any error message, but the screen is just blank. the code is simply :-

LOAD IMAGE "splash.jpg",1
WAIT KEY

is there something i am missing here, i'm not the sharpest chissel in the toolbox :p

also can some1 explain the directory structure of where to save media/images etc or does it not matter if u use something like:-

LOAD IMAGE "c:/resource/images/xxxx.jpg",1

currently the splash.jpg above is in the projects folder within dbp.

many thx in advance.
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 9th Jan 2004 16:31
well... you are only loading the image, not displaying it... there are several ways you can do this... you can create a plane (a flat rectangular polygon), texture it, then get it to face the camera...



just change the obj# into the number of the object you want the plane to be... and adjust the 500 and 250 to whatever size works best... the set object cull and light make sure the plane is visible. Adjust the Dist# until you get the proper zoom... (you may need to make it negative but I find 200 is a good zoom for if the plane is 500 x 250)... oh, you also may want to color the background so it fits the image...

another method (for if your image size is the same as the screen resolution [640x480 or 800x600]) is to use the command paste image... so your code would be...
paste image 1,0,0
the "0"s being the coordinates you past the image at...

as for the directory structure... Say your media folder is in "C:/Program Files/Dark Basic Software/DarkBasic Pro/Projects/..." you can either type all that, or just type the subfolders in the folder that contains your project... "Media/xxxx.img" doing this, the program will automatically add the "C:/Program files/..." or whatever your .dbp project is in front of the "media/xxxx.img"...I’m not sure if that made any sense... well... I hope that answered your questions...

oh... not that it relates to anything, but this is my 100th post on this message board...

Do not thwart the way of the dragon. For thou tasteth like chicken.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Jan 2004 17:01
maybe you guys said this already but I would use "\" in paths not "/"

-RUST-

Maximus_UK
20
Years of Service
User Offline
Joined: 9th Jan 2004
Location: England
Posted: 9th Jan 2004 17:18 Edited at: 9th Jan 2004 17:54
thx for help here. image is now up on screen lol. but i do have some more questions lol.

with regaurds the image i have just been working with, it is sized 800x600. now does dbp need to set the screen res to 800x600 for this to display correctly as at the moment it looks over-sized.does dbp work at 640x400 as a default res if u dont set something else ?

and what would b the command line to set to 800x600 lol.

btw is there anywhere that contains a decent tutorial that explains the basic commands etc, the manual dosent seem that detailed.


k, i found the display mode commands etc. but now i have a quality problem. the image is alittle pixelated, as suggestions on imroving the quality here?
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 9th Jan 2004 18:54
One of the load image flags controls MIP mapping, you can turn that off. See the help file for more info.
--
TAZ

Login to post a reply

Server time is: 2024-11-25 23:38:28
Your offset time is: 2024-11-25 23:38:28