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.

AppGameKit Classic Chat / Drawsprite over a sprite

Author
Message
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 12th Jan 2018 03:18 Edited at: 12th Jan 2018 03:18
I know in order to use drawsprite over a sprite, I'm supposed to break the sync() command, but I can't figure why how.

Here is the example:



If I remove the background I can see the drawsprite() effect on the screen. Otherwise it doesn't show.

I believe my doubt relates to this thread but I confess I didn't understand the resolution taken.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 12th Jan 2018 09:45
Try setSpriteDepth to set the background lower than the particles.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 12th Jan 2018 09:51
alternative
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 12th Jan 2018 12:36
It seems setspritedepth() has no effect with drawsprite().

The solution Markus recommended worked well. Thank you!
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 17th Jan 2018 01:49
Depth won't work with drawsprite().
Think that drawsprite is hitting the back buffer like a rubber stamp after all the layering/depth/priority stuff has been processed.

Login to post a reply

Server time is: 2024-04-19 13:51:00
Your offset time is: 2024-04-19 13:51:00