Jump to content

XNA Implementation With Bones


Recommended Posts

Sure, here it is.

I just interpolate the time and use it on the linear interpolation of the rest to avoid multiple calculations.

Quadric and Quintic follow the same logic.

Quadric is the linear interpolation of 2 cubic and Quintic is the interpolation of two Quadrics.


public float GetInterpolation(CurveType curveType, List curveParam, float time)
{
switch(curveType)
{
case CurveType.Quadratic:
return MathHelper.Lerp(MathHelper.Lerp(0, curveParam[0], time), MathHelper.Lerp(curveParam[0], 1, time), time);

case CurveType.Cubic:
float commonInterpolation = MathHelper.Lerp(curveParam[0], curveParam[1], time);
float quadInterpolation = MathHelper.Lerp(MathHelper.Lerp(0, curveParam[0], time), commonInterpolation, time);
float quadInterpolation2 = MathHelper.Lerp(commonInterpolation, MathHelper.Lerp(curveParam[1], 1, time), time);
return MathHelper.Lerp(quadInterpolation, quadInterpolation2, time);

case CurveType.Linear:
return time;

default:
return 0;
}
}

Link to comment
Share on other sites

  • 3 weeks later...

Hey guys,

Over the weekend I got NowSayPillow's implementation working with MonoGame and sort of integrated into my game engine. I had to hack at it a fair bit to get it to work and there's still some stuff that isn't quite right yet.

So first, I'd like to ask NowSayPillow if it's okay if I make a significantly different fork on github? It won't be able to be merged back into yours.

And second, if anyone is interested, I can make clean up the hacky bits and put it on github as a brand new fork, otherwise I can just keep it to myself for my own game.

Cheers

Link to comment
Share on other sites

  • 1 month later...

Sorry guys (and girls), I was subscribed to this thread when I stopped getting the emails I stopped coming here to check. Not sure what happened.

Hey guys,

Over the weekend I got NowSayPillow's implementation working with MonoGame and sort of integrated into my game engine. I had to hack at it a fair bit to get it to work and there's still some stuff that isn't quite right yet.

So first, I'd like to ask NowSayPillow if it's okay if I make a significantly different fork on github? It won't be able to be merged back into yours.

And second, if anyone is interested, I can make clean up the hacky bits and put it on github as a brand new fork, otherwise I can just keep it to myself for my own game.

Cheers

Um, yeah. I guess that's cool as long as I can I take a peek at your code (just the Spriter stuff) so that I can implement the non-monogame stuff back into the master branch, yeah?

Hi folks, I have written a support for character mappings.

here are the code:

https://github.com/ivanmen/xnaBrashSpriter

Cheers

Is this one stable at all? We should look at merging them if it is. (Thanks for keeping the project alive. :D)

Sure, here it is.

I just interpolate the time and use it on the linear interpolation of the rest to avoid multiple calculations.

Quadric and Quintic follow the same logic.

Quadric is the linear interpolation of 2 cubic and Quintic is the interpolation of two Quadrics.

Do you have a fork of the project or something that you could upload your changes to? I'd love to be able to put them into the master branch so that there's a complete working version of this project for XNA somewhere on the internet.

Link to comment
Share on other sites

Um, yeah. I guess that's cool as long as I can I take a peek at your code (just the Spriter stuff) so that I can implement the non-monogame stuff back into the master branch, yeah?

I've actually moved on from this in favor of using Spine instead. I still have some half finished code laying around though so if I come back to it I'll let you know. Thanks anyway :)

Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...

Awesome fork Zkarts! I just want to get this working with Monogame, do you have any tips on how to go about this? Especially since Monogame doesn't have the content pipeline ported.

Also I'm having some problems with for example the Reaper enemy from the platformer pack. Any ideas?

JJ1l47b.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hello everyone,

 

First of all, thanks a huge lot (if we can say it like that) for all your work, this seems to be a good implementation, but I still have some questions about it. I am trying to see if Spriter can work with my MonoGame project and hopefully you can help me out. 

I got pretty confused with this discussion, and would like to have a bit of clarification : what is the best and newest version of the library ? Does it include all the features of Spriter release 4 ? Also, does the library let me change bones positions / images at runtime ?

If not, is there any other implementation that works perfectly and that has this amount of features ? I've seen that Spine has an official implementation that has all of this, but the price is what keeps me away from it...

 

Just trying to see if using Spriter is a plausible option with MonoGame, so I'd love to recieve some help. Spriter seems the best option out there (comparing to price), so if you guys can enhance even more the popularity of this software, it would just be awesome !

 

Thank you for any help.

Link to comment
Share on other sites

Hmmmm. I've never worked with monogame, but I'd imagine the current version of the project wouldn't be wholly difficult to port over. I'm currently loading up files from version 4 without a problem. The only thing that's been added that isn't implemented yet is the bezier curve motion type (as opposed to linear or immediate) other than that everything *seems* to be working as intended.

 

https://github.com/NowSayPillow/xnaBrashSpriter

 

As for modifying things at runtime, it should be possible, most of the structures and objects are accessible and if they aren't you can always make changes to where you need it.

 

Hope this helps

 

-- Geoff

Link to comment
Share on other sites

  • 4 weeks later...

Hey Geoff,

First of all: awesome work this library works really great.
Second: The issue I mentioned before is not happening anymore in your newest version.
My only problem is that it doesn't work in Monogame and is hard to port because you have the Content Pipeline Extension.
Monogame doesn't have a replacement for Microsoft.Xna.Framework.Content.Pipeline.
Everything else is dependent on each other so you need the Monogame references everywhere.

Edit: correction they do have the content.pipeline assembly: C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools

Edit2: You can just generate the xnb files and only use the BrashMonkeySpriter project in your game to get it working in Monogame. Just replace the Xna assemblies with the Monogame assembly in BrashMonkeySpriter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...