Jump to content

<500 lines of code Spriter implementation


Zelex

Recommended Posts

I have a super simple spriter implementation I'm working on. Currently weighs in at just under 300 lines of code, but when I add in all the openGL stuff will probably bloat to about 500. I'm making it cross platform and what-not.

Is there any interest from people in getting a dead-simple implementation that is easy to integrate and easy to understand? I'm currently making it for my own projects, but wondering if others might find it useful.

Link to comment
Share on other sites

  • 3 weeks later...

weighing in at 338 lines of code, not including texture loading & the final quad rendering (but does include all the math to calculate quad verts) as I have those abstracted. It runs all the sample scmls I could find, including ones with bones quite well. Supports play once, looping, and mirrored animation playing.

I'll see if I can spend some time at some point making it stand-alone so I can release it without releasing my entire code base along with it. If you really need it ahead of that, send me an email or pm.

Link to comment
Share on other sites

Less than 500 lines of code sounds interesting.

Are you sure, that every class of your implementation is not pressed into one line.

Which language are you using?

C++ lite, and yes :) its not all on a few lines of code. Its just well organized and condensed into the minimum functionality necessary to accomplish the task of loading, animating & rendering. I like simple interfaces :)

Link to comment
Share on other sites

A few more pieces of functionality I want to add. I want to be able to flip animations on the X & Y axis. I also want easier access to bones for particle effects and such.

Update: nevermind w/ the flipping :) I already can flip by setting a negative scale.

Link to comment
Share on other sites

  • 2 months later...

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...