Sprite animations

  • 9 Replies
  • 3452 Views
*

Offline LightningEagle

  • 242
  • 0
  • Who's the wacko, you say?
    • View Profile
Sprite animations
« on: December 14, 2009, 22:10:12 »
So I've been wanting to see the animation of some of the Saira sprite sheets for Saira herself and some creatures. But not in the game where they behave according to certain parameters, just the animated sprite.

So I sat down and figured I'd try to make somthing which is able to run those animations for me.

As I have nearly no coding experience except for PHP and a bit Assembly, I decided to do it in javascript, which - I figure - is a silly conclusion, but that's what happened anyway.

And so I flicked together some code using different resources as reference. It's no beauty, but it works.

http://www.mediafire.com/file/tgjdm3t2thz/sprite animation javascript verVII.rar

I've included a short README.

I expect to create a form at some time where you can specify all the parameters, but for now: just edit the source the way the README tells you to do it.

I've included two sprite sheets from Saira, which I used when creating the script. If you mind, Nifflas, I will remove the instantly.
« Last Edit: December 16, 2009, 08:40:57 by LightningEagle »

*

Offline AClockworkLemon

  • 708
  • 2
  • -Inactive-
    • View Profile
Re: Sprite animations
« Reply #1 on: December 14, 2009, 23:15:58 »
Silly conclusion? Nah, stuff it! JavaScript (which happens to be the only script I have a faint grasp of) is a bit messy, but it does the job just fine!

If you wan I could write the javascript up a bit so the user can edit all the variables from the index.html file (I think), But it would take a little while
I'm not dead. Not entirely. And yes, I'm embarrassed by most of the posts I made here.
:hiddenstar: - From Pumpkinbot

*

Offline LightningEagle

  • 242
  • 0
  • Who's the wacko, you say?
    • View Profile
Re: Sprite animations
« Reply #2 on: December 14, 2009, 23:48:17 »
Silly conclusion? Nah, stuff it! JavaScript (which happens to be the only script I have a faint grasp of) is a bit messy, but it does the job just fine!

If you wan I could write the javascript up a bit so the user can edit all the variables from the index.html file (I think), But it would take a little while


Well, I'm pretty sure I can handle that. But you're welcome to do it if you want to.  :)

For now it just works, which is great to me because I can take my mind off it then, which I should as I have a major school project for Thursday closing in.

*

Offline AClockworkLemon

  • 708
  • 2
  • -Inactive-
    • View Profile
Re: Sprite animations
« Reply #3 on: December 15, 2009, 23:51:36 »
More than anything, I just wanted some JavaScript Practice!  X-P

Anyway, I've Finished!

The new features:
  • The information is inputted into prompts when you launch the file
  • An active frame count beneath the picture
  • The speed is now in Frames per Second, rather than delay between frames
And, my favourite
  • If the file name of one of the default SpriteSheets is inputted, All the information is automatically filled out. If you find yourself filling out the info for the same spriteshhet heaps, you can also add it to the autofill.


DOWNLOAD

Please Note, the README included is incorrect, The actual one is attached to this post
I'm not dead. Not entirely. And yes, I'm embarrassed by most of the posts I made here.
:hiddenstar: - From Pumpkinbot

*

Offline LightningEagle

  • 242
  • 0
  • Who's the wacko, you say?
    • View Profile
Re: Sprite animations
« Reply #4 on: December 16, 2009, 00:21:09 »
Great work.  :D

I added a loop option and included your new readme.txt

http://www.mediafire.com/file/mtxo1njekyn/sprite animation javascript verV.rar

*

Offline AClockworkLemon

  • 708
  • 2
  • -Inactive-
    • View Profile
Re: Sprite animations
« Reply #5 on: December 16, 2009, 00:44:58 »
loop function! WOOT! I love it already!
 Can i suggest you include the new version in the top post?
I'm not dead. Not entirely. And yes, I'm embarrassed by most of the posts I made here.
:hiddenstar: - From Pumpkinbot

*

Offline LightningEagle

  • 242
  • 0
  • Who's the wacko, you say?
    • View Profile
Re: Sprite animations
« Reply #6 on: December 16, 2009, 00:50:05 »
loop function! WOOT! I love it already!
 Can i suggest you include the new version in the top post?

Sure..

was confused for a second as I read topics reversed.  XD

*

Offline SiamJai

  • 706
  • 31
    • View Profile
    • A gaming blog like no other.
Re: Sprite animations
« Reply #7 on: December 16, 2009, 07:57:15 »
Awesome, guys! :D This is quite a time-saver, since previously I animated sprite sheets in Fireworks.

One thing that bothered me slightly is the clickable plain text. So I turned that into a button and wrapped the entire thing in a table. Nothing fancy: animation on top, controls below.

More details in the source: sprite animation javascript verVI.rar
« Last Edit: December 16, 2009, 08:02:41 by SiamJai »

*

Offline LightningEagle

  • 242
  • 0
  • Who's the wacko, you say?
    • View Profile
Re: Sprite animations
« Reply #8 on: December 16, 2009, 08:40:32 »
So, I became a little frustrated by the fact that i had to reload in order to change framerate.

Now it defaults to 25 fps and is editable in an input box.

remember to press enter when changing the value.

http://www.mediafire.com/file/tgjdm3t2thz/sprite animation javascript verVII.rar

*

Offline AClockworkLemon

  • 708
  • 2
  • -Inactive-
    • View Profile
Re: Sprite animations
« Reply #9 on: December 17, 2009, 00:38:06 »
Woah, this has grown quick!
Downloading......

EDIT:
Really nice. The framerate input box is really useful. Animate button also looks great!
« Last Edit: December 17, 2009, 00:43:00 by a clockwork lemon »
I'm not dead. Not entirely. And yes, I'm embarrassed by most of the posts I made here.
:hiddenstar: - From Pumpkinbot