NowSayPillow Posted July 9, 2013 Report Share Posted July 9, 2013 Just wanted to post here that I finished (well, hopefully) my implementation of Spriter's SCML in XNA over the weekend. It works with bones, tweening and what-have-you. You can find a download link and a sample by following this link. Cheers -- NSP JohnnyType 1 Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted July 9, 2013 Report Share Posted July 9, 2013 Awesome job NowSayPillow! cheers, Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
Laquendi Posted July 16, 2013 Report Share Posted July 16, 2013 Hi! Just a quick bug report: You should replace SpriterWriter.cs line 35 with: return float.TryParse(p_element.Attribute(p_name).Value, NumberStyles.Any, CultureInfo.InvariantCulture, out p_out); The current version might not work depending on your system variables. Also, I don't think calling SpriteBatch begin/end in sprite drawing function is a good idea since it can be quite a performance sink. This is ofc not the objective truth and you can do as you please. Cheers. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 16, 2013 Author Report Share Posted July 16, 2013 Hi!Just a quick bug report: You should replace SpriterWriter.cs line 35 with: return float.TryParse(p_element.Attribute(p_name).Value, NumberStyles.Any, CultureInfo.InvariantCulture, out p_out); The current version might not work depending on your system variables. Also, I don't think calling SpriteBatch begin/end in sprite drawing function is a good idea since it can be quite a performance sink. This is ofc not the objective truth and you can do as you please. Cheers. Thanks! I'll take a look as soon as I get home. As for the Draw function, I wasn't entirely sure people would be using that one or trying to roll their own; so I figured I'd just give everyone the basic idea of how to draw and they could take it from there. Thanks -- NSP Quote Link to comment Share on other sites More sharing options...
Laquendi Posted July 18, 2013 Report Share Posted July 18, 2013 Hi, again. I have been playing around a bit more with this library. However I just realized that you don't have defined license anywhere. This is something I need to know before continuing to work on this, since I'm planning to use it with a commercial project. We were previously using XSpriter, but your work has some features that are missing from it and much better codebase. I also found more bugs and missing features and have patches for those. Bigger than one liners this time. I tried to create an account at assembla, but it doesn't let me fork and I don't want spend time figuring out why. Tell me if you have preferred way of receiving patches. I/You could put it up at CodePlex or GitHub if the license allows and you are fine with it. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 18, 2013 Author Report Share Posted July 18, 2013 Oi. Never really expected people to use it let alone upgrade it. Haha. I'll set up a repository on one of the two sites you suggested. I've no problem with people fixing my code (I never expected it to be perfect) or using it in their projects. I'll create a repo, pick a license that suits, and link it here as soon as I get the chance tonight. Thanks again -- NSP Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 18, 2013 Author Report Share Posted July 18, 2013 Got it! You can download\branch\fork it here. It's under the GPLv2 license. Hope it's not too restrictive. I tried to pick a license that was as open as possible. If anyone finds or squishes some bugs in their own forks of the project I'd love to see or hear about them so I can fix the master. -- NSP Quote Link to comment Share on other sites More sharing options...
Laquendi Posted July 18, 2013 Report Share Posted July 18, 2013 Got it! You can download\branch\fork it here.It's under the GPLv2 license. Hope it's not too restrictive. I tried to pick a license that was as open as possible. If anyone finds or squishes some bugs in their own forks of the project I'd love to see or hear about them so I can fix the master. -- NSP Thanks for your work. GPL is indeed too restrictive, since it doesn't allow linking to the library without forcing the whole software to be licensed under GPL. It would be much appreciated if you could switch that to for example LGPL or MS-PL. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 18, 2013 Author Report Share Posted July 18, 2013 Oops. LGPL was the license I meant to use. Sorry. It's been updated and commited. Good luck! -- NSP Quote Link to comment Share on other sites More sharing options...
LadyApoLLo Posted July 19, 2013 Report Share Posted July 19, 2013 Hello NowSayPillow. I downloaded your implementation and tried, but simply compiling the code results in nothing, a blank page. I tried to load my own .scml but it also gives a bad result: only the feet of my wolf appears, and the rest of the body appears only one frame on the loop, i guess is the first one. Am i doing something wrong? There are something i supposed to do? Quote Link to comment Share on other sites More sharing options...
Laquendi Posted July 20, 2013 Report Share Posted July 20, 2013 Hello NowSayPillow.I downloaded your implementation and tried, but simply compiling the code results in nothing, a blank page. I tried to load my own .scml but it also gives a bad result: only the feet of my wolf appears, and the rest of the body appears only one frame on the loop, i guess is the first one. Am i doing something wrong? There are something i supposed to do? Hi LadyApoLLo! I would suggest you try my fork on GitHub. It has some fixes so maybe you'll get a better result. I put a pull request for NowSayPillow so maybe those changes will be made into the main repo in the near future. If you could post your results (success or failure) here it would be much appreciated. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 22, 2013 Author Report Share Posted July 22, 2013 Yeah, sorry. I was AFK all weekend. I'll take a look at this stuff tonight. -- NSP Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted July 23, 2013 Author Report Share Posted July 23, 2013 Alright, I merged the fork into the master branch. Sorry it took so long, and thanks for all your help Laquendi. As for LadyApoLLo, have you tried Laquendi's fork yet? (Or the master now, I guess). Did that fix the problem? -- NSP Quote Link to comment Share on other sites More sharing options...
ryyyyydo Posted August 9, 2013 Report Share Posted August 9, 2013 dfsd Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted August 9, 2013 Author Report Share Posted August 9, 2013 It's made for anything that's made in Beta 3 and before. I haven't actually tried to render anything from B4 yet. By all right's it should still work unless they made massive changes. [edit] Quote Link to comment Share on other sites More sharing options...
Trixt0r Posted August 9, 2013 Report Share Posted August 9, 2013 While NowSayPillow is rewriting stuff, you can have a look at https://github.com/Trixt0r/SpriterXNATest. I just ported my Java version to managed .NET code with ikvm. To run it, you need the "spriter.dll" and the "IKVM.OpenJDK.Core.dll". -Trixt0r Quote Link to comment Share on other sites More sharing options...
Trixt0r Posted August 13, 2013 Report Share Posted August 13, 2013 Hey guys, Sorry for the double post. As an experiment I tried and managed to port all my Java code to C#: https://github.com/Trixt0r/SpriterXNATest Now there is no need for ikvm. In the repo is still an XNA test. The source code should also run with any other backend since the implementation only uses the "System" and "Generics" namespaces. This means you could create easily a Spriter plugin for e.g. Unity, Playstation Mobile SDK (tested my port here and got the same result as in XNA), or any other game engine which uses C#. ;) Maybe I will bring some updates in the repo as the Java library evolves. -Trixt0r Quote Link to comment Share on other sites More sharing options...
LadyApoLLo Posted October 14, 2013 Report Share Posted October 14, 2013 Hi NowSayPillow and Laquendi, First, I would like to thank you for your Spriter implementation. We have an indie studio that started last year and we are using it to develop our first game for PC. We are making a 2d shooter game in a "Metal Slug" style. Although, our characters move theirs arms towards the aim's direction and therefore we have some issues concerning the implementation. 1. Is it possible to rotate a single bone dynamically instead of the whole animation? 2. Is it possible to change the texture dynamically (through coding) instead of changing the whole animation to another animation that has another texture? (Example: I have a Character that got hit by a bullet and I want to change his head texture without changing anything else). 3. Do you plan to implement the next version of Spriter (beta 6)? If you don't, could you please implement the reference points at least? We really appreciate your help. You did an amazing job. Thank you very much. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted October 15, 2013 Author Report Share Posted October 15, 2013 I know what you're trying to do because we had to do the same thing for our game (we're even building the same kind of game oddly enough). What we did is have the arms separate and we drew them on afterwards, if you want to do what you're talking about you're gonna have to crawl through the data provided and look for a specific bone ID and object ID, find out where they are and update their location after they've been updated but before they've been drawn. This implementation isn't really built for what you want to do; what you're looking for is called inverse kinematics. You can read up on that if you want. (Good luck, it's way over my head. lol) You can change the texture to a "ouch" face again you're gonna have to find out which objectID it is and update the texture ID it's looking at before it's drawn. Just remember to set it back when you're done. Yeah, we'll be updating as often as possible (keep in mind though, any time spend on this is time taken away from my game) so if the updates are slow in coming, that's why. Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted October 16, 2013 Author Report Share Posted October 16, 2013 Yeah, I just saw the teaser for B6... Most of the stuff in there is well beyond my needs. It's probably going to be a long while before I get around to adding that stuff to the repository. Quote Link to comment Share on other sites More sharing options...
kimo Posted November 19, 2013 Report Share Posted November 19, 2013 Yeah all those skinned stuff is cool but also pretty overkill, will you be adding the easying curves support? That's something we are going to need for sure at some point so I need to know if someone else is adding those or if we need to add them at some point :) Sadly Laquendi didn't continue on our project, he had our knowledge off your work! Cheers, -Kimo BearmaInabe and Arrgincey 2 Quote Link to comment Share on other sites More sharing options...
NowSayPillow Posted November 20, 2013 Author Report Share Posted November 20, 2013 He's gone? Shoot, he was a tonne of help... :/ Easing curves is something my animator is interested in so I'll hopefully be looking into them in future, but only if the xml schema is massively changed between this version and the next. :) -- NSP Quote Link to comment Share on other sites More sharing options...
kimo Posted November 24, 2013 Report Share Posted November 24, 2013 Ok I started implementing the curves, lets see what comes out of this. :D Quote Link to comment Share on other sites More sharing options...
kimo Posted November 24, 2013 Report Share Posted November 24, 2013 I have the quadratics and cubics first test running and seems to be equivalent to what I see in spriter but I need to test stuff out more when its not 5 AM. Quote Link to comment Share on other sites More sharing options...
ivanmen Posted November 24, 2013 Report Share Posted November 24, 2013 Hi folks, I have written a support for character mappings. here are the code: https://github.com/ivanmen/xnaBrashSpriter Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.