mardi, juin 08, 2010

Animeds

As soon as I've got Apple Assault running and my level editor "repaired" so that we can toy with monsters despite the new "file-scope" state numbering, the next big thing I'd like to work on is the animation editor extension to SEDS.
So far, animation edition is pretty crude: you just push frames by clicking them on the sprite sheet, and you can't modify them afterwards. Plus, you can't save your work for later use in a game.


Le prochain "gros morceau" pour l'édition de jeux sur la DS, ce sera l'introduction d'un "véritable" éditeur d'animation. Enfin, dès que j'en ai fini avec Apple Assault et que LEDS est réparé, bien-sûr. Parce que si SEDS est déjà capable de donner un aperçu d'une animation, il faut bien avouer que devoir tout recommencer au moindre faux-pas est moyennement intéressant. Et qu'être incapable de sauver son travail le cantonne au rôle "d'outil de validation" pour les graphismes en cours.
Pourtant, le workflow de base restera le même: une fois qu'on s'est choisi la spritesheet avec laquelle on travaille, on ajoute des étapes à l'animation en cours en cliquant sur les sprites sur la droite de l'écran.

I've toyed with a lot of concepts around "animeds", which most likely explain why it's only 5% done so far. But this last one seems to work better. It keeps the basic of the current system (click a sprite to add it as a frame), but it builds a timeline representation where you can do additional manipulation. I used the animated apple bonus as an example:

  • click a frame on the timeline to select it
  • L-click somewhere on the time line to move it there
  • select another frame,
  • move it as well.
  • click the "time arrow" to adjust the whole animation duration (and scale delays of every frame accordingly).
And that's just for the basics. From then on, being able to store the animation list in the .spr file rather than being part of the .cmd file will be a major improvement in how I build new monsters.

Pour pouvoir gérer et retoucher tout ça, il faut que j'ajoute un widget "ligne du temps" sur lequel il serait possible de déplacer les étapes d'animation pour ajuster les délais. Accélerer et ralentir l'animation complète peut aussi s'avérer intéressant. "Historiquement", les animations sont stockées sous forme de commande texte parce que je n'ai pas voulu introduire de dépendance trop forte entre le moteur de jeu et l'éditeur. Sans doute une sage idée compte tenu des "condloop" et autre "move 2 *" qui sont venus se rajouter par la suite. Je ne vais donc certainement pas essayer de produire des GobAnims[] dans mes fichiers .spr, plutôt une version "lexèmisée" de l'animation avec une liste de constante et une liste d'instruction à traiter conjointement pour produire ces GobAnims.

I also need the opportunity to duplicate/kill a frame ([+ X] buttons depicted below as (3)); undo a deletion (the little x at (5) can be clicked to summon a frame back to life)

The most challenging aspect, I guess, will be to include engine-related features such as conditional loops (loop the animation only if testpoints are satisfied), the use of "spatial timeline" rather than "temporal timeline" (yeah, that's an odd concept, but I don't see how to phrase it differently :P)

And then, finally, I'll have to include that so-long-delayed composed -- à la Rayman --animation that was present in the BASIC version ^^"


J'ai quelques idées pour avoir une représentation graphique efficace des opérations telles que "copier une étape, supprimer ou récupérer une étape supprimée", etc. Ce qui sera plus complexe, ce sera justement de prendre en compte les boucles (conditionnelles ou non) et les déplacements (en ajout comme en remplacement des délais)... Je me demande dans quelle mesure il serait possible de garder cet aspect-là dans le .cmd, tiens.

3 commentaires:

Wez a dit…

Hi there,
My name is wez...Im from Australia...and...like you...I do a little DS homebrewing. I use the DS Gamemaker software mostly.

For many many years now, I have been creating 2D digital puppets on all sorts of platforms. Whilst there is comercial potential in this, I am always seeking new ways to share this artform.

I have recently thought about creating a DS application/art program designed to allow users to draw and then manipulate their own 2D pupepts on the DS.

One thing I am up against is how to save drawn sprites then reload them as "active" sprites.

After doing alot of searching, I found your blog. I was hoping that I could learn from you as you seem to have struck the very thing I am hoping to achieve...the ability to customize sprites then reload them!

Is there any help or guidence you could offer me in this crazzy world of homebrew?

I look forward to your reply,
WEz

sylvainulg a dit…

Hey, Wez.

My sprite editor is fairly simple in that aspect: it uses DLDI support from the DS linker to dump the content of the different video memory areas that define sprites into files on the flash cards. When you read them back from the file in video memory, you're ready to show your sprites again.

If you want to give it a try, I suggest you install the devkitpro on your computer and then give a look to my code, since it's open-source (GPL for tools, LGPL for libs). Most of the "magic" is contained in SpriteSet::Load() and SpriteSet::Save()

Let me know whether that was helpful.

sylvainulg a dit…

Hey again. It's not your wonderful puppet-control yet, but the latest version of AnimEDS can already do a lot of funny things. Record animations frame by frame and play them back ...