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.

2D All the way! / overlapping 2d

Author
Message
FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 31st Jan 2004 17:58
ive got a drawing that ive made in db with the box/dot commands and the place i want it to be is on top of where a sprite is but the sprite is always moved to the front.

():x:x::::::::::::
Avien Langley
20
Years of Service
User Offline
Joined: 29th Jan 2004
Location: State of Denial
Posted: 31st Jan 2004 18:31
That's because DarkBASIC automatically places sprites "on top" of graphics you draw directly to the screen, along with text you put on the screen with the built-in "print" command.

I found this to be a pain too but I made a post here not too long ago asking about a similar problem and I was pointed to the following site:

http://www.underwaredesign.com/

There's lots of good DarkBASIC code there, and what came in most handy for me is the "Dynamic Sprite Library" that allows prioritization of sprites. With its functions, as long as you use sprites to display things, you can always control what's on top and what's not - extremely helpful for 2D programming, to say the least.

If you absolutely have to have graphics you draw directly to the screen through code be displayed over a sprite, I'm afraid I can't help you there; I don't think it's even possible in DarkBASIC. You'd be better off going with sprites rather than drawing the graphics through code, and use the Dynamic Sprite Library available at the site I mentioned.

Login to post a reply

Server time is: 2024-05-13 17:29:28
Your offset time is: 2024-05-13 17:29:28