Spriter Importer

Monkey Forums/Monkey Code/Spriter Importer

therevills(Posted 2012) [#1]
[EDIT] Latest code can be downloaded from here:
https://code.google.com/p/monkey-spriter-importer/
[/EDIT]


Based off the Libgdx version from here: http://www.badlogicgames.com/forum/viewtopic.php?f=17&t=3863

You need Diddy's latest xml module:



It's not 100% yet, but it does load up the hero example: http://dl.dropbox.com/u/1013446/Spriter%20Releases/BetaFileFormatRelease/BetaFileFormatRelease.zip

Running Example: http://www.therevillsgames.com/monkey/Spriter/MonkeyGame.html


John McCubbin(Posted 2012) [#2]
Good work, I've backed the spriter project on kickstarter and am looking forward to using it for monkey and hopefully blitzmax too :)


Soap(Posted 2012) [#3]
Awesome! :D The page has been updated with Monkey listed: http://www.kickstarter.com/projects/539087245/spriter


TheRedFox(Posted 2012) [#4]
I've backed Spriter as well. Cool to get this!


Wiering(Posted 2012) [#5]
Nice!
What am I doing wrong if I get 'Identifier "GetFirstChildByName" not found'?


therevills(Posted 2012) [#6]
What am I doing wrong if I get 'Identifier "GetFirstChildByName" not found'?

You need Diddy's latest xml module...

http://code.google.com/p/diddy/source/detail?r=393

Add this to the xml.monkey file around line 565:

	Method GetFirstChildByName:XMLElement(findName:String)
		For Local element:XMLElement = EachIn children
			If element.name = findName Then Return element
		Next
		Return Null
	End



Samah(Posted 2012) [#7]
Get the latest xml.monkey from the repository.
Edit: Beat me to it. Stupid Gingerbread keyboard. :-)


Wiering(Posted 2012) [#8]
Thanks!


Soap(Posted 2012) [#9]
http://dl.dropbox.com/u/1013446/Spriter%20Releases/wordpress/Procedural.pdf


Soap(Posted 2012) [#10]
Update: http://www.brashmonkey.com/forum/viewtopic.php?f=2&t=543

"I’ve completed the candidate for the file format. The format is a proposal for the final format of SCML"


Soap(Posted 2012) [#11]
http://www.kickstarter.com/projects/539087245/spriter/posts/279445


Tibit(Posted 2012) [#12]
This tool is really cool!

I had totally missed this, I saw the kickstarter today, and then at the bottom saw "monkey" and I was soo suprised.

Nice work, will defiantly use this in many projects!!


Rob Pearmain(Posted 2012) [#13]
Where is the latest download link, the existing one seems broken?

Thanks


therevills(Posted 2012) [#14]
The link to the beta format in the first post was controlled by the Spriter guys.

The code also needs to be updated to work with the newest version the spriter format.


Tibit(Posted 2012) [#15]
Here is the latest:
http://www.kickstarter.com/projects/539087245/spriter/posts (Update 17 Aug)

They allow you to pre-order on their site. I haven't started working with it in Monkey yet since they are still in an unstable Alpha state, tough it is looking really good and nice to see Monkey with early support thanks to therevills :)


therevills(Posted 2013) [#16]
WIP Update:

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html

TODO:
Tweening
Timeline Updating


therevills(Posted 2013) [#17]
Just updated the demo, now uses the actual timing from the files and has timeline updating (so now more missing hair :P)... the monster moves slow as the animation is 2 seconds in length, it'll look better once tweening is done ;)


CopperCircle(Posted 2013) [#18]
Looking good


DGuy(Posted 2013) [#19]
Nicely done!


therevills(Posted 2013) [#20]
Nearly finished tweening, the monster looks 99% complete but the hero looks off...

Left side sprites are drawn per key frame and the right side sprites are drawn with tweening:

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html


Jesse(Posted 2013) [#21]
whenever I change animation it glitches and does this:



Safari & Chrome.

other than that it works quite nicely.



.


rIKmAN(Posted 2013) [#22]
Yep same as Jesse for me, left side works fine, right side characters explode when changing animations - Tested in Chrome.

Good work :)


therevills(Posted 2013) [#23]
Yeah I know about that one ;) Its due to the timing not being reset, if you leave a second or two the animation should go back to normal.

So whats the difference between these calculations:
Local tweenedX:Float = x1 + ((x2 - x1) * ((currentTime - timelineKey.time) / ( nextKeyTime - timelineKey.time))) 


with this:
Local t1:Float = currentTime - timelineKey.time
Local t2:Float = nextKeyTime - timelineKey.time
Local timeAmount:Float = t1 / t2
Local tweenedX:Float = x1 + ((x2 - x1) * timeAmount)


I thought they were the same, but I had to expand the first one to the second one to get the tweening to work.


Samah(Posted 2013) [#24]
(currentTime - timelineKey.time) / ( nextKeyTime - timelineKey.time)

Integer division.


therevills(Posted 2013) [#25]
Integer division.

Doh! Thanks Samah!!

Just uploaded a newer version with a timer class: F1 to start, F2 to Stop and F3 to Resume.

So close now... hero's arm is a bit off when walking. [Edit - looks like the file is like that anyway...)


Tibit(Posted 2013) [#26]
Excellent work, this is going to be very fun to use!


therevills(Posted 2013) [#27]
Uploaded a quick fix and also uses Maps instead of Lists (since most of the objects are ID based).


therevills(Posted 2013) [#28]
Question...

If you are on the last keyframe and there is time left on the animation, do we tween between the last frame and the first frame?

As this is what is causing the jumping movement with the walking hero... if we just display the last keyframe until the end of the animation it looks better, but you have a slight pause in movement.


Paul - Taiphoz(Posted 2013) [#29]
have you tried just maxing the time or setting it back to the start the second the animation reaches its end ?


therevills(Posted 2013) [#30]
I originally had it if there wasnt a next keyframe it would tween between the last keyframe and the first keyframe and max the time, it worked 90% of the time and I guess would be nearly the correct way for looping.

Now I've got if you are on the last keyframe it keeps on that frame until the end of the animation...


rIKmAN(Posted 2013) [#31]
Now I've got if you are on the last keyframe it keeps on that frame until the end of the animation...


That doesn't sound right, is it working like that?
Maybe if you had to have a keyframe on the last frame, so as soon as it hits it you know then animation has completely ended, that might work?

From what you said it sounds like it would be frozen on the last keyframe pose until the end of the animation, then snap back to frame 1 when it had finished.


therevills(Posted 2013) [#32]
Maybe if you had to have a keyframe on the last frame, so as soon as it hits it you know then animation has completely ended, that might work?

Then it would go straight to the first keyframe with no time to tween.

From what you said it sounds like it would be frozen on the last keyframe pose until the end of the animation, then snap back to frame 1 when it had finished.

Exactly :)

I think I need to add/use the looping flag in the SCML:
<animation id="0" name="idle_healthy" length="2100" looping="false">


Currently it is always "false" in the XML.

If its false, we would freeze on the last keyframe until the end of the animation, if true it would tween between the last keyframe and the first keyframe until the end of the animation and start again.


therevills(Posted 2013) [#33]
Ahhhh think I've might have got it (maybe), a timeline's first key might not start at the animation start... so if we don't tween.


therevills(Posted 2013) [#34]
All cleaned up and read to go (apart from bones):

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html




Paul - Taiphoz(Posted 2013) [#35]
Thats looking really good if you can really get this nailed down and into diddy it will probably make me buy that spriter tool.


therevills(Posted 2013) [#36]
SLotman over on bb.com suggested adding support for scaling and flipping, so after head banging at my desk and bugging Samah, it now works.

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html




rIKmAN(Posted 2013) [#37]
Not sure if you have seen it therevills, but if you are planning on adding bones support the Admin over at BrashMonkey has posted a bone example in your Monkey thread.

Are you planning on updating this to support new Spriter features in the future?

What are the downsides to using Spriter as opposed to typical images for animation. ie. performance, memory, cpu etc.


therevills(Posted 2013) [#38]
Yeah I saw the reply and I've changed the Importer to read in the bones... but I'm not sure how to implement it at the moment.

Are you planning on updating this to support new Spriter features in the future?

I'm getting it to a stage so I can actually use it in a game, the source is here so if I don't keep it up to date hopefully someone else will. And hopefully the Spriter team doesn't totally change the format again...

What are the downsides to using Spriter as opposed to typical images for animation. ie. performance, memory, cpu etc.

It will require more CPU time to tween and maybe more memory due to more objects per sprite... but you save on texture memory and you can quickly change an animation without redrawing all the frames again.


rIKmAN(Posted 2013) [#39]
I didn't even realise it didn't support bones until I saw your post on their forums, I assumed that was what the demo was using.

I look forward to having bones support, once that is in I will be having a proper look at using it in a game, as from what I have seen of Spriter it makes animating possible even for a complete non-artist like me.

Any ETA on the bones support or is it just an as and when for when you progress with your project?


therevills(Posted 2013) [#40]
I've added the importing code for the bones, but need to do the rendering... I'll be working on this for the rest of this week, but I really need to move with my main project.


rIKmAN(Posted 2013) [#41]
Can't wait to see your progress :)


therevills(Posted 2013) [#42]
Okay, hit a big bump yesterday... Slotman has been messing around with my code and found quite a huge bug.

In Spriter you can alter a pivot point in any of the keyframes. So for example say on key frame 1 the pivot for the head is at 20, 74 and on key frame 2 its at 24, 150, but the actual image doesn't move. The tween is between 74 and 150 forcing the head to move upwards.

I could minus the pivots off the co-ords, but only if I don't use "SetHandle":

       |Frame 1 | Frame 2
-------+--------+---------
  x    | 20     | 24
  y    | 74     | 150
pivotX | 0.617  | 0.503
pivotY | 0.157  | 0.778

Image Height = 121 pixels

Just looking at Y:
Frame 1:
pivotYPoint = 0.157 * 121 = 18.997

newY = 74 - 18.997 = 55

Frame 2:
pivotYPoint = 0.778 * 121 = 94.138

newY = 150 - 94.138 = 56


But of course now all the angles wont be rotated at the correct point.... :(

Anyone got any ideas on how to get around this?


Tibit(Posted 2013) [#43]
Could you do your own rotation, translation, scale & pivot instead of DrawImage's using push pop matrix to mimic the Spriter behavior?


therevills(Posted 2013) [#44]
Maybe... but I didn't really want to use matrix stuff, as I wanted to be able to convert this code quickly to BlitzMax (as this is really where I want to use it at the moment...)


therevills(Posted 2013) [#45]
Fixed it!!!!!!!!!!!!!!!!! YAYYYYYYYYYYYY!!!!! \o/

Samah originally suggested tweening the pivots which we tried, but it didn't work... I've just revisit that idea and figured out what we did wrong:




therevills(Posted 2013) [#46]
Decided on uploading the code to Google Code:

https://code.google.com/p/monkey-spriter-importer/


rIKmAN(Posted 2013) [#47]
Great work mate, so bones are fully working now? :)

Are those example files available from the Spriter site?


therevills(Posted 2013) [#48]
so bones are fully working now?

Nope, I was having trouble with pivots and it was really doing my head in!

Are those example files available from the Spriter site?

They should be, or you can get them on the Google Code page.


therevills(Posted 2013) [#49]
WIP Bones added... my brain hurts :P

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html


dopeyrulz(Posted 2013) [#50]
@therevills

Your flipping on the right-hand character is not working properly - otherwise looks ok!


therevills(Posted 2013) [#51]
LOL... that's why its WIP :-)


rIKmAN(Posted 2013) [#52]
There aren't any files listed in the downloads section on the Google Code page, do I need to SVN like with Diddy?

Also, I've posted on the App page as well, but how are you keeping the images so crisp when rotating / scaling?

As soon as I rotate or scale any image in 4.1a it gets distorted / jaggy, and apparently it is a known issue, but doesn't seem to affect your demo?


therevills(Posted 2013) [#53]
do I need to SVN like with Diddy?

I'm using Mercurial (Hg) this time around :)

but how are you keeping the images so crisp when rotating / scaling?

The power of Monkey ;) It's the image filtering built into Monkey, if you turn it off it will look pixelated.


rIKmAN(Posted 2013) [#54]
Not for me - they start getting jaggies when I rotate them in Spriter so it can't be Monkey, unless you're saying Monkey fixes these jaggies once loaded?

Thinking about it you are using demo files - it's possible they are exported from a newer version than 4.1a.

If you load in the monster demo and rotate his head you'll see the jaggies and distortion on his face - when you get time could you test it?

Also maybe load the demo monster into 4.1a, re-save it and see if that is still smooth and crisp in your demo.


therevills(Posted 2013) [#55]
Because we render the images using Monkey it is smooth, it is the Sprinter application which is not smoothing them. We are just using the animation file in Monkey.


rIKmAN(Posted 2013) [#56]
So it isn't just me then? - ut's becuase you are using a non-jaggy premade .scml file (+images)..?

If you were to use Spriter like I explained to make your own test character you would also get the ugly jaggies?

Just want to make sure it's not me going mad, I spent about 3hrs messing round last night and got nowhere really due to it looking so ugly.


therevills(Posted 2013) [#57]
Sorry... okay let's try again. For me, the images within the Spriter application are pixelated when scaled and rotated, but when I load them using my code into Monkey its fine.


rIKmAN(Posted 2013) [#58]
Ahhhh!

I never tried getting them into Monkey as they got messed up in Spriter so I thought that was where the problem was.

I'll give that a go, ignore how it looks in Spriter and see if I can finally get it looking right in Monkey once its loaded in.

Thanks for the info.

edit
I missed one of your replies when posting, hence me asking you the same thing again, apologies :)


rIKmAN(Posted 2013) [#59]
Just tested this and it works perfectly when in Monkey, smooth and crisp just as you said.

Thanks mate, next up flipped bones! :P

<snipped a load of waffle>

When I add my unboned character to your demo and set looping to false, after the animation has finished he warps into a pile of limbs, but the x/y position do not change when this happens.

If I turn off tweening, then he looks fine when the animation ends - so it's something to do with tweening.
I must be missing something but can't see anything in the demo code with your models that I'm not doing with mine. Any ideas?

edit
I fixed/bodged this by checking timer.GetTime() against a value around 20ms less than the length of the animation inside Spriter.


therevills(Posted 2013) [#60]
after the animation has finished he warps into a pile of limbs

Any chance you could send me your character?


Re: Flipped bones........ I give up, until the Spriter guys release the development guides, I've been trying off and on for the past two weeks and getting nowhere!


therevills(Posted 2013) [#61]
I had a mini-brainwave last night and thought sod flipping the bones, why don't I just flip the images!

http://www.therevillsgames.com/monkey/SpriterA4/MonkeyGame.html


rIKmAN(Posted 2013) [#62]
There is a post on the Spriter forum by C2tP which basically says the same thing - don't flip the bones.

I am not using bones at the moment as I wanted to get it working with just images before I spent time setting up a rig, but even that is giving me issues when trying to flip - although I suspect my code is at fault here rather than Spriter or your importer.

Do you still want my character that collapses when not in loop mode?

Is it possible to turn on/off images in a character using Monkey code, maybe setting the alpha level on the fly for each image in the rig?


therevills(Posted 2013) [#63]
Do you still want my character that collapses when not in loop mode?

Yes please!

Is it possible to turn on/off images in a character using Monkey code, maybe setting the alpha level on the fly for each image in the rig?

Yeah, it should be possible... over on bb.com SlotMan did it on an old version of the importer:
http://www.blitzbasic.com/Community/post.php?topic=99983&post=1177496


rIKmAN(Posted 2013) [#64]
Ah nice - I forgot about bb.com if I'm honest - I'll give that a look tomorrow that could be really helpful.

Where do you want me to send my files?


therevills(Posted 2013) [#65]
Have you got a drop box account or something, if not send it to my email address: therevillsgames@...


rIKmAN(Posted 2013) [#66]
Yes of course, sorry it was late and my brain was frazzled!

I've got a couple of examples that are not playing nice, which I have basically added my character to your Example to rule out it being my code.
I've upped it to my DropBox with a little readme to explain things.

Find the download here


therevills(Posted 2013) [#67]
Love the Goof character!

Okay, the issue with your character and the spriter importer is that you have your very last key frame at the end of the animation. For a quick fix add 100ms to the Animation length... but it is a bug in the code!

With your day/night cycle... dont know yet, I'll investigate tonight.


rIKmAN(Posted 2013) [#68]
Thanks mate, keep it to yourself if you would, though I wouldn't expect you to do anything with it.

Would setting the last keyframe 1ms before the end of the animation work rather than adding dead space to my animations?

I think it may be the same issue with the nigh and day scene - the last keyframe is the very end of the animation, so I guess its doing the same as with the character, I'll give it a try and see.

Is the bug with the scml or the importer module?

Oh and thanks, appreciate your time. :)


therevills(Posted 2013) [#69]
keep it to yourself if you would

No worries! Did you draw it yourself and the night/day background?

I think it may be the same issue with the nigh and day scene

I thought so too, but when I altered it I still saw the slight flicker.

Is the bug with the scml or the importer module?

The importer module...


rIKmAN(Posted 2013) [#70]
No worries! Did you draw it yourself and the night/day background?

No they are from the game I'm working on at the moment - hence the keep it to yourself - but I'm not the artist.

I thought so too, but when I altered it I still saw the slight flicker.

Ahh OK, hopefully a simple fix then :)

EDIT: I just tested moving the keyframe 2ms from the end of the animation and it works fine, he stays on screen when the animation ends.


therevills(Posted 2013) [#71]
Fixed the LOOPING_FALSE bug...

With the night and day issue, I know whats causing it and a workaround.

The flicker you are seeing is when your night scene finishes and you change to the day scene, but for some reason Monkey displays your night scene again which causes the flicker.

The workaround around is to call spriterObject.Update after changing the animation, so in your example move bg.Update(bgAnimName, loopType, timeElapsed) under the Select statement.

I'll have to think about how we can fix that in the importer.


rIKmAN(Posted 2013) [#72]
Ahhh that fixed both the issues - thank you! :)

I will be having a play with boned characters this weekend, so I will let you know if I find any anomalies with the flipping.
The current character is just images, and is now a lot more complicated (parts-wise) than that small demo so I think a skeleton is in order.

Thanks again for the quick fix! :)


therevills(Posted 2013) [#73]
Alright, I've just pushed another changed. This one will require you to call SetAnimation and I have also removed the animationName and loopType from the Update method.

This will fix the day/night cycle so you wont need to call update after changing the animations:

Load in your scml:
loopType = MonkeySpriter.LOOPING_FALSE

bg = SpriterImporter.ImportFile("bg", "bg_day_and_night.scml")
bg.x = 0
bg.y = 0
bg.timer.Start()
bg.SetAnimation(bgAnimName, loopType)


Update and change animations:
bg.Update(timeElapsed)

If bg.currentAnimation.finished
	bgAnimName = BG_NIGHT_TO_DAY
	bg.SetAnimation(bgAnimName, loopType)
	bg.timer.Start()
EndIf


Note: finished is only set if the loop type is FALSE


rIKmAN(Posted 2013) [#74]
Good stuff, super speedy fix, I'll get that pulled shortly - thanks. :)

A little off-topic, but are you rolling your own collision for the Spriter images or waiting for the official implementation in the SCML?


therevills(Posted 2013) [#75]
Are you rolling your own collision for the Spriter images or waiting for the official implementation?


Haven't even thought about collisions yet... I'm more using it for animation cut-scenes.

I guess the best approach would be rectangle collisions for each image.


rIKmAN(Posted 2013) [#76]
Hi mate,

I sent an email to you about this, but in case you don't get it...

What is the deal with multiple .scml files for one character (ie. head/body) and scaling?

I can place them fine and offset the head for movement etc, but when I scale they explode away from each other due to the differing pivot points, and I'm wondering if there is some way to easily deal with this?


therevills(Posted 2013) [#77]
Hey Rik,

Yes, I got your email I been trying to think a solution for you... but havent come up with anything.

Maybe post on the Spriter forum and see if anyone on there has any answers.


rIKmAN(Posted 2013) [#78]
Will do mate, I just thought it may be something that could be handled in the importer - I will let you know if I find out an answer.


therevills(Posted 2013) [#79]
It more a parent child relationship issue, the importer has done it's job now its the actual game's job to control the imported sprites.

Not sure if this would work, but a cheating way you could do is, in Spriter set you head position to be in the correct position where it would be on the body...


rIKmAN(Posted 2013) [#80]
That works, so simple I didn't think of it - doh! :)


Soap(Posted 2013) [#81]
New update: http://www.kickstarter.com/projects/539087245/spriter/posts/436499


rIKmAN(Posted 2013) [#82]
Yep been testing this for a week or so, it's a big improvement over the old version but lacks some important features right now to be used in a proper project.

As soon as the copy/paste is in I think I'll use it instead of the alpha full time.


therevills(Posted 2013) [#83]
I actually prefer the A4 GUI... why do they keep changing it!?


Playniax(Posted 2013) [#84]
I am playing around with this again and I would like to add some kind of collision handling.

What is the best way to get a certain part of the sprite. For example the sword relative x and coordinates, width and height so can make some collision stuff?

Also the complete width and height of a sprite would be great :)

Or I should hack something together myself...

I have made this little demo with Ignition:

http://www.playniax.com/share/demos/spriter/MonkeyGame.html


therevills(Posted 2013) [#85]
lol - you like to spam the forums dont ya ;)

http://www.monkeycoder.co.nz/Community/posts.php?topic=5040#55355


ziggy(Posted 2013) [#86]
How stable would you considere Spriter on Monkey? I'm about to start a very big project next week and I would like to suggest Monkey for it, but I would love to have some feedback about Spriter and Monkey and how much do they love each other. All samples look like that's what I want to do, but if there's anything missing on the Monkey module I should know beforehand, It would be great to be aware of it.


therevills(Posted 2013) [#87]
Monkey module I should know beforehand, It would be great to be aware of it

I've pretty much stressed tested it in HTML5 and GLFW and its pretty stable.

The only thing I can think of is that it might have issues on Android, due to the lists I am using, so there is work we could do to optimise the code - maybe use arrays/arraylist instead.


ziggy(Posted 2013) [#88]
Thanks! if it's only optimization looks great


rIKmAN(Posted 2013) [#89]
Spriter itself is still in dev, so a lot of features are still "coming soon" and "planned" as it has been heavily delayed.

It's far from perfect and there are still some bugs and features missing, but in the last month the new version has come on loads and is finally heading towards adding all the features promised.

The spriterImporter supports all the features available at the moment, and hopefully as Spriter itself adds more features then therevills will kindly keep his importer up to date - I hope so anyway :)

I'm using the existing software and importer in my project and it's fine for that at the moment, though I don't use bones so not sure if there are any issues there.

EDIT: I can confirm it works fine on iOS as well.


Playniax(Posted 2013) [#90]
@therevills: yeah, I was wondering about the lists. Not sure performance wise this would work with a lot of sprites. Also I noticed the New command in the Draw method if I remember correctly. Isn't that going to be a problem for the GC because it looks like it's called everytime? Not sure though.

And for collision, If I could get the objects width/height and relative pos it should not be so hard to add collision methods.


therevills(Posted 2013) [#91]
Also I noticed the New command in the Draw method if I remember correctly. Isn't that going to be a problem for the GC because it looks like it's called everytime?

Yeah it could be an issue, as I said the code could be optimised quite a bit - I normally try to get things working and then optimise as needed.


rIKmAN(Posted 2013) [#92]
Not sure how many (if any) people are keeping up to date with Spriter and this importer module, but it has been updated a fair bit to B4 now.

This version includes "Character Maps" which is allowing images to be swapped in and use the same animation data (Pro Feature Only) for things like weapons, clothing, armour, shields etc.



As well as an update/release of the Developer Docs.

Any plans to update the importer to support the new stuff therevills?


therevills(Posted 2013) [#93]
So the character maps let you to use the same animations but just swap in the images... that's cool (as long as all the images are the same size I guess).

Is the idea also that you can change the images at runtime?

I do/did plan on adding all the features of Spriter, but I am so busy at the moment, so don't expect it soon...

I am happy to open up the repo to anyone who is interested in helping, just let me know. :)


Dwapook(Posted 2013) [#94]
Hey.. I'm using the ignition framework implementation of the importer and I've run into a problem with pivots..

I've been setting the pivot point before laying the image on the canvas in spriter.. (like this states)

But doing that seems to cause the pivot points to be ignored when run through the monkey importer.. Kind of curious if that's ignition specific or the original source of the module has the same problem? I'm having a bit of trouble trying to figure out how the download the latest version..


Playniax(Posted 2013) [#95]
Can you test this with the non Ignition code?

We do not support this code officially but I see what I can do. Just test it first with the non Ignition code.


rIKmAN(Posted 2013) [#96]
Thanks for the reply therevills.

Without being pushy at all, would you have a rough estimate of timescale before you have chance to look at the code again? Weeks / months?

@Dwapook
I use the non-Playniax code and have not noticed any abnormalities with regards to pivot points - I'm using the Pro version of Spriter B4, are you?

What is the problem exactly...incorrect animations when played back due to the pivots being wrong?


Dwapook(Posted 2013) [#97]
@Playniax
Eh.. I tested it with the non ignition code and getting the same issues, maybe I'm doing something wrong

@ rIKmAN
Yeah, I'm using Spriter B4 Pro also.. as for specifics..

I set the pivot x and pivot y in the file palette, these values were 0 in the spriter examples I downloaded..



___________________________________________________________________________

When I test it out, it looks like the pivot points are considered to be set as 0,0 and all the images are displaced...



___________________________________________________________________________



This happens when I turn the tween off..
One last issue, if I set animation to ping pong, the images warps back and forth on the screen, appearing in the left as a crumpled ball, and unchanged in the right..



therevills(Posted 2013) [#98]
@rIKmAN

Its going to be months... its currently good enough for my newest game and I dont want to spend anymore time on this until my game is out. (Apart from bug fixes).

@Dwapook

Firstly dont worry about what happens when you turn off tweening, you are using bones - bones require tweening.

Any chance can you share your animation?


Dwapook(Posted 2013) [#99]
https://docs.google.com/file/d/0B23VwTc0S49gTllWOHRjdjRqeUk/edit?usp=sharing

Eh.. fairly incomplete as we weren't planning to do much with it until this issue gets sorted out.. danke!


therevills(Posted 2013) [#100]
Thanks Dwapook, looking thru your SCML file there are quite a few new elements which unless I am blind I can not find how to use them.

For example "File" now has pivotX and pivotY which I guess is the default pivot points, also "Object_Ref" has "abs_" elements (pivot, x, y, angle, scales, alpha) yet I cant find any documentation on what to do with these...


Dwapook(Posted 2013) [#101]
Aye, well thanks for looking into it at least! Tried messing with it for a while myself and only managed to get it looking somewhat better.. Still trying to get familiar with monkey and I'm not a very strong coder to begin with..


therevills(Posted 2013) [#102]
For the time being could you not use the default pivot points for your project?


Dwapook(Posted 2013) [#103]
Eh, what I used was the default, I thought? I think I get what you mean though! Will try just altering the pivots after the images have been laid on the canvas for now and hope nothing else comes up, thanks again for your time!