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 / Text on sprites?

Author
Message
The Scorpion
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: United States
Posted: 18th Feb 2003 04:14
My question is exactly that. How can I put text on top of sprites? Basic question, I hope for a basic answer.
Who ever loved that loved not at first sight?
- William Shakespear (genious)
xmen
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 18th Feb 2003 21:53
Paste your sprite on the screen
The Scorpion
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: United States
Posted: 18th Feb 2003 22:52
LoL, sorry but that doesn't even come close to answering my question.

Here is the deal. DB (like all other languages) draws things that were drawn last on top of the screen, right? Well so I do this and put the TEXT on top of the sprite...but it doesn't show up at all...I was thinking, since DB was made with DirectX 8.1, the text functions for DX don't work with DX 9 is this the case? Go ahead and get technical I'm a former C++ programmer.

Who ever loved that loved not at first sight?
- William Shakespear (genious)
Jadelion
21
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 18th Feb 2003 23:26
Here is how it works my friend. IF you use the TEXT command, or the PRINT command by default you are writing to the background, SPRITES are written infront of the background So you can't see your text because your sprite is on top. Now I need to make sum assumptions to fix your problem. First you are probably wanting to write to a sprite that is for a menue or a text box, right. To do this I genneraly DO somthing like this



see now you have text on a sprite.
I know there are a bunch of guys here that have developed some advanced ways of playing with text and sprites for 2d games so I suggest searching the 2d development forum for more help.
The Scorpion
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: United States
Posted: 19th Feb 2003 04:50
Thanks man, that helped, I'll just have to complex that alittle and work it around the code but it looks smart to me! I was afraid I would have to do it but I guess I will have to do it. Hey I dunno if I'm allowed to do this but check out my company's website (which may be currently down because we are reworking it at the moment) at http://www.scorpgames.com/ Thanks again, and for this you will get our software free ETA 3 more months.

Who ever loved that loved not at first sight?
- William Shakespear (genious)

Login to post a reply

Server time is: 2024-09-19 18:15:05
Your offset time is: 2024-09-19 18:15:05