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 / Displaying Text....

Author
Message
HairyCabbage
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: United Kingdom
Posted: 23rd Dec 2002 03:55
Once you have started displaying 3d objects on the screen in DB v1.13, how does one display text on the screen, because once you try to use the text command or the print command, it flashes quickly on the screen then vanishes, the first time its displayed in a loop, for example, it is possible to grab the text with the get image command and texture it onto a plane object, then display this object, but when the loop is run again,the get image command fails to grab the text.

is there anyway to display text in "3d mode"?

if not, then how do i display game-scores and other information like numbers, while displaying 3d objects.

if I was a betting man, I`d bet this is a common question?
Where is the Messiah?
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 23rd Dec 2002 05:37
To display text in "3d Mode" you need to make the text a sprite.

Here is the snippet

charname$= "Char. Name"
set text font "Enviro"
Set text size 30
Set text to bold
tw = text width(charname$)
th = text height("A")
create bitmap 17, tw, th
text 0, 0, charname$
get image 17, 0, 0, tw, th
delete bitmap 17
sprite 17, 300, 503, 17

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Dec 2002 07:04
crap just update your string or text in the main loop


make object cube 1,10

do
text 10,10,"mooooo"
sync
loop

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 23rd Dec 2002 18:56
Lol I always do stuff the hard way LOL

Wouldnt that flash a little?

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Dec 2002 21:38
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 23rd Dec 2002 22:25
lol

I could just

do
text 10,10,charname$
loop

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Manson
21
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 30th Dec 2002 03:22
Duh,

You just need to clear the bitmaps you've used for texturing your 3D objects

Login to post a reply

Server time is: 2024-04-20 03:42:55
Your offset time is: 2024-04-20 03:42:55