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 to print text on top of sprites

Author
Message
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 27th Jan 2003 00:10
hi
anyone knows how I have to print text on top of a sprite?
I don't want to generate my own bitmaps (too slow)
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 00:58
That's the way to do it I'm afraid. The best idea is to generate the sprite images during initialisation if possible ... of course it's not always possible.
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 27th Jan 2003 01:18
Then, in my situation, I'd better just make the bmp files in an external program...

Is it possible to print text on top of sprites in DBpro?

Isn't that something that's often used in games (for example a health counter in a FPS game)?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 01:22
No. Thats something thats missing in DBPro too

Most games render the text rather than use windows fonts.
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 27th Jan 2003 01:28
It is possible to print text on sprites in DBPro if you use the Draw Sprite First command.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 27th Jan 2003 01:29
that's Draw Sprites First, blast this keyboard

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 27th Jan 2003 01:58
I just created 60 bitmaps in photoshop...

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 27th Jan 2003 03:52
Lol. I usually make the text a sprite but its soooooooooo slow

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th Jan 2003 04:05
hehe its a good command



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 21:06
Argh, confusing myself.

What you can't have is actually text on sprites on 3D - I think. Sorry to waste your time mate.
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 27th Jan 2003 21:34
yeah indi, but I cant use the 'draw sprites first' command, as I am not using DBpro... I have DBpro already but I'm still continuing a project that I started in DB and it would be too much work to make it work in DBpro...

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2003 21:46
So I was right the first time ... Ok, apology withdrawn
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 28th Jan 2003 00:39
in fact, I didnt try, but Easily Confused said:
It is possible to print text on sprites in DBPro if you use the Draw Sprite First command.

indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Jan 2003 04:08
if its classic find the length of the letters in the string and multiply it by the font size then use that to grab the image.

freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 28th Jan 2003 14:08
indeed, but that's slow to do on the fly
but my problem is already solved, I'll use pre-made bitmaps

Login to post a reply

Server time is: 2024-05-05 03:31:49
Your offset time is: 2024-05-05 03:31:49