Help fund the Monkey Spine module

Monkey Forums/Monkey Programming/Help fund the Monkey Spine module

Skn3(Posted 2014) [#1]
Calling all Monkey'rs,

We are looking for your help to raise funds to keep the Spine module updated.

More info here: http://www.monkey-x.com/Community/posts.php?topic=7560#94069

I am posting this as a separate thread as I know not everyone reads older topics. If you would like to help support the module, I have set up a fund raising campaign:

https://fundly.com/spine-module-update

If you would prefer to support via paypal then use the button below.. I'll make sure to manually add paypal contributions to the funding page.



Cheers!


tiresius(Posted 2014) [#2]
It's been a while since I looked at Spine. Do you have the ability to do mesh deformation? I might be thinking about the wrong feature but there was something in Mojo2D limiting full support of the Spine features for quad/tri mesh type stuff....


Skn3(Posted 2014) [#3]
Mesh transformations are now in. These are drawn with DrawPoly (textured) so do not work on html. I think all other platforms are supported though.


Soap(Posted 2014) [#4]
I strongly encourage anyone using Monkey or Spine commercially to support this. You should contact Jon directly too!

With mesh deformation many more animation styles are possible such as the behavior seen in the game Dragon's Crown with its animations. It means much more appealing animations and characters are possible with less cost and resources.

http://www.youtube.com/watch?v=MVmq2dNzOG4

Check out the latest official Spine video tutorials to understand what the other features are about http://www.youtube.com/user/Nipsting/videos


Playniax(Posted 2014) [#5]
As one of its backers we strongly encourage anyone to support this too!

It will probably help Monkey indirectly!


CopperCircle(Posted 2014) [#6]
Spine combined with Ignition make Monkey a very powerful cross platform tool :) I made a donation.


Skn3(Posted 2014) [#7]
Much thanks for the support guys :D

Spine is definitely an asset to Monkey.

Lugato requested to contribute via paypal. If other people wanted this method there is a button below. I'll make sure to manually add paypal contributions to the funding page.



Difference(Posted 2014) [#8]
Sounds like a project worth supporting, but could you explain this statement a little:

"This fund raising campaign is to re-port the Monkey Spine module to the most version of the official csharp runtime. This includes things like FFD, bounding boxes and IK support."


"the most version" - is there a word missing?

Also what has "the official csharp runtime" to do with monkey?


Skn3(Posted 2014) [#9]
Hey Difference,

I have updated the description on the fundly page to add more detail/grammar. Not my strongest point ;)

Basically I took the csharp runtime. Converted all the code to monkey. Converted all List based data storage to array based. Tweaked some bits for performance. Added a layer of monkey/mojo functionality on top.


Difference(Posted 2014) [#10]
Great - thanks for explaining the csharp part.

I have only tried funding via kickstarter in the past.
Is fundly.com like that, in the way that you have to reach your goal to collect the money, and consequently commit to completing the project ?

[EDIT] : It seems not, so what do you/(the campain owner) commit to?


Skn3(Posted 2014) [#11]
Well essentially I have created the entire portion of work already (bar bug fixes and tweaks) so you are free to go and download it now.

The fundly campaign just lets the community contribute back if they are using the module. It helps relieve some of the burden of supporting a complex module from the developer and original project backers.

If I don't end up hitting the target then that is fine. Some support is better then none :)


Difference(Posted 2014) [#12]
Ok, made a small donation to support your fine work on this and other modules :-)

I haven't tried spine, but maybe someday I'll get the time!


Skn3(Posted 2014) [#13]
Much thanks :D and also many thanks to everyone else who has supported so far.


Skn3(Posted 2014) [#14]
The fundly campaign has stalled, but we have made good progress. If there is anyone else that uses the spine module and would like to support me then your contributions will really help!

Just to give you an idea of support, I have committed these tweaks today:
' - major fix to UpdateCache and UpdateWorldTransform in spine skeleton. Now has fully functional IK
' - updated license in accordance with spines new license
' - small tweak to fix bug when switching from old skin to new skin


The UpdateCache/WorldTransform involved reporting the code again; this time using the c runtime as a reference. I then go over it with a fine tooth comb, converting any code to the best practices for Monkey. The result is a fully functional runtime in-line with the official runtimes.


tiresius(Posted 2014) [#15]
Does this integrate with Ignition-X framework?


Playniax(Posted 2014) [#16]
Hi,

There is no real need to integrate Spine with Ignition X because it is very easy to setup.

Basically you call the spine update and render routines from the ignition X engines OnUpdate and OnRender methods and create spine objects in the Ignition X OnCreate methods.

If you need to blend Ignition X engine objects with spine objects you can create a custom layer and call them from the layers OnUpdate, OnRender and OnCreate methods.

I am currently working on the TimelineFX integration (iTimeLineFXLayer) for Ignition X and I will probably do the same for Spine.

To create a custom layer that renders your Spine objects you can do something like this.

Class SpineLayer extends iLayer

Method OnCreae()
...create spine objects here or in the main scene class
End Method 

Method OnUpdate()
...call you spine entity update routine here
End Method 

Method OnRender()
...call you spine entity render routine here
End Method 


Now add this layer and your other layers to a playfield and you can have all the benefits of Spine and Ignition X together.

If people need a running example I will provide it :)


Peet(Posted 2015) [#17]
Hi,

I sorta understand the Ignition X integration and Spine... but not enough to understand how to use Ignition's collision system with a spine-entity... Can you update me on that Playniax?

Salute


Playniax(Posted 2015) [#18]
@Peet: Did you create a layer object using spine or do you call the draw and update calls yourself?


Peet(Posted 2015) [#19]
@planiax

I created this... a Rip van Winkle from the MonkeySpine example (which seem to work)


Import imports

Class Whatever Extends iLayer Implements SpineEntityCallback

  Field timestamp:Int
  
  Field spineObject:SpineEntity
  Field objectPosition:Float

	Method OnSpineEntityAnimationComplete:Void(entity:SpineEntity, name:String)
		' --- animation has finished ---
		Select entity
			Case spineObject
		End
	End
	
	Method OnSpineEntityEvent:Void(entity:SpineEntity, event:String, intValue:Int, floatValue:Float, stringValue:String)
		' --- event has triggered ---
		Print "SpineEvent: " + event + " int:" + intValue + " float:" + floatValue + " string:" + stringValue
	End
	
		
	Method New()
	
    timestamp = Millisecs()
    
    'Self.collisionName = "Whatever"
    'Self.EnableCollisionRead()
    'Self.EnableCollisionWrite()
    
		Try

			Self.spineObject = LoadMojoSpineEntity("monkey://data/Whatever.json")
			
			Self.spineObject.SetAnimation("walk", True)
			Self.spineObject.SetScale(.15)
			Self.spineObject.SetSpeed(1)
			
			Self.spineObject.SetDebug(False, False)
			Self.spineObject.SetCallback(Self)
			Self.spineObject.SetSnapToPixels(False)
			Self.spineObject.SetIgnoreRootPosition(False)
			Self.spineObject.SetFlip(False, False)
			
			Self.spineObject.SetPosition(600, 600)
			
		Catch exception:SpineException
			Error("Exception: " + exception)
		End
    
    Self.AttachLast()
    
	End
    
  Method OnRender:Int()
    
    Self.spineObject.SetSlotAttachment("face", "face_eyes")
    Self.spineObject.SetSlotAttachment("hand_right", "hand_gun_right")
    Self.spineObject.Render()
	End

'more methods here....
	
	Method OnUpdate:Int()

    If MouseDown(MOUSE_LEFT)
      Self.spineObject.SetPosition(MouseX(), MouseY())
    Endif
	
    Local newTimestamp:Int = Millisecs()
    
      
    Local deltaInt:Int = newTimestamp - timestamp
		Local deltaFloat:Float = deltaInt / 1000.0
		
		'spineTest.SetBonePosition("bone4", MouseX(), MouseY(), True)
		
				'make changes to certain bones after it has been updated
		'spineTest.SetBonePosition("bone4", MouseX(), MouseY(), True)
		'spineTest.SetBoneRotation("head", MouseX(), True)
		
    Self.spineObject.Update(deltaFloat)
    
    'Self.ImagePointer(spineObject)
    
    timestamp = newTimestamp
    
    If Self.spineObject.PointInside(MouseX(), MouseY(), SPINE_PRECISION_HULL)
			Self.spineObject.SetColor(255, 0, 0)
		Else
			Self.spineObject.SetColor(255, 255, 255)
		Endif
		
	End
		
	Method PointInside(mX:Float, mY:Float)
    Return Self.spineObject.PointInside(mX, mY, SPINE_PRECISION_HULL)
	End

'more methods here

End



And I'm using this on a playfield like this...


   '... showing only OnStart()

		Method OnStart:Int()
      
      Self.playfield.CameraX = 300
      Self.playfield.CameraY = 300
      
      ' Layers and Sprites
      Self.layer1 = New iLayer
      Self.layer1.AttachLast(Self.playfield)
      Self.layer1.cameraSpeedX = 1
      Self.layer1.cameraSpeedY = 1

      whatever = New Whatever()  
                  
      iTransitionTask.Get("explorerscene").Intro(INTRO_ZOOM_AND_ROTATE_OUT)
      
			Return 0
		End Method
		


Is there a better way? And how do I have the Spine-entity do collision detect and/or other objects in iCollisionLayer? I'm getting the feeling I'm doing something very wrong here... Rest of the game-stuff I made so far works like a charm... Kudos to the Playniax Team for Ignition X...

Please help.... Would be greatly appreciated


Peet(Posted 2015) [#20]
Oh... maybe I should mention that I'm working with MonkeyX, IgnitionX and Spine for about 4 or 5 weeks now... I'm a noob :)


Playniax(Posted 2015) [#21]
I will have a look at this asap and get back to you...


Playniax(Posted 2015) [#22]
I decided to do this 'properly' so I started working on a Spine wrapper for Ignition X and it's going really well.

Here is a little preview: http://playniax.com/showcase/spine/MonkeyGame.html

(test collision between the Spineboy and the bullet by moving the bullet towards the gun)

Btw, who is actively using Spine?


tiresius(Posted 2015) [#23]
The monkey in me is cheering and clapping. Nice work playniax!

The cheapskate in me says I recently got Spriter in a bundle for peanuts and would love to see native support of that. :-)


Peet(Posted 2015) [#24]
Aahhh Playniax... cool! Are you extracting all slots from a spine entity as collision layers so that one can detect 'm by name (maybe with a prefix or something)?? In the same context... I was thinking I need to find certain points on the borders of attachments in slots to have object (like bullets) depart from (there)... so that if one fires a gun or something a bullet leaves the gun from the right position and travels in the right direction... Again I'm wondering... would this be the way 2 go... I hope it is obvious I actively use Spine!
Furthermore... Let's say I have slot with a hand and sword.... Then I need to know if the sword hits an opponent... Does a slot hold the dimensions of the current attachment?
I know I'm kinda over-questioning and being a pain in the *rs, but then again... I could always try right??


Playniax(Posted 2015) [#25]
I know I'm kinda over-questioning and being a pain in the *rs


Not at all but honestly, I haven't dived that deep in Spine myself.

You probably know more about it than me! :)

I will dive deeper into Spine when I have some more time...

The wrapper is now ready for download though at http://support.playniax.com

Have fun!


Peet(Posted 2015) [#26]
First, thanks a lot for the effort Playniax, but... Can I download something there when using Ignition X that came bundled with Monkey X??? I do not see a download section when I log in! I believe I once could register it, but I'm not sure now?!


Peet(Posted 2015) [#27]
@Playniax... never mind, Found it already!


Peet(Posted 2015) [#28]
Playniax,

Manny thanks!!! Your wrapper works like a charm and answers (I believe) all the questions I had :) Very, very cool Indeed.... I placed the wrapper in third-party, because I think that is the best place for it!? Is it possible that you place it there as well so it will be there when I update?
Do you have any idea where to go or how to implement collision maps(? .. not sure about the name) on a Spine Attachment?

Is Pyro easier in it workings in comparison to Ignition X... (I'm thinking about switching) and would the wrapper work in Pyro when changing the Imports only? If so... how would stuff like normal-maps work for Spine entity attachments?

I hope I do not consume too much of your time and if there is anything I could do in return, please let me know! Thanks again!


Playniax(Posted 2015) [#29]
Manny thanks!!! Your wrapper works like a charm and answers (I believe) all the questions I had :) Very, very cool Indeed

You are welcome!

I placed the wrapper in third-party, because I think that is the best place for it!? Is it possible that you place it there as well so it will be there when I update?

It will make it to the next update but I am not sure where to put it yet. My first thought was third-party like you but I am also thinking about leaving it like this for a while until I have more experience with Spine myself.

I'm thinking about switching

It really depends on what you are going to make.
Pyro is missing box2d, some of the Ignition X GUI features and now the Spine wrapper.
Pyro has the Mojo 2 features that Ignition X not supports (dynamic lights, shadow casting, render to texture.
Also Pyro will be ported to Monkey 2, Ignition X (probably) not.
But, basically it comes down to what you need for your project.

Is Pyro easier in it workings in comparison to Ignition X

Yes, I believe Pyro is easier and better. Pyro was written from scratch and I worked on this with Mark Sibly!
Pyro is a much younger engine though so in the feature department it is a little bit behind on Ignition X but it will catch up!

if there is anything I could do in return, please let me know!

I plan to improve the wrapper a bit more before the next update so might have some question about Spine later. Maybe you can help out there!

would the wrapper work in Pyro when changing the Imports only?

No, Spine needs to be ported to MOJO 2 first. I don't know if this is already done. Maybe I will do this myself. Not decided yet but could be interesting.


rIKmAN(Posted 2015) [#30]
Playniax - if the forum wasn't such a pain to use I would post a looping "slow clap" gif!
I'm not surprised anymore but you really are a machine (along with a fair few others) when releasing this sort of stuff for the community to use.

This looks great (only looked at your example), and to answer your question I am using Spine a lot with skn3s module, although I'm not sure what the latest version it supports is as I am using a very old version of Spine without the bounding boxes, mesh deformation etc as everything works fine at the moment and I don't want to break anything lol.

Would be great to see this integrated fully into Ignition/Pyro properly, but still able to be used on it's own too like you have done with Ignition where I just use the iEngine module to manage/change game states and the rest of the code is my own without being forced to use any other bit of Ignition. I love the fact that I can do this.

With regards to Pyro, is there a time limit on the discount for Ignition/R.U.B.E owners?
I will get Pyro after I finish my current project and it has matured a little, but I don't need it now so was wondering about the time limit.

For the guy asking about Spriter - therevills made a Spriter Importer a while back which worked with the early versions of Spriter, it might not work now with the newer version but might be worth a look. Just search 'Spriter' in the forum search.


Playniax(Posted 2015) [#31]
With regards to Pyro, is there a time limit on the discount for Ignition/R.U.B.E owners?

The first coupon code campaign has expired but we will probably do some more campaigns in the future... Not sure when though :)


Milky Joe(Posted 2015) [#32]
Bah! I forgot the Pyro upgrade discount was time limited. Was going to upgrade this weekend too...


Playniax(Posted 2015) [#33]
Yeah, more people missed it was time limited.

So for you and all the other people who forgot :) I have made 30 more coupon codes available for existing Ignition X users (until the end of this month!). Logon to http://support.playniax.com to get it!


Milky Joe(Posted 2015) [#34]
Nice one Playniax! Thanks :)

I've got the coupon code, but - and I'm probably being stupid here - I can't see where I enter it at the checkout?


Playniax(Posted 2015) [#35]
Try this link: https://shopper.mycommerce.com/checkout/cart/add/53762-1

There should be a coupon box somewhere on the screen!


Milky Joe(Posted 2015) [#36]
Nope - no coupon box appearing for me. Very strange...

I just get the product section at the top, the address section and the payment section. None of them contain a coupon box.


Playniax(Posted 2015) [#37]
Do you see Quantity? It should be under there!

Sorry guys, lets get back to topic here! Spine!

And for Pyro continue here: http://www.monkey-x.com/Community/posts.php?topic=9833#109417