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 Studio Chat / Make part of a sprite visible or invisible?

Author
Message
dandrews
2
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 17th Jul 2022 15:09
Is there a way to make a part of a sprite invisible? Say I have a box and whatever portion is outside the box is to be invisible.
adambiser
AGK Developer
6
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
dandrews
2
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 17th Jul 2022 21:47
Yessss thank you
Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Jul 2022 17:26
Is there a method for clipping based on another image so you can do shapes other than a square? I think there was a shader that could do it,wondering if they ever added a native command.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Jul 2022 19:32
Quote: "Is there a method for clipping based on another image so you can do shapes other than a square? I"

SetImageMask()
It is slow though
Virtual Nomad
Moderator
16
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 18th Jul 2022 20:06 Edited at: 18th Jul 2022 20:12
in studio (only) we have SetSpriteBlendModes() using SetSpriteTransparency(ID,3).

i'm not sure if it requires vulkan but i'd bet you can achieve some nifty stuff with it including this challenge.

since it's studio only, i haven't played with it much.

i wish someone would demo the possibilities *hint hint* but THIS is about all i've done with it

Attachments

Login to view attachments
adambiser
AGK Developer
6
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 19th Jul 2022 03:32
If the image won't change and you only need to do it once, SetImageMask is fine.

Or perhaps use a shader?

Login to post a reply

Server time is: 2022-08-09 09:56:02
Your offset time is: 2022-08-09 09:56:02