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 / Sprite Masks?

Author
Message
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 24th Aug 2011 19:44
In some other post, someone mentioned sprite masks.

Is this currently supported by AppGameKit or its a future feature?
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 31st Aug 2011 22:17
There are no specific commands for sprite masks, but you can apply your own alpha channel to a PNG to provide your own sprite mask built into the image file. If anyone would like to see this feature as a new command, please let us know.

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 1st Sep 2011 12:45
Since it's all sprite based, the more sprite manipulation commands the better.
Right now we have the most rudimentary commands to get things going, but in the long run we would need more commands to reshape and manipulate sprites with code.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 5th Sep 2011 04:51
Can you reveal any details about what you'd like to use Sprite Masks for? It would help us shape the potential commands and parameters passed in, to make sure we don't miss any special functionality. The last time I used sprite masks (apart from shaders of course) was back in the Amiga days with the blitter chip

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 5th Sep 2011 09:39
sprite masks would be very useful for sprite manipulation.

right now we only have access to very basic sprite manipulation.

lets say i want to make a moon effect.

i can put a round ball sprite mask on a spite with a moon face texture, and uv scroll the moon face to create a rotating moon
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 6th Sep 2011 03:53
One way to create that effect is to place a black moon circle over a white moon circle against a black backdrop, and then add foreground items in the backdrop area like stars and cloud wisps. This should result in a similar effect as using a sprite mask without too much additional performance impact whilst avoiding to task of creating a large sequence of moon animation images.

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Sep 2011 13:13
too limiting to have to use a same colour backdrop
JRNTexas
12
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 7th Sep 2011 10:44
You could use a black strip with a round hole in it. placing the image you want to "scroll" behind it and putting it all behind the foreground images
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Sep 2011 22:10
that would work as long as the background is black.

if the bg is not black it won't look so nice!
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Sep 2011 04:13
JRNTexas's idea is a good one. You have two images. A large backdrop with a hole cut out, and the part that's been cut out as a small rectangle image as the first image drawn, in place of where the hole exists. Essentially rendering these two would produce a complete backdrop, complete with details (does not have to be black). You can then render the moon between the small cut-out image and the large screen sized backdrop which is drawn last, creating the effect you are after

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Sep 2011 09:27
the bg with hole idea is good. got it now.
thanks

Login to post a reply

Server time is: 2024-02-21 22:53:03
Your offset time is: 2024-02-21 22:53:03