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 in front of sprite?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 23rd Feb 2011 19:04
how do u have your text in front of a sprite??
Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 23rd Feb 2011 21:06 Edited at: 23rd Feb 2011 21:07
"DRAW SPRITES FIRST"

That will let you use 2D operations to be drawn to the screen after the sprite is drawn.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 23rd Feb 2011 21:27
well it works thanks!

but i did a small test,made a sphere had 2 turn off the backdrop
then it works but my object is in front of the sprite.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Feb 2011 22:28
There still seems to be issues with Sprites and 2D operations, when the Backdrop is on. Sprites can disappear, or 2D to Front just doesn't work. I think somebody once found a workaround where you load images to a bitmap, GET IMAGE then make your sprite. Howver I'm not sure how reliable that is.

I currently have a little editing app where I PASTE IMAGE to get around these issues. But it's only suitable because it's a nice simple editor.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Feb 2011 23:23
I added commands to my plug-in to help with this kind of thing.

Normally, sprites will draw during SYNC and you can do little to affect that except with the DRAW SPRITES FIRST and DRAW SPRITES LAST commands - those work, but I find them fiddly to get everything right.

So, I added some commands that disable the standard sprite rendering during SYNC, and allow you to specify when they are drawn. The commands are DRAW SPRITES MANUAL (which tells DBPro to disable the automatic drawing of sprites) and DRAW SPRITES (to draw them when you want).

So you can draw some stuff to the screen (background, text etc), then draw your sprites over that, and then draw some more over those sprites.

Login to post a reply

Server time is: 2024-11-23 02:42:23
Your offset time is: 2024-11-23 02:42:23