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 Professional Discussion / Drawing texts OVER my drawing sprites FOR loop code

Author
Message
Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 4th Apr 2010 12:35
Hi all,
I have a problem about drawing my texts over my sprites.
In many parts of my code i draw my texts over my sprites without problems writing first my paste sprite command and succesively my texts command :


Ok, now i use this code for drawing my sprites:


Ok, please don\'t aim in the logic of my code over the fact that i draw my sprites with a FOR loop.
So, now i add my text commands, like before i add these text commands AFTER my draw sprite code but.. the texts always appear under my sprites!!
I have tried changing the \"SHOW SPRITE\" command with the \"PASTE COMMAND\" but nothing. My texts are always under my sprites!
Please help!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Apr 2010 15:35
The SPRITE command does not draw sprites, it simply sets up their configuration. It's the SYNC command that draws sprites, or you can use PASTE SPRITE but you'd need to control the draw order of your sprites manually.

There is an alternative in my plug-ins:
DRAW SPRITES MANUAL - disables the drawing of sprites during SYNC
DRAW SPRITES - draws the sprites immediately and in priority order
DRAW SPRITES AUTO - enables the drawing of sprites during SYNC

Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 4th Apr 2010 18:24 Edited at: 4th Apr 2010 18:40
Ahhh ok.. then, i would to mantain "show sprite" command so i have to use the command "DRAW SPRITES MANUAL" of your PLUG-IN in order to permit my text to appair over my sprites??
If yes, do my "set sprite priority" commands will continue to make their work?

And in finish, can you provide me a link to download your plug in?
(Matrix1Utils?)

THANK YOU

EDIT: i am already using Matrix1Utils but probably i need your plugin new version because i can't find the commands about sprites ("DRAW SPRITES MANUAL" ecc)
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Apr 2010 22:52
The commands don't change the way that sprites are drawn at all. They just change WHEN they are drawn (ie, when you want them drawn, not just during SYNC).

So they will be affected by priority, mirroring, flipping, rotation, alpha, diffuse, and SHOW/HIDE SPRITE etc, exactly as they are now.

The link is in my sig.

Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 4th Apr 2010 23:32 Edited at: 4th Apr 2010 23:36
Ok, now i am understanding.
With these command i can choose when the sprites are draw and i don't need anymore to wait my compiler read the sync command to draw sprites.

In my case the sprites will be draw before of my texts.

so, in first i will use DRAW SPRITES MANUAL command, and later in my code i will add text commands. Right?

Ok, thankyou very much for now, i will test it.
Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 5th Apr 2010 00:25 Edited at: 5th Apr 2010 00:30
Ok IanM, done! Your sprite drawing commands are great and now i can show my texts over my sprites!

Thank you so mutch
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base

Login to post a reply

Server time is: 2026-07-26 17:36:51
Your offset time is: 2026-07-26 17:36:51