Author Topic: Spriter - Flixel implementation  (Read 5555 times)

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Spriter - Flixel implementation
« on: Mon, Apr 9, 2012 »
Hello everyone!

I have written an implementation of the Spriter app for flixel.

From Kickstarter:

Quote
Spriter is a powerful animation tool for creating highly detailed 2d real-time game characters and effects in an intuitive, visual editor. The characters are saved to a format that allows game engines to produce higher quality visuals, while also using less video ram, and requiring less disk space per frame than traditional 2d sprite animation.

Spriter also provides several game specific features like collision boxes, and sound effect triggering, and saves to an open format that will be useable across many different game engines and platforms.

We have just begun open beta testing, anyone wanting to see or try the program for themselves will find links at the bottom of this page.

Here is the implementation, with the default character they provided me: http://www.brashmonkey.com/spriter/FlxSpriter.swf

The implementation supports everything in the current beta format documented by them. Multiple animations with multiple, duration-variable frames which can contain multiple transformated sprites.

The implementation is written in AS3 and I can quickly write a renderer for it for any AS3 platform. There is a FlashPunk version, this Flixel version and a plain AS3 version working with Bitmaps.

Here's the official announcement: http://www.kickstarter.com/projects/539087245/spriter/posts/204407

I am working in documenting the code right now, I will post it when it's done here! Remember this is just for the BETA of Spriter :)
« Last Edit: Mon, Apr 9, 2012 by Rolpege »

initials

  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: Spriter - Flixel implementation
« Reply #1 on: Mon, Apr 9, 2012 »
I found Spriter through your kickstarter video, and it is a great idea.

I played with the demo, but didn't put too much time into it. I couldn't figure out how to animate, and left it there.

Great work with the flixel implementation.
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart

Esti

  • Active Member
  • ***
  • Posts: 104
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #2 on: Tue, Apr 10, 2012 »
Great work indeed. This app is very promising and I was wondering if it was viable in flixel.

Check it out on Mochi!

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #3 on: Sat, Apr 14, 2012 »
Spriter AS3 source + documentation released!

Website: Spriter AS3
Downloads: Spriter AS3 Downloads

test84

  • Key Contributor
  • *****
  • Posts: 1328
  • Karma: +0/-0
  • ت
    • View Profile
    • My personal site.
Re: Spriter - Flixel implementation
« Reply #4 on: Sun, Apr 15, 2012 »
Nice, I'm downloading to check it out.
blog, twitter, Check out my award winning game, Rot Gut:

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #5 on: Mon, Apr 16, 2012 »
woa, this looks amazing!

but im wondering if its free to use : S?

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #6 on: Tue, Apr 17, 2012 »
Yeah, you can use it, and their application is currently free. I think they'll have a pro version of their application later, but you'll still be able to use the free one for free.

Also, credit is not needed but it's allowed! :D

PD: Hey mods, I'm not a bot. Why is there the need to wait like a whole day to see my posts approved?

initials

  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: Spriter - Flixel implementation
« Reply #7 on: Tue, Apr 17, 2012 »
PD: Hey mods, I'm not a bot. Why is there the need to wait like a whole day to see my posts approved?

It's five posts and then the need for approval goes away.

Great work with Spriter. I'm following the Kickstarter closely.
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #8 on: Sat, Apr 21, 2012 »
it looks amazing

just here to report a small typo

in Demo state there is this code, wich is faulty

Code: [Select]
add(spriter = new FlxSpriter(getXML(Sprites.BetaFormatHero), Sprites), 200, 300);
spriter.playAnimation("idle_healthy");
add(spriter = new FlxSpriter(getXML(Sprites.BetaFormatHero), Sprites), 400, 300);

and this code is fixed

Code: [Select]
add(spriter = new FlxSpriter(getXML(Sprites.BetaFormatHero), Sprites, 200, 300));
spriter.playAnimation("idle_healthy");
add(spriter = new FlxSpriter(getXML(Sprites.BetaFormatHero), Sprites, 400, 300));

: P
 

also, might be a dum question but where can i download the api for creating the api for creating the SCML files?
« Last Edit: Sat, Apr 21, 2012 by mol »

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #9 on: Sun, Apr 22, 2012 »
Hey!

Sorry about the typo :O... must have changed it last minute and didn't test it, dunno why.

For the API (I'm not sure what you mean tho), the DataX classes are the ones which parse the spriter SCML file and store it in objects =)

Thanks,
Abel.

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #10 on: Sun, Apr 22, 2012 »
also, might be a dum question but where can i download the api for creating the api for creating the SCML files?

well what the hell was i writing xD

i meant the api for creating SCML files

what are DataX classes?

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #11 on: Mon, Apr 23, 2012 »
Well, to create SCML files you use the Spriter application...

mol

  • Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #12 on: Mon, Apr 23, 2012 »
D'oh!

luc

  • Member
  • **
  • Posts: 97
  • Karma: +0/-0
  • no ablo anything except french
    • View Profile
    • scribbles
Re: Spriter - Flixel implementation
« Reply #13 on: Sun, Apr 29, 2012 »
Thanks for making this.

I can't make it work, (I corrected the typo ^^).
If I try to play an animation I get an error about instantiating happening outside a constructor.
I've followed the tutorial and took the State file from the Demo.
But I couldn't find a way to compile the Flixel Demo (Starling Demo is launching by default), so I don't know if my comp setup is the fault here.

Could someone share a simple FlxSpriter instantiation?

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #14 on: Sun, Apr 29, 2012 »
After correcting the typo (oops), the demo code works for me! (to compile, set the Main class inside demo.flixel as the document class, and change one of the last lines in the preloader file).

Could I see your code?

luc

  • Member
  • **
  • Posts: 97
  • Karma: +0/-0
  • no ablo anything except french
    • View Profile
    • scribbles
Re: Spriter - Flixel implementation
« Reply #15 on: Sun, Apr 29, 2012 »
The demo is working now.
Still can't figure out how to make my own state with a sprite :/
I must miss something obvious.
I tried with the example files and the Flixel folder from the demo, but same result.
I've sent you the file via MP.
Didn't use Flixel since a long time and I wasn't even near average at it.

Thanks for the quick answer !

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #16 on: Sun, Apr 29, 2012 »
Hey! The problem is you didn't run the embed file generator, thus the assets for your cute robot (nice gfx =)) aren't embedded.

You need to embed those running the generator. Take a look at the "Embed File Generator" section here:

http://abeltoy.com/projects/spriterAS3/usage.html

Thanks!
Abel.

luc

  • Member
  • **
  • Posts: 97
  • Karma: +0/-0
  • no ablo anything except french
    • View Profile
    • scribbles
Re: Spriter - Flixel implementation
« Reply #17 on: Sun, Apr 29, 2012 »
Ah yeah in the project I didn't run the generator on my sprites, only on the example files.
But I did it when I tried to import my graphics the first time, I followed the tutorial and it created the files properly.
And it didn't work either.
mmm ...
I will come back to it later if I need it for a project.
Since no one seems to have reported errors it must be my CPU/WindowsVersion/JavaVersion.
If it's working on your computer, then it's really not worth your time ^^
« Last Edit: Sun, Apr 29, 2012 by luc »

Rolpege

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Spriter - Flixel implementation
« Reply #18 on: Sun, Apr 29, 2012 »
Well what's the problem it's giving to you?

luc

  • Member
  • **
  • Posts: 97
  • Karma: +0/-0
  • no ablo anything except french
    • View Profile
    • scribbles
Re: Spriter - Flixel implementation
« Reply #19 on: Sun, Apr 29, 2012 »
After using the embed file generator if I instantiate my sprite :

Code: [Select]
var robot01:FlxSpriter;
add(robot01 = new FlxSpriter(getXML(Sprites.BetaFormatHero), Sprites,200,200));
robot01.playAnimation("run");

Sadly the error is written in French since I updated Flash Develop.
"Tentative d'instanciation sur un élément non constructeur"
which roughly translated means, "trying to instantiate on a non contructor element"

I've rebuild the project which wasn't working if you want to take a look .