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 Discussion / Read Out / Display Questions?

Author
Message
ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 15th Aug 2007 22:09
Here the scoop.
Hydroxen 9
Your flying through an asteroid field.
Shooting missles at them.
Spacebar gives you shields up.
Otherwize your hull it takeing damage.
When the sheilds run out of power the shut down.
It's a 3D-Scene.

How would I be able to overlay a 2D-Readout showing
Damage taken and Sheilds energy bars.
Red for damage 0 low 100 hits high and you die.
Blue for Sheilds Power 100 energy high 0 low sheilds out.

I will be releaseing Hydroxen 9 free of charge when I am done.
It's still under heavy developement.
But thanks will go out to all who have help out in the project.

Scotty B.
Peace!
and Out for now.
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 15th Aug 2007 23:39
Sprites display over 3D no problem. It's just DB's graphic commands that fail, though looping makes it ok. At the start have sprite whatever, and in your main program loop have a gosub to the HUD part, and have something like

if damage#>90 then ink rgb(255,0,0),0
set cursor 0,50
print damage#
if sheilds>10
ink rgb(0,0,255),0
else ink rgb(100,0,0),0
endif
set cursor 20,100
print sheilds#

(N-1)/n*100<n2/n-n/2+n/4*2+100
ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 17th Aug 2007 00:53
Thanks that gives me an idea or two.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Aug 2007 01:11
Nothing fails its just that when you activate the 3D viewport the screen is constantly being updated and so the 3D overwrites the 2D.
You can however use DRAW TO FRONT which will draw 2D in front of 3D but I don't know how effective it is.
You will have to keep re-drawing everything in 2D, sprites update themselves so you don't need to.

Your signature has been erased by a mod because it was rubbish.

Login to post a reply

Server time is: 2025-05-30 13:35:20
Your offset time is: 2025-05-30 13:35:20