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 / Free spriteflash shader for agk.

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 11th May 2020 20:50
Made this for idb the game.
Use the built in sprite color commands to flash sprites when they are hit etc.
Its hacked like this to be small and work with the same shader on multiple sprites.
Usually would you nead to assign multiple shaders for each sprite.
Anyone that have a page or thread to support agk are free to link to the page or share the shader as they please.
https://play8bitars.itch.io/free-agk-spriteflash-shader
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 12th May 2020 00:38
Why would you need to adding multiple shaders for more than one sprite?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 12th May 2020 21:45
each sprite would nead a shader id of there own as setshaderconstant affects all sprites using a shader with the same id.
I only want to flash one sprite and use a single shader.
This is a quick hack.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2020 03:12
You could do this in DBP with color sprite. Does agk not have this?
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
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th May 2020 03:35
I think with sprites the setspritecolor has its limitations for example you may want the sprite to flash
pure red when being hit without the sprites colours being made more red

if the shader worked like that with a way to switch it on and off and set what colour it should flash to
that would be quite handy

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 14th May 2020 17:52
yes built in set color have a max of 255.
My shader simply multiplies it to make it flash so thats why we nead to set down the color value.
This hack where made to be used with base commands with no more changes anywhere.
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 17th May 2020 00:06
Ah, so you apply this shader and it flashes without changing the color settings of the sprites.
But the neat idea you can extract here is to miss use "colorVarying" as an independant variable you can set for each sprite.
Cause there is no other way to do it right now.
I actually just requested a SetSpriteShaderConstantByName command a week ago from Rick V.
Maybe you can vote here for it to move an izibizy step up the ladder of priorities
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 21st May 2020 10:12
That would be great janbo
I where confused on why i could not apply fx to a single sprite when using the same shader until i noticed this way to do a simple hack.

Login to post a reply

Server time is: 2024-11-22 04:54:44
Your offset time is: 2024-11-22 04:54:44