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 / 2D on top of 3D

Author
Message
PurpleHeart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location:
Posted: 30th Dec 2003 20:28
I have a healthbar in my game designed by the a poster in the code snippets forum. I put it in, but it does not show on top of my 3D game. I call the function once per loop. I use the Draw to Front command, but that hasnt helped. Here is my code:



Please help me get the healthbar to show on top of my 3d action.
thanks
ph

Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 31st Dec 2003 06:08
You could try drawing to a bitmap, geting an image from the bitmap with get image and making a sprite with the image.
Sprites should show on top of the 3d stuff.

dbpro : 2ghz p4m : 512mb : geforce 4 4200 go
PurpleHeart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location:
Posted: 31st Dec 2003 06:51
could i see an example? I am kind of new to DBPro.
thanks for responding
ph

Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55
Alastair Zotos
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location: a bin
Posted: 31st Dec 2003 12:33
No, dont make a bitmap, at the begining of all your code just type "Sync on" and then "Draw to front" that makes any 2D come to the front and "Draw to back" will send it to the back!

good luck

fart like you've never farted before!!!
(five seconds later)
Dude that stinks!!! get out of my house!
PurpleHeart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location:
Posted: 31st Dec 2003 19:10
@Jaze - I had a code snippet in my first post. I do have "sync on" and "draw to front" but my healthbar still isnt showing up. I need an alternative means of displaying my 2d atop 3d.
thanks anyway though
ph

Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55
PurpleHeart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location:
Posted: 1st Jan 2004 20:05
@the_winch, or ayone for that matter - how can i:
Quote: "
You could try drawing to a bitmap, geting an image from the bitmap with get image and making a sprite with the image.
"

I am trying to place box/lines on top of my 3d objects/world. I tried using the draw to front comand, but no luck.
thanks in advance
ph

Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 1st Jan 2004 21:00
I'd use
where xstart is the left of the 3D part of the screen, ystart is the top of the 3D part of the screen, xend is the right of the 3D part of the screen and yend is the bottom of the 3D part of the screen. Everything else will just be 2D. That's what I do for games - leave a space at the top or the bottom. That means that no 3D stuff gets in the way and you can do text and stuff as well.

Am I the only one here who's really confused?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jan 2004 04:25
It's working for me, are you using dbpro or classic?



dbpro : 2ghz p4m : 512mb : geforce 4 4200 go
PurpleHeart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location:
Posted: 4th Jan 2004 00:20
I was using pro.
but n/m i figured it out.
thanks to all who responded

Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55

Login to post a reply

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