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 / Sprite overlapping text

Author
Message
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 18th Apr 2005 06:53
I am making a game like the ULTIMA games that uses only sprites. It is in the early stages of development and I was testing the text to see if it would be overwritten by the sprites. It did and now I have tried just about everything I know to make it work if someone could look at my code and tell me what is wrong that would be greatly appreciated.

This is in DBP


I have know idea what sflm stands for
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Apr 2005 12:52
What happens if you move your Text statement to the end of your loop, right before the sync? Same problem?

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 19th Apr 2005 14:27 Edited at: 19th Apr 2005 14:29
SFLM,

I have experimented with this problem in the past, eventually closing at the conclusion that, in DarkBasic Classic, text cannot be drawn over sprites. This is true no matter where you place the print or text commands within your source code.

However, there are ways around this block, by using bitmap commands, when needed. The bitmap commands allow you to edit graphics without drawing them to the screen. Therefore, allowing for real-time addition of text to a sprite image, through the use of these commands, when called upon.

I have attached source code and an image of a button template to this post. Either use my button image with the source code, or create your own bitmap image called, buttombmp, which should be 100 X 50 pixels. The source code is loaded with comments to help you understand.

+NanoBrain+

Attachments

Login to view attachments
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 20th Apr 2005 01:44
I am afraid it is uncommented but here is another way of doing it which would mean it would be almost the same as just using a sprite meaning you could still check for collision but you need a method of clearing the screen. In this case i am just using CLS



The happenings of tommorow are behind us now

Login to post a reply

Server time is: 2024-09-23 17:30:04
Your offset time is: 2024-09-23 17:30:04