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 / [SOLVED] [BUGS] / Additional Support for Spriter

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Apr 2018 21:53 Edited at: 15th Apr 2018 21:59
There are a number of features in a Spriter config file that cause AppGameKit to crash if they are present. You do not need to use them, being present in the file causes a crash on loading.
This means that Spriter configurations must be built specifically for AppGameKit, you cannot use predefined files or share them with other apps that can use the extra functionality.

Step one would be preventing the crash.
But better still would be the support of these features. Some of the issues are:

1. Resizing sprites (parts of character) in animation. This is not possible at all. This is achieved in modeller as a keyframe.
Reasons to implement: numerous, including varying limb dimensions, animated growth, dying, focus etc....

2. Changing z-order of sprites in animation. This is achieved in modeller as a keyframe.
Reasons to implement: parts coming to the fore, such as swinging arms wielding a weapon. Hiding sprites at back as a workaround to next point

3. Swapping images. This can be done in the modeller as a keyframe.
Reasons to implement: examples: swapping out normal eyes for angry eyes, replacing a healthy limb with injured limb, swapping clothing and weapons.

Support for all of the above would make it far more useful and powerful.

Additionally, it would be good to be able to show/hide sprites in the model at runtime. For example, showing a sword in the player's hand once they have collected it.
This would be a simplified version of Character Maps, which would give you a full-blown editable character. That is, you make a default character and you can swap the images and/or stack different permutations to make a huge array of characters from one rig.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

The author of this post has marked a post as an answer.

Go to answer

Zef
11
Years of Service
User Offline
Joined: 27th Feb 2013
Location: Massachusetts
Posted: 16th Apr 2018 03:38
What are the items in a Spriter config file that need to be removed?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Apr 2018 06:13
The three numbered above.
There are probably more, but these are the ones I've encountered.

In summary, you can only use rigs that are boned, have a fixed set of sprites and only use bone movement to create the animation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 16th Apr 2018 21:17
I confirm !!
You can not make any structural changes in your animations.
The slightest change in your animations: depth, size, double bones etc, crash when agk loads animation
Also pay attention to bones that can be doubled by moving a bone and pressing the control key.

I do what i do !!!
BHoltzman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 25th Apr 2018 02:24
Better support for Spriter files would make me happy. I've been asking for it for a long time.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Apr 2018 11:01
Rick has mentioned in another thread they are improving the command set.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Apr 2018 17:36
I've updated the Spriter support for the next version so image position, rotation, scale, and ZOrder can all be animated in addition to bone animation.

On your final point of swapping images, it's not clear how the image to be swapped would be identified. The bones have names but the bone attachments that images are assigned to do not, and can cycle through multiple images in the course of an animation. The images themselves are identified by folder and file name, so in theory if you knew the path of the image you wanted to change it could be done. Alternatively this could be supported externally with something like FixSpriteToSkeleton supplying a bone name/ID that the sprite will then follow as if it were attached like the other images. Do either of these options match what you had in mind, or is there something else I've missed?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 26th Apr 2018 18:49
Quote: "image position, rotation, scale, and ZOrder can all be animated"
That's awesome Paul! Will it also support the Atlas image that can be generated in Spriter, or will it only work with individual image files? Thanks.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Apr 2018 22:13
The Spriter atlas has some features that aren't supported in AppGameKit, like rotating and trimming images, and they can't be turned off in Spriter, so it would be difficult to support.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 27th Apr 2018 00:16
Cool beans. Separate image files it is.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Apr 2018 08:47
Excellent news, thanks Paul. I hadn't realised the power of combining Spriter with AppGameKit until a couple of months ago, and it has breathed new life into an old project. I have racing animals with character and cartoonesque realism

Quote: "Alternatively this could be supported externally with something like FixSpriteToSkeleton supplying a bone name/ID"

This is a good solution for many reasons.
Firstly we can add sprites dynamically to the character.
Secondly, we can "replace" sprites by scaling the image it is replacing to almost 0 or setting its z-order to the back.
Thirdly (if this works) we can attach a physics-enabled kinematic sprite to detect collision.

There is another workaround for this once scaling and Z-order are implemented. This allows us - if the model is suitable - to scale down and move to the back any sprites that should not be visible. It won't work in all circumstance but these capabilites alone are a huge leap forward.

My points probably raise a couple of challenges to implement, test or clarify that they won't be possible:

Z-order of the attached sprite within the Spriter skeleton. Will this be able to be set? For example, a weapon in the rear hand will need to be between arm and body. Selecting the bone to attach to is probably the solution already.
Empty bones. Will an empty bone be able to be loaded, so that a sprite can be attached later.
Can attached sprites be physics-enabled. It makes sense that only kinematic sprites would work, as others will interfere with setting the skeleton position (which is a different method to sprite position). The workaround here is to manually follow the character with another sprite, but this would limit following local movement and rotation.

I'm happy to be a beta-tester if you need anyone.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 27th Apr 2018 10:29
Just wanted to say that this is great and the additional functionality will be brilliant. This makes it so easy to animate a character and simply import it into your games with full animation and cool graphics.

Paul wrote: " "image position, rotation, scale, and ZOrder can all be animated""
Sounds great, looking forward to the update.

I asked in the requests forum page a while ago if we could also have alpha animated too? Spriter supports it so you can have explosions fade away or smoke dissapear slowly or even have a characters weapon slowly dissapear. I suppose its a little late to add that? Im also wondering if it causes some draw order issues too so maybe should be left out for now.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2018 16:03
Quote: "Z-order of the attached sprite within the Spriter skeleton. Will this be able to be set?"

The way I was going to do it, no. But I'll see if there is a better way.

Quote: "Will an empty bone be able to be loaded"

As long as Spriter doesn't optimize it away in the export then yes, it will be loaded into AGK.

Quote: "Can attached sprites be physics-enabled"

Sprites attached to the skeleton manually with the new command can be modified like any normal sprite, this includes setting it as a kinematic physics object.

Quote: "if we could also have alpha animated too?"

This should already be supported in the current version. If it doesn't work can you send me an alpha animated example so I can try to replicate the problem?
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 27th Apr 2018 16:55
loading a skeleton freeze the game a very brief moment.
Could we see a clone skeleton command?
I do what i do !!!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Apr 2018 17:13
Another thought.
If we created a 1 frame animation with all images visible (called default for example) would this help solve the challenge of image swapping? This would ensure all images were loaded.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Zef
11
Years of Service
User Offline
Joined: 27th Feb 2013
Location: Massachusetts
Posted: 30th Apr 2018 03:10
Any idea when these Spriter support enhancements will be available (alpha, beta, release)?
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 30th Apr 2018 09:20
@Zef, this week hopefully!
Development Director
TGC Team
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Apr 2018 09:55
That's a pleasant surprise!
I was about to post my dev pipeline for animations, but I'll hold off until after this update. It may change significantly!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd May 2018 17:16
This post has been marked by the post author as the answer.
New release out with additional support added
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-23 19:44:54
Your offset time is: 2024-11-23 19:44:54