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 / How do I output text over an image?

Author
Message
sgalland
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: United States
Posted: 14th May 2004 06:26
Greetings, once again...

I am trying to output text over an image from an array. Basically what it does it makes a list of all the 3d objects that are in the game, with the 3d objects locations stored in an array. When I try to use a for...next loop it kills the performance of my application, frame rate goes from 40 to 5. Here is a sample of my code:


Any idea on how to get this to work correctly, since this doesn't even display the text over the image at all, would be appreciated.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th May 2004 21:22
do you use sync on - sync rate - sync ?????
text is slow, but that amount should not reduce you to 5fps, I frequently have several lines of diagnostics on screen when writing and the speed difference isn`t that noticeable.
what are you trying to do with the sprite?, I don`t see why you need that, sprites have backsave on by default IIRC and slow things down a lot, get rid of it

if you are using the sprite as a backdrop for the text then try the

set text opaque
set text transparent
and
ink

commands, along with some spaces or other characters, make sure that printing the text is the last thing you do before the sync, any alterations can overwrite the text (since it is 2d copied to the screen buffer), so it needs to be the last thing you do before you display the re-written screen, with that in mind it should work ok with those alterations, otherwise, make sprites of the lines of text you want to display and display them instead of a text message, cheers.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 15th May 2004 01:21
Sprites also sit on a layer above 3D graphics and text. So, you may have to switch from sprites to 3D textured plains if you want the text to sit on top of all graphics.
--
TAZ

Login to post a reply

Server time is: 2025-05-23 19:42:34
Your offset time is: 2025-05-23 19:42:34