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 / Sprite sheet animations in AppGameKit Studio

Author
Message
Bluepixel
4
Years of Service
User Offline
Joined: 8th Apr 2019
Location:
Posted: 22nd Apr 2019 13:05
I have made an animated background sprite sheet, I have been trying to simply put it in my game using the scene editor but I cant seem to figure out how.
Amon
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Shropshire, United Kingdom
Posted: 22nd Apr 2019 14:17
I don't think DragNDrop animations are supported yet. You will have to go the placeholder route or not use the scene editor for animations. What I would do is make a placeholder graphic that will represent the animated sprite in your game. Place it in the scene editor and then in your code do the standard loop to look for the sprite, if one exists, delete it and in its place create your animated sprite and animate with playsprite.

Let me know if you need a bit of code to help out and I'll whip up an example.
Win 10 Pro - AMD RYZEN 7 Octacore 3.8ghz - 32GB DDR4 - RTX 2070 8GB
Gromit
20
Years of Service
User Offline
Joined: 9th Mar 2004
Location:
Posted: 16th May 2019 22:54
Ok, I'm new to this. Say I purchase a sprite sheet. Please explain, with code examples, how I take the sprite, load it into a program and then dice up each sprite to make an animation.

From what I see online it appears to be a straight forward process, but all the examples just show bits and pieces of the process not the entire picture.

Any assistance is greatly appreciated.

Thank you!!!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th May 2019 00:12 Edited at: 17th May 2019 00:16
Have a look at the SetSpriteAnimation() command and the PlaySprite() command

I attached an example

Attachments

Login to view attachments
Gromit
20
Years of Service
User Offline
Joined: 9th Mar 2004
Location:
Posted: 17th May 2019 00:32
Awesome! Thanks for your help!
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 17th May 2019 19:10
Fantastic! Thanks for the awesome code sample!

Login to post a reply

Server time is: 2024-03-29 01:04:57
Your offset time is: 2024-03-29 01:04:57