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 / Graphical user interface

Author
Message
Odin The Great
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 4th Mar 2004 17:38
How would I put an image to use as the GUI in my game?

Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 4th Mar 2004 18:55
You could:

-Load it as a bitmap
load bitmap "gui.bmp", 0

-use a locked plain
load image "gui.bmp", 1
make object plain 1,40,20
xrotate object 1,90
lock object on 1
position object 1,0,0,0

and there may be other methods

Quote: "
UPDATED

Amd 2800+ | 1024mb pc3200 | A7N8eluxe | Ati Radeon 9800PRO 256mb
"
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 4th Mar 2004 19:36
A third method is to do a paste image right before the SYNC command to overlay a GUI on the 3D scene.

ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 4th Mar 2004 21:05
or sprites, they lose you alot of speed in dbc but in pro they are pretty good.

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 4th Mar 2004 22:48
Here's an example where I combined, sprites and paste image. The translucent menus are two sprites each. One is the menu background and the second is a 100% transparent sprite except for the borders and text. The frames are just pasted in place with translucent corners and cut outs.
--
TAZ

http://www.geocities.com/tzircher/tcom_gallery.htm

Odin The Great
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 5th Mar 2004 09:39 Edited at: 5th Mar 2004 09:40
When I run the code the debug just automaticly closes, is this cause im using the trial version?

zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 5th Mar 2004 17:05
Which code?

Odin The Great
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 5th Mar 2004 19:57
Both of these:

-Load it as a bitmap
load bitmap "gui.bmp", 0

-use a locked plain
load image "gui.bmp", 1
make object plain 1,40,20
xrotate object 1,90
lock object on 1
position object 1,0,0,0

Looking for newbie DBpro programmers to learn with e-mail me if your interested!
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 5th Mar 2004 21:07
It's probably because you don't have the resources such as GUI.BMP. The program won't make that for you. Also, these look like code fragments and not stand alone programs. Since there is no wait or delay at the end, they immediately finish running and exit.

Look up do/loop or wait key in the help files.
--
TAZ

Odin The Great
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 6th Mar 2004 13:52
I got it to work but it's kinda blurry..

Looking for newbie DBpro programmers to learn with e-mail me if your interested!
Odin The Great
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 6th Mar 2004 14:07
I tryed changing the screen resolution didn't help.

Looking for newbie DBpro programmers to learn with e-mail me if your interested!
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 6th Mar 2004 18:30
OK, add ",1" to the end of your LOAD IMAGE command. This turns off some filtering that is automatically done. [Good for terrains and models, bad for sprites and user interfaces.] i.e.

LOAD IMAGE "filename.png", imageID, 1

--
TAZ

Login to post a reply

Server time is: 2024-09-22 00:24:40
Your offset time is: 2024-09-22 00:24:40