Showing posts with label school zone. Show all posts
Showing posts with label school zone. Show all posts

Monday, June 17, 2013

Spongebop Rodeo

I now have a (partly-)working prototype where Bilou can grab a Sponge bop and stay hooked while swinging, but I have to hard-code the offset between Bilou and the Sponge as arguments of the copycoords controller. Not so elegant. Plus, if I also allow to grab on Bladors (granted, that's a silly idea, but it helped for debugging :), those offsets are no longer correct and we're rather grabbing some point in the air over Blador's top-right corner >_<

Bien. Bilou peut maintenant s'accrocher aux éponges en balance. Il y a encore des soucis non résolus avec l'animation prévue à cet effet (d'où l'absence de démo jusqu'ici) et un désagrément mineur: il m'a fallu ajuster à la main et préciser dans les paramètres du comportement "accroché à X" la position relative de Bilou et de l'éponge. Au moment d'ajouter le comportement "assis dans un encrier", ça me démange un peu.

I initially had plans for making those "grabs" act on an are, and it would make sense to actually state "copycoords(a.bottom=b.top ; a.center=b.center)", but I've just said that accessing GobAreas within a controller isn't practical.
Expressions handling a collision have access to some extra-context variables (wc-wf) which were just involved in that "repel" behaviour that made inkjet "solid".


  • xcontext[0] - wc -- collision flags
  • xcontext[1] - wd -- unused (0)
  • xcontext[2] - we -- X-axis center-to-center distance
  • xcontext[3] - wf -- Y-axis center-to-center distance
  • xcontext[4] -- not in GobScript - X-axis area overlap
  • xcontext[5] -- not in GobScript - Y-axis area overlap
 The idea would be to use some GobScript to compute/force the desired location, possibly record it in some GOB variables and have the CopyCoords controller simply enforce that offset from the GOB variables.

Il y aurait bien des solutions techniques pour automatiser ces coordonnées relatives en "alignement vertical, centrage horizontal", à la façon des éditeurs de diagramme ... il y aurait même un "chemin de moindre résistance" pour construire ça dans le contexte actuel. Mais soyons honnête: ce n'est *pas* un élément nécessaire pour le programme. J'ai un seul objet auquel Bilou puisse s'accrocher de la sorte (l'éponge) et je dois de toutes façon utiliser une autre animation pour Bilou-dans-l'encrier (donc, autre état et autres paramètres). Ce serait donc de la généralisation intempestive et prématurée! Caramba! Ça le ferait pas!

I could thus extend the "interaction opcodes":
  • A[p]: attach [with path] evaluating object to context object (works in hit and found)

  • D: detach evaluating object (works in any transition)
  • R[xy]: repels context object away from the evaluating object (works in hit and found) [only along x/y axis]
  • L[xy]: line up the evaluating object with context object (mirrored repel)
  • C[xy]: center the evaluating object with context object (wish)
  • Now, let's be honest. That's a "wish", not a "todo". I only have one grabbable ennemy so far, and only Bilou grabs it. "hard-coded" offset are just fine in that context, and alternative are "premature generalization". I thought about all this because I'll also need a "copycoords" when Bilou sits in an inkjet, but that will be another animation and another state, so other copycoords offset is just fine.

    Wednesday, June 05, 2013

    Deep Ink Pit gameplay

     Nous voici à la frontière entre le "monster design" et la conception du gameplay. L'aspect et l'idée de base pour spongebop sont définis, mais il reste à préciser comment le joueur va interagir avec ce "monstre".

    I recovered and digitized some sketches that describe the intended gameplay for Deep Ink Pit. I make the distinction against "monster design" as we start here thinking in terms of user input, skills required and goal to achieve.
    The core idea is to bounce from one Spongebop to the next to climb up as high as possible. That leaves us 3 things to define: what happens by default when Bilou and a Spongebop collide, how can he climb up higher and is what are the contrary motions.


     Sans action de la part du joueur, Bilou rebondit sur les éponges, mais toujours des petits bonds. Pour s'élever plus haut (et donc progresser dans le jeu), il faudra ré-appuyer sur le bouton de saut au moment du contact. Chaque rebond augmente la portée du saut suivant, que l'on reste sur la même éponge ou que l'on enchaîne les éponges.

    If the player stays idle, Bilou will bounce again and again on the sponge's "head". To gain jump height, it is necessary to press the JUMP button timely when you hit the sponge. By chaining timed jumps, the height for the next jump keeps increasing.


    Au départ, j'avais prévu qu'un trop grand nombre de saut sur une même éponge casse son élastique, mais en fait, cela n'apporterait rien au gameplay puisqu'on a déjà l'encre qui monte dans le rôle de la "motivation pour avancer".

    Spongebop's thread may break. I originally thought it would break "after n bounces", but that doesn't really convince me. I'd rather have the thread breaking if Bilou comes with an "excessive" down speed".

    Je garde donc ces fils cassables mais uniquement si la vitesse de Bilou est trop grande lorsqu'il heurte l'éponge.

    That fundamentally means that there won't be anything like "walking on a spongebop", despite its appaerance in "platforms" posts. Still, for "the adventure", I know that players will need help, as staying aligned with a swinging sponge proved feasible, but demanding. Imho, the proper approach would be to allow Bilou to GRAB the sponge by pressing the 'PUNCH/THROW' button timely (on contact) and holding it. That means Bilou wouldn't be capable of grabbing sponges when carrying something, which imho is an interesting cancel for widening the skill range the game will test. And for Deep Ink Pit, we could easily imagine a "enable GRAB" power-up to be collected.

    Reste à intégrer le balancer des éponges, histoire de rester cohérent avec l'aventure. Il sera pratiquement nul au départ pour augmenter au fur et à mesure de la progression du joueur.
    Pas moyen de "marcher" sur les éponges donc, au final, mais ce serait sympa de s'y accrocher de manière plus ferme, et puisque c'est le bouton B qui permet d'attraper les taille-crayons pour les lancer, autant faire de B le bouton par lequel on s'agrippe pour suivre le mouvement. Du coup, celui qui (dans le jeu complet) voudra passer une éponge en gardant son taille-crayon en main devra le faire "à la dure" sans compter sur son bouton B. C'est un "cancel" dans le jargon de Kirby Kid :P

    Tuesday, May 21, 2013

    Animating with AnimEDS

    AnimEDS place les différents cellulos (étapes -- ou 'frame') édités sur une ligne du temps. Plutôt classique pour un programme d'animation, me direz-vous. On peut décaler l'une ou l'autre étape d'animation pour ajuster le timing, mais surtout on peut "casser" un délai en deux en dupliquant l'image en cours.

    The "split" button appeared in AnimEDS in early July 2012 -- that is, right when I started using the tool for real. It allows one frame to be split so that one can refine animation from keyframes, and it has been the key feature for almost every animations I created lately. I start setting up all the limbs for an "initial" frame, then copy into 3 to 5 key frames depending on the animation, and adjust position/sprite used by the different limbs to get something fairly close to what I'd have used with "traditional" animation. The result is more or less the 4 hightlighted frames on the picture.

    L'animation du crayon soldat est assez longue -- 16 images -- et n'aurait clairement pas eu ce nombre d'étapes avec le moteur d'Apple Assault. Pourtant, il n'y a que 4 étapes-clé (mise en évidence sur l'image) qui sont celles que j'aurais eu tendance à dessiner sans AnimEDS. Vous noterez aussi assez rapidement qu'un grand nombre d'images sont très proches l'une de l'autre.

    *Then* the magic "split" button gets into action. I insert between frame 1 and 2 a copy of frame 1, adjusting the delays so that the animation still renders the same, and I'm now free to add an intermediate step to increase the smoothness. This is where the "small crosses" depicting actual (white), previous (straight, greyed) and next (slanted, greyed) position of the current limb proves extremely useful, given that a "dynamic" animation usually implies that there's a lot of movement in a small amount of time, and then a lot amount of time where limbs are only moved by a couple of pixels.

    En fait, pour donner un air "martial" au crayon, je passe le moins de temps possible entre deux états quasi-fixes "pied au sol" et "pied en l'air" (comme l'image 01). Par contre, pour éviter que ça ne se traduise en une animation saccadée, il y a un léger "temps de freinage": 3 étapes donc, ou le pied bouge d'un seul pixel d'avant en arrière. J'avais utilisé le même style d'approche avec la course de Bilou, et je crois que ça va devenir peu à peu mon style préféré.

    Sunday, April 21, 2013

    translucent ?

    I managed to have some translucent effect through fast (60Hz) sprite flickering. That's mandatory if I want sprite-versus-sprite transparency. So if I want Bilou to look "inside" the inkjet, I need an extra patch of glass that will flicker over Bilou to partially obscure him.

    J'étais tombé par hasard sur l'épisode "Spécial Disney" du joueur du grenier, dernièrement.  Après une bonne tranche de rire avec ma fée sur la partie "La Belle et La Bête", l'analyse (nettement plus grossière) de Fantasia par Infogrames me rappelle à quel point il est important de soigner la communication des règles du gameplay à travers l'aspect visuel. Le livre géant et menaçant qui est en réalité un bonus (et non un ennemi comme son aspect le suggère) et l'espèce de rond dans l'eau qui est en réalité une plate-forme.

    Mais maintenant que j'ai le moyen technique de rendre les sprites transparents les uns par rapport aux autres, est-il intéressant de rendre l'encrier transparent ? C'est plus réaliste, sans aucun doute mais ça n'est pas forcément mieux pour autant. L'aspect d'Inkjet doit transmettre au joueur "solide, dangereux, mais pas blessant", et pas "fantôme immatériel mélangé à l'arrière plan". J'ai donc fort probablement commencé l'ajout des sprites rectangulaires (pourtant attendu depuis longtemps) sans que ça n'ait aucune utilité immédiate.

    That being done, shouldn't the inkjet itself be translucent (against the background), and if so, how do I achieve that, given that the ink itself must remain opaque ? Basically, the only way is to separate the "glass" of the inkjet and the ink itself. That puts enormous stress on the vram as inkjet animation takes almost 1/4th of the spriteset so far. doubling it ? aouch. Hopefully, the ink only takes 16 pixels high, so that would be worth an update of SEDS to support wide (and tall?) in addition to square sprites.

    Although its in progress, is it really wise to go that way ? Does the translucent inkjet on the right look better than the non-translucent (except for the patch) on the left ? Or does it rather look ghost-like rear object which you wouldn't expect to be solid and ride-able ? After all, form-fits-function is crucial in video games, and the only way to allow the player to have "eureka" feeling rather than progressing through frustrating trial-and-error.


    Bref, c'est l'occasion de rajouter le terme "Form Fits Function" au tagtionaire... ce lien entre l'aspect et l'effet si cher à Miyamoto et qu'Infogrames a systématiquement ignoré.

    PS: the DS also has 16-color sprites, and obviously, the inkjet shouldn't need more. Converting the whole sprite page into 16 colors could do the trick ... but that's not supported neither by the Game Engine nor by the Sprite Editor at the time of writing. At best, it's a wish.

    PPS: pour ceux qui voudraient essayer le jeu, c'est par ici.

    Tuesday, April 16, 2013

    where to go ?

      L'encrier est presque prêt et l'éponge aussi ... Ne serait-ce pas le moment de laisser les dumbladors de côté et de se concentrer sur un "gameplay" dans la School Zone (à savoir Deep Ink Pit). Parce que peaufinages et expériences mis à part, on peut considérer qu'il n'y a pas eu de "nouveau" jeu impliquant Bilou depuis 2 ans et demi!  Voyons un peu où nous en sommes.
      • [done] We have bumper-like erasers on top of pencils. that means we're ready for inkjets that throws Bilou up.
      • [sketched] adapt Bilou's behaviour so that he's "in" the inkjet when the stomping the inkjet from the top
      • [done] Spongebop moves, it could use extra animations, but it still doesn't act as a platform it will be GRABable, instead.
      • [done] Bilou can recover from being stunned
      • [todo] verso's turnback on walls, track Bilous when in sight.
      • [todo] SpongeBop makes you bop higher and higher.
      • [NEED] fix Bilou/sponge collisions when Bilou stops grabbing a spongebop (InspectorWidget upgrade to set breakpoint on hero-driven collisions could be needed).
      • [think] land-when-falling and bop-when-pressing the button on contact ? Is that any possible ?
      • [d.i.p] recover from being hurt mid-air. 
      • [wish, n&b] stand on stunned bladors. Don't bounce.
      • [r1158] is there something wrong with jumping to the right ?
      • Bonuses ? providing an offset within block-anims for simple bouncing animations ?
        • [think, done] How do we make Bilou appear through the glass when inside an inkjet ? 
        • [wish] Bilou should be slower when walking up slopes (it's already faster when walking down, as it's moving at sqrt(2)*v). Can we use a negative "postponed move" to avoid messing up with speeds in such a way that speed drifts towards 0 ?
        • [done] Find a way to investigate the "stuck-in-walls" bugs with Inspector Widget.
          • when jumping along a left wall, coordinate displayed in IW is suddenly reduced by 2 pixels, and when Bilou lands, he's slightly on the left.
          • at that point, trying to turn back to the right make it move one more pixel to the left, and he's definitely stuck.

        What is still missing for deep-ink-pit 0.1 release ? Apple Assault is now roughly 2.5 year old, and it would be nice if I could present something with a goal and ways to win/lose the game for the summer coding competitions, so maybe it's time to fork out of "SchoolTest.nds" and focus on the features involved in Deep Ink Pit instead... bladors (and pendats ?) would return in Nuts'n'Bolts...

        On the other hand, we're so close to a running demo of "School Zone level 1", which never was possible in the BASIC version, that it almost sounds like a crime not to push the effort up to that level.

        En même temps, on est tellement proche de la possibilité de jouer enfin au niveau 1 de la School Zone que ce serait presque criminel de ne pas pousser une peu plus loin dans cette voie-là.

        Tuesday, April 09, 2013

        Circularity

        Spongebop monster design was a way to convert the (imho) funny and interesting spider monsters of prehistorik 2 into Bilou's world. As such, they won't simply move up or down, or track Bilou while sliding (as suggested in the 20-year-old proposal), but also rock and roll, hanging by a thread. Another conversion of dangerous-but-useful NPC rather than an evil ennemy.

        Une éponge qui se balance au bout de sa corde ... une idée de monstre sympa et qui ouvrait pas mal de perspectives dans la "School Zone", mais techniquement plus délicate à réaliser qu'un "simple" monstre sauteur ou marcheur, en particulier avec les contraintes techniques de la DS. Depuis l'automne dernier je dois bien avoir gribouillé 3 ou 4 techniques succeptibles de rendre la chose possible sans jamais être allé jusqu'au stade de l'expérimentation. Mais maintenant que je peux attacher un objet à un autre au niveau du script, il est temps de monter un prototype.

        Now, it's time to turn this "nice idea" into some real code. Physically speaking, spongebop will act as a pendulum bob, oscillating as the result of gravity and counter-force originating from thread tension. We're taught that when 17 at school. There's just two major drawback to a "straight coursebook implementation":
        • it's full of angles, sin(x) and cos(x), which are pretty heavy for our 66MHz processor
        • It assumes a rigid, fixed-length rod between bob and pivot.


        Conservation de l'énergie, mouvement circulaire ... ce ne sont pas les approches qui manquent, mais chacune a aussi ses hypothèses de travail (notamment la présence d'un axe fixe que je ne désire pas). J'étais au départ prêt à utiliser une variante des algorithmes à la bresenham pour les cercles, mais la multiplication n'est en fait pas si coûteuse en terme de temps de calcul que je ne l'aurais cru. Je peux donc exploiter assez librement l'équation x²+y²<=r qui décrit tous les points à l'intérieur d'un disque. Dès que les la distance entre SpongeBop et son point d'attache ne valide plus cette contrainte, c'est qu'il tire trop sur la corde.
           Bilou would pretty much love that sort of predictable and massive pendulum platform, but spongebop's thread is instead fairly elastic and landing with excessive velocity triggers a rodeo session, says the comic concept art.
          In other term, I would like something more flexible, that can constraint Spongebop to stay within a certain circular area, but still allow Lissajous-like patterns when drawn away from its equilibrium path, as I explained this lunch-time to Cyril. So fundamentally, Spongebop's behaviour is defined by two controllers:
          • gravity, that takes care of the "free riding" when x²+y²<r²
          • radius detects situations where x²+y²>r². As soon as that occurs, we use a 'unit' vector that points towards the pivot position and iteratively move spongebop back into the allowed area.

          Ce qui est assez amusant, c'est que si je parviens à faire en sorte que SpongeBop ne puisse allonger exagérément sa corde, j'aurai le mouvement de balancier par simple application du même contrôleur gravity que celui qui sert pour les sauts de Bilou. Je rejoins alors le "scénario BD" qui prévoit un comportement plus cahotique lorsqu'on atterit trop violemment sur le dos d'une éponge. J'utilise donc le vecteur "attache-éponge" pour définir une "direction de rappel" et ajouter un déplacement vers le centre tant que Bop est hors de son cercle de repos.

          Ideally, energy preservation should keep the sponge oscillating as long as the level runs, but there's something that looks very much like friction in the digital world: precision loss. Since we're working with fixed-point arithmetic here, we're losing some speed in rounding coordinates and angles, so that after about 3 cycles, there isn't much movement left. It's compensated by a refreshing impulsion generated everytime Spongebop arrives just below the pivot point, as if it had some muscles that helps it control its movement. That part is handled by some gobscript and the controller merely report "you're at (0,ymax)" through an event.

          it's a sponge bob ^_^

          MUL instruction on ARM9 merely takes 2 cycles. As a result, I ended up dropping my initial idea of using (x+1)²=x²+2x+1 and simply re-compute (x+a)*(x+a) whenever needed.
          I have at most one division per frame (per instance), to define the centripedic 'unit' (1/16th of pixel) vector. Yet, division isn't handled by the CPU, but by some extra software (the support library coming along with devkitpro's flavour of GCC). I think I'll live with it unless it turns out that I'm over my cycles-per-frame budget.


          Le résultat est plutôt satisfaisant. Ce n'est pas un arc de cercle parfait et je dois "relancer" le mouvement régulièrement, les erreurs d'arrondi en virgule fixe ayant tendance à l'amortir trop rapidement. Je m'en sors donc avec une division (software) par éponge et par frame au prix d'une progression itérative pour recentrer Bop lors de ses déviations. C'est plus erratique que le pendule du cours de physique, mais ça colle plutôt bien au personnage. Reste à maîtriser la 3D pour tracer l'élastique et le co-processeur mathématique de la DS pour avoir accès aux divisions et aux racines carrées la prochaine fois.

          Agreed, the trajectory followed by SpongeBop on the animation above is not quite a circular arc, but for some dizzy sponge on an elastic string, I think it does the trick. Now it's time I allow Bilou to "land" on SpongeBop, because solely bopping over is pretty tricky.


          Hmm ... tracing a GL_LINE between the spongebop and its pivot (not yet visible) would be a nice use case to introduce 3D support in the mix ...

          PS: all this was the last idea of a long list of dropped approaches. Maybe I'll discuss alternatives later on.
          PPs: of course, although the ARM processor on the DS has no support for division/square roots, the DS itself has extra hardware for such functions.  Since it says "square root takes 13 cycles", it could be worth to use the sqrt(dx²+dy²)/sqrt(R) ratio to properly compute the pullback force rather than relying on iterations here. (that's still an occurence of premature optimisation, imho)

          Tuesday, April 02, 2013

          AnimEDS updates

          Holly Bells! I don't think I've been waiting so hard for holidays since I graduated 0_0.
          And to celebrate that, here's the new "running" animation built in AnimEDS. I also animated Spongebop and added a few animations to inkjet, but there seems to be issues with AnimEDS itself, and which slot it decides to save your current work to, so those got overwritten ...


          Aah! Des vacances! enfin! Voilà une petite animation de Bilou occupé à courir réalisée dans AnimEDS. Profitez-en bien parce que je risque justement d'être occupé un bon moment à corriger le code d'AnimEDS qui me fait un peu trop de farces à mon goût. Du style "tiens, et si j'écrasais la dernière animation vue avec la dernière animation éditée avant d'enregistrer le fichier sur la carte mémoire }:-D"

          Let's recap the required upgrades so far:

          • [1145] use some overlay to show which limb is currently pulled, and make sure pulls are properly reset when loading an animation.
          • [1141] fix thumbs in the thumblist. set them to the content of the first frame everytime an animation is saved if needed.
          • [1142] fix the multi-sprites thumb generation, and automatically set the scaling factor for the 16-32 pixel sizes used in Bilou when that would be enough (i.e. frame fits a 32x32 bounding box)
          • [done] ensure setting "delay=1" in the animation editor means 60 frames/second. Otherwise, "split" time doesn't work properly.
          • [done] ensure we can hide *all* the crosschairs so that frame editor isn't hiding things and can preview the animation nicely.
          • [tryit] don't pause on the "animation terminated" pseudo-frame, and directly hop to first frame, for smoother looped animation edition.
          • [dream] crosschair that gets its due alpha-blending. -- there's no support for Sprite/Sprite transparency.
          • [1143] allow edition of color 0 and use that to tune the background colours. 
          • [1146] ensure we don't overwrite data when we've just loaded a new .spr file
          • [1141] don't overwrite data when saving animations.

          Friday, March 08, 2013

          On se lance ?

          Quelques commentaires constructifs sur WoTP (et grâce au croquis animé d'Ymedron que je reprends pour être complet, nd2024), une petite scéance dans AnimEDS et quelques lignes de GobScript en plus ... Voilà des encriers qui ont des yeux, qui font "demi-tour" de manière souple, et -- comble du raffinement -- qui poussent aussi les tailles-crayons (et plus uniquement Bilou).

          the sketch drawn by YmedronNow it gots eyes! and thanks to Ymedron, it also gots a more powerful shooting time! Moreover, both Bilou and dumbladors may now get pushed by the hovering inkjet. I also managed to make the blador's top "solid" so that Bilou can move through a stunned blador horizontally, but not fall through it. I think everything should now be ready for moving platforms.

          After countless iteration on the animations, on the script files and a few bugfixes on the game engine and a good deal of WiFi DS-to-PC transfers, I finally have inkjets that throw decent ink droplets. Here's the byzanz-record. I think that will be it for this week-end: I've got some frying pans waiting in the queue.

          Saturday, February 23, 2013

          Premier encrier.

          Enfin! le premier encrier qui se promène dans le jeu de Bilou. Je n'étais jamais arrivé jusque là dans la version "BASIC". Voyez vous-même (.nds homebrew).
          Maintenant, on va *vraiment* pouvoir commencer. L'encrier doit pousser Bilou, le repousser en cas de collision en l'air, mais aussi emporter Bilou.
          Inkjet floats around, special blocks (not yet invisible, for debugging reasons) guide the path followed... I'm ready to start with the "new collision" mechanisms. And I'm curious to know how many times you manage to jump over the 48-pixel pencil in a row.

          (Et si vous allez vous promener à la gauche de la map, vous pouvez essayer de sauter par-dessus le crayon de 48 pixels pour remplir le Quizz de la semaine.)

          edit: bon, bin c'était pas franchement le poll qui ait attiré le plus de participation, mais avec la puissance du saut de Bilou revu légèrement à la hausse, les obstacles de 48 pixels de haut devraient maintenant offrir juste le bon dosage de difficulté.

          Friday, December 28, 2012

          XMAS School Demo.


          Here's the new demo. I hope I'll be able to add some screenshots and stuff, but my Internet access is currently down. I've managed to fix the memory corruption problems that prevented to reload the level when Bilou "dies", so here you go.

          Voilà enfin la démo promise. Bilou se promène dans les nouveaux graphismes de l'école, il saute (A), assomme les dumbladors, puis les ramasse, les transporte et les lance plus loin (bas). Une erreur de gestion de mémoire m'a obligé à rallonger la phase de debugging. Pour ne rien arranger, je me suis retrouvé sans connexion Internet pendant presque toute ma semaine de congés, du coup, c'est une release "en aveugle", goupillée à partir d'un .nds sur clé USB lors d'un passage-éclair pour reprendre du jus de fruits au bureau ^^".

          Since it's a "blind release", I had no access to my todo list, so I couldn't remember I still had a bug with Dumblador recovering just on the left of walls. If you do that, it will remain stuck. (Fixed in SchoolTest-GoT.zip)

          Press A to jump and stun bladors, then press "DOWN" to grab them and "DOWN" again to throw them in the direction you're facing.

          START enters the pause/debug mode, which you leave by pressing L+START.


          Thursday, December 06, 2012

          Games of Thrown


          1MB. throwing in action ...
          mises à jour du moteur de jeu terminées: on peut ramasser et lancer des Dumbladors ... puis les re-ramasser et les lancer de nouveau. Enfin, toujours dans la même direction, je le crains, mais lancer quand-même.
          Je vais pouvoir passer à l'implémentation des inkjets, du coup ^_^b

          PS: attendez-vous à un ralentissement brutal et imprévu du rythme des messages de ce blog dans le courant du mois: *deline attend son petit frère j.l.n mi-janvier.

          The game engine now supports throwing of bladors. Pick it up, throw it, repeat. Many things could still be refined including
          • [done] having feet really hidden during the stunned animation.
          • [drawn] having the bouncing feet looking like feet
          • [done]allow the engine to shoot compound gobs too (new feet anim)
          • [done] allow runMe to launch the level as well.
          • [done] avoid one-way platform to corrupt behaviour of bouncing feet
          • [done] throw in both direction, and just drop if you feel so.
          • [wish] blador can stun baddies (and Bilou ?) while falling
          • [done] fix the map
          • [done] use dynamic palette assignment and get rid of those "crosses" marking Bilou feets in jump animations
          • [done] areas that can trigger only one other GOB (or a single foot can be consumed by 2 dumbladors simultaneously)
          • [wish] climb on stunned bladors, but still walk through them. 
          • [done] multi-color that works in runMe too.
          • [done] make sure we restart the level if killed, with colours.
          • [done] allow bladors to recover next to walls.
          • [done] Blador recovers when 2 feet have touched it.
          I'll do my best to get all that sorted out quickly so that I could offer the world a new playable demo for Christmas. Earlier arrival of lil'sson could force me to tolerate some imperfections in that release, though.

          Monday, November 05, 2012

          throwing bladors

          I can be glad I'm done with the "bottom things" of my summer todo list. Now the winter is starting, and what is left is what is more linked to the game logic and the revised collision engine which is waiting to prove its superior capabilities with some dumblador stunning and throwing.
          De temps en temps, ça fait du bien de retourner à une "liste de choses à faire" pour s'assurer que le projet avance effectivment. Bon, des "todo lists", vous devez tout doucement commencer à en avoir une indigestion, mais je parle ici de quelque-chose qui s'approche plus d'un "planning" que des micros-tâches à effectuer sur un temps de midi. Mon dernier planning datait de mi-juin ... voyons où on en est... tous les éléments "du bas" ont été satisfaits, à grand renfort de mises à jour de SEDS et AnimEDS. Je vais donc pouvoir cet hiver attaquer sérieusement les nouveaux types d'interactions entre personnages: assomer, attraper, balancer.

          On dirait que les mois à venir vont être durs, chez les Dumbladors.

          At those "milestones", I can close many former todo lists, by collecting in a new one the items that remains pending but that weren't really linked to the then-going activities. And yes, this is truly a milestone, since I now have fully operational CompoundGobs, including the definition of palettes for individual limbs (altering the palette while playing the animation will be for a next milestone :P)

          • [done] looping move should only be generated for looping animations
          • [done] initial Mx,y statement should be ignored by the game engine (actually, everything that delays the rendering of the first frame of the animation should be skipped). That will partly solve the "landing bug".
          • [todo] most of blador's debugging could have been avoided if we had the state-initialisation expression feature implemented.
          • [done] not detaching an attached GOB when "throwing" it may have weird effects, but I would have liked the display list to be re-ordered so that such side-effects wouldn't have systematically occured.

          Sunday, October 21, 2012

          pick a slot


          I'd say "good. things are progressing" if that progress hadn't been done while I can't get due sleep, coughing and sneezing. Anyway, I'm done with some basic steps to confirm that a multi-slot palette can be loaded in AnimEDS. Much remains, that will need more lunch-thinking.

          • [done] ensure multi-slot palettes are read correctly.
          • [done] buttons to pick slot on skeletton-setup page.
          • [done] selected slots reflect in anim edition window.
          • [done] move swap bits of AnimCommands to their hardware place, to make room for palette bits.
          • [done] limbs table can reflect palette slots
          • [done] palette slot preference stored in animations
          • [todo] frame editor that obey colour preferences
          • [done] preview using real colours
          • [wish] timeline using real colours
          • [done] size up to 8 palette slots for pendats to come in.
          • [done] dumblador using multicols and bilou's feet.
          • [done] Bilou using multicols for darker foot & hand. 
          • [bugfix] saving something multipal with AnimEDS kills all the palettes
          • [bug] sticky palettes selection when changing sprites?
          • [SEDS, done] ensure palette reorganization works in multipalette .spr files.

          Saturday, September 29, 2012

          Yellowl and Redowl

          I tried again, with the updated SEDS and properly charged battery. I could save a first draft (just the shadow lines), and then when I tried to save my "finished" work, the editor crashed again. That's *really* getting on my nerves, now.
          Hopefully enough, I had a real camera powered up and ready-to-shoot just one floor below, this time, so I've shot pictures of my screen and did some Gimp post-processing to try to enhance and restore the picture into something that could be shown or fixed afterwards. I started the owl again, from the 'shadow lines' that were saved, using the version of SEDS I submitted to NEOflash compo. Everything went fine, and I made tons of intermediate saves. Then I thought "oh, well, that should be it for now", and clapped the lid of the DSi. As usual, I then thought of a small last improvement I could do, so I opened the lid, applied the change and tried to save again ... stalled. So this is what goes wrong: I cannot read/write to the SD media card anymore after I put the device in "sleep mode" for a while. And that happens regardless of whether I use the "1.x" or "2.0" version of my GUI engine.

          Tuesday, September 04, 2012

          Smooth Slopes at last!

          After so many tests where I had to jump slightly when approaching the bottom of a slope, having flawless, smooth moves in the school zone almost feel magic!

          Funny enough, the doslopes() function that I crafted carefully was already flawless, but the defects were in the glu code (the walker controller) that interfaces that with the animation replay. As I expected from the start, the step-by-step movements system was the root of the problem. It essentially nailed down to 2 things, that occured when leaving a slope:

          1. in that case, I need to check whether the character could fall. Bug #1 was that I wasn't completely taking care of the horizontal adjustment in that case, and it resulted in "no, you won't fall at coordinates (99,60). you can safely move and stand at (100,60)"
          2. when falling down, the controller actually FAILs to keep walking, but that means (for the animation replay subsystem) that the defined speeds are cancelled. The problem is in the case of walking off a cliff, the horizontal move has been validated and it should *not* be cancelled. Only the absence of vertical move changes.


          I updated the demo link accordingly in the "back to school" post ^_^

          Saturday, September 01, 2012

          Back to School!

          Here's at last the demonstration of game engine improvement and new graphics for the School Zone, on a temporary soundtrack by Cyborg Jeff.
          There's no "gameplay" or "mission" yet: you can navigate through a single map, bop sponges and dumbladors and track bugs (there sure are some). The ink doesn't hurt yet, but the baddies do. How many roll-jump can you chain ?

          New features:

          • better animations with AnimEDS
          • transition animation (in jumps, mostly)
          • improved parallax scrolling
          Known bugs:
          • Bilou may pause at the end of a downward slope. Just release the DPAD and move forward again.
          • Bilou may get stuck in corners. I need to figure how and why.
          • Dumbladors can be trapped mid air.
          • If the bottom screen turns pink, you've entered debug mode -- known as InspectorWidget. Press 'L' trigger for frame-by-frame game or hold 'L' and press 'START' again to resume "normal" gaming.
          • if all you can see is "efs:/strtrk.xm not found" on black background, you're using an incompatible linker or emulator. If you're using desmume, you need to add "--gbaslot-rom=self" on the command line.
          Download SchoolTest.nds and have fun.

          Oh, this is the 700th post, by the way ^_^
          vu sur dev-fr.org, et - chose amusante - c'est aussi mon 700eme post sur dev-fr (et ça, je jure que c'est pas fait exprès :P)

          edit: just understood and fixed the slope issues.

          . . .

          This is the moment where everything packs up, where final touches are made so that animations, graphics and code must fit together well into a "SchoolTest.nds" ...
          That's the moment where I have to make choice and dismiss some potential improvement so that a release can occur.

          Nothing you create is perfect ... improvement could always happen ... Maybe it's a good day to die release

          Thursday, August 30, 2012

          Prêt pour la rentrée ?

          Il m'aura fallu du temps, mais j'ai enfin un décor intéressant pour la school zone ! Basé sur un dessin au trait puis converti à la dure (comprenez, avec Gimp, une souris standard et un calque "hue") et lui-même inspiré d'éléments de décor de Pinoccio et Blanche-Neige du Grand Walt.

          Between engine re-factoring and Bilou animation upgrades, I've tried to find things to fill the background of the library level while keeping a "intimate" tone. I think I've got at last some ideas, thanks my little daughter watching Snow White and Pinoccio movies :)
          I'm not very convinced by the sketch-to-pixel-"art" conversion process yet, but at least I've got something to fill the emptiness of the former mock-ups.

          Now, I still have things to fix: the background layer is (for some odd reason) loaded as an InfiniMap as well, which means the game engine tries and update the map as if it had to stream in new tiles. That could explain some odd behaviours I noted with Apple Assault. I still hope I'll have a running demo for September 3rd so that kids all around the world can recover from their first day at school with a Bilou minute...


          Il me reste à en faire le rendu de manière convenable, et ça, c'est pas encore gagné. Le décor (512x256 pixels) est pour l'instant chargé comme s'il s'agissait d'une couche "map" classique, et le moteur de jeu tente du coup de la faire scroller "normalement" aussi... sauf qu'elle scrolle 2x moins vite, parallaxe oblige. Du coup, les savants calculs destinés à garantir que le morceau affiché à l'écran soit toujours bon donne lieu à des "téléportages de hibou" plutôt étonnant.

          Maintenant, il serait temps que ma DS rentre elle aussi de vacances, que je puisse finaliser tout ça.

          ... flawless victory ^_^

          Friday, August 24, 2012

          Roses are Red, Violets are Blue ...

          And my books should be allowed to have whatever color I think fit. Or at least let me put it in a different way: that would be a waste of tiles if I could only have *red* books in the school zone, right ? (and only green binders). It's much more interesting if I can select an alternate palette when I want a blue-tinted book or a darker wood block.

          The DS hardware allows all this (I mean, even the NES had it :P), extending the '256 colors' mode of the GBA to some fancy '16x256' colors. Granted, I *could* very likely work in 16x16 colors mode for the school zone, but I'm not yet a sufficiently good pixel artist to handle that.

          I've took a first step yesterday by allowing some 4 palette slot selection in SEDS' palette editor. Before I give you a rainbow bookself, I still have to:

          • [done] store all this in the SPR file (SpriteSet classes)
          • [done] make sure SEDS has a palette large enough advertised to SpriteSet.
          • [done] adjust the game engine so that it works in extended palette mode
          • [done] provide palette set toggling in LEDS (only for the BG layer: the FG uses it to encode tile properties). That would be better to have it on the bottom screen, and not part of the "tileset" screen as depicted on the mock-up
          • [done] provide palette setting in AnimEDS as well (so that dumblador and Bilou (and pendats) can share feet tiles. Being able to define it when the sprite' skeletton is created should be a good first step
          Oh, and don't worry: there will be an polish on the transanims and a schooldemo.nds by the end of august. I just need to recover a DS lite for that, so I'm messing up with other parts of the summer-todo-list.

          Saturday, July 14, 2012

          sprsplit.pl ; dumpanim.pl

          SEDS, LEDS and AnimEDS use a dedicated file format: .spr, which is not very complicated, but specific to this project. The rationale is that, given the limited resources on the DS, I don't want to mess up with parsing or encoding of complex representation. I've got chunk of data, which have a given size and a given "type". This is how IFF files used to work back in the Amiga times, and I don't believe there is need for more over here.

          However, with the toolset growing in features, hacking .spr files with an hex editor becomes tedious. A few weeks ago, I came up with two small tools -- sprsplit and sprmerge -- that can explode a .spr into one-file-per-chunk so that one could more easily e.g. replace a buggy animation with a sane one (from a previous file) without losing updates on the graphics themselves. Granted, a separate .anm file with the animations alone would have saved me the trouble :P


          Bien: Bilou marche à gauche et à droite, escalade la règle, l'encre est animée et la "zone de collision principale" a fini de changer au moindre mouvement. Mis à part le côté 'bricolage' de la map et un nombre effrayant de messages de débug au démarrage, le niveau-test pour la school zone commence à devenir un brin plus propre. Dernier couac avant de m'intéresser de plus près aux "transanims": un à-coup dans la démarche de Bilou (alors que l'éditeur d'animation m'en fait un rendu parfaitement fluide ...)

          Je sors donc un des petits outils développés dernièrement -- sprsplit -- pour "éclater" le fichier .spr correspondant en 'blocs logiques' histoire de repérer plus aisément l'animation qui cloche. Ensuite, un nouveau petit outil -- dumpanim -- va (enfin ;) me permettre de "décompiler" les commandes pour avoir la confirmation qu'une des commandes "délai 2 frames" n'a pas été convertie en "instruction pour l'éditeur d'animation" mais qu'elle reste bien présente dans les instructions adressées au moteur de jeu.

          I've been one step further today, with a small "dumpanim" tool that present in a readable(?) format the content of an animation. It's crude, for sure, but less than mentally converting 0x2104fffe into UPDATE|COORDS|4|-2|-1 or 0x01000002 into CONTROL|DELAY|0x0002, etc. Here's how to make sense of its output:

          • :**=xxxx : this is a "definition", such as page numbers, box size, etc. They're only read once
          • .s?=yyyy : indicates that sprite #? should be changed
          • .c?=xx,yy : indicates that sprite #? should be moved to (relative) coordinates xx,yy
          • .m=xx,yy : indicates that the whole object should move by xx,yy
          • !dxxxx : indicates that we should pause for xxxx frames before going on with playback
          • !loop, !pop, !done : end-of-animation notifications
          • // : an annotation for the editor (typically, how to place frames on the timeline when only the movement of the GOB guides the playback speed).


          Now that AnimEDS' export code is fixed, I have great walk animations. Huzzah!

          Mais bon, assez ri: la maison a besoin d'un coup de pouce pour se ranger ... entre les chaussettes et dumblador qui se bloque dans tous les coins, je vais devoir ajuster mes priorités :P

          Wednesday, July 04, 2012

          A new Bilou is coming soon ...

          here you go: new animations for Bilou under test. I still have lot of work to do before it gets really convincing, but it's clearly an animation improvement compared to the former, frame-by-frame animation, don't you think ?
          • [done]that makes too much frame to toy with manual mirroring of the animations
          • [done] all the animations are looping, which makes jumping look funny and the recovery infinitely long.
          • [done] I have animations that guide movements, but not yet movements that regulate the speed of animations.
          • [done]in "zoomed in mode", limb selection on the frame editor widget go completely crazy.
          • [found] Bilou shouldn't get stuck on the ground like that
          • [found] Why is nobody climbing up that ruler ?
          • Dumblador should not got stuck on structure' edges
          • [transanim] any statJ6->statJ6 transition reset the jump-take-off animation mid-air. I should have a way to tune that.
          • [done] make sure my foot stops hurting
          Eh bien, voici donc ces nouvelles animations à l'oeuvre -- c'est fou tout ce qu'on peut animer en une petite journée d'immobilisation quand la batterie de la DS est bien chargée ^^. C'est encore loin d'être parfait -- sinon, j'aurais fait une "release SchoolTest", mais ça prend forme... et ça me rallonge ma liste de choses à corriger ^^"

          Ah, oui. J'en ai profité pour corriger cette histoire d'encre animée. Chouettos, mais vu que Bilou ne grimpe plus le long de la latte, on ne sait plus aller voir ce que ça donne ^^'

          Friday, June 15, 2012

          Devoir de Vacances...

          Bon, on est encore loin d'avoir une "school zone demo" convaincante, mais au moins, la première vague d'upgrade des outils touche à sa fin. J'aimerais avoir pour la fin de l'été une démo avec Bilou converti en animation composite (plus ou moins indispensable, vu que j'ai déjà effacé son corps pour les étapes de marche, ce qui explique le "clignotement" dans la dernière démo) et de l'encre animée qui tue (lentement si on veut).

          Let me pick a chalkboard and try to map all the improvements I still have to bring to the Bilou-in-school-zone demo, so that I can identify priorities and schedule coding sessions for this summer (if we ever happen to have a summer here this year :P)

          And the winner is ...

          ink animation and repair Bilou walk animation


          Rien que ça, ça nécessite déjà deux interventions immédiates sur SEDS et AnimEDS. Ensuite, j'aimerais pouvoir me rapprocher du look "pile de livres" proposé par Facet, mais ça, c'est plus ambitieux, et donc à garder pour une 2eme passe.

          • GridWindow::save_back_tiles(), which is involved in the cursor-driven edition, already does some 32x32<->16x16 conversion. All I need to do is to move it where it really belongs -- EditorSpriteSheet : public SpriteSheet -- so that I can reuse it in FileWindow::event().
          • 32x32->16x16 is now available and the ink tiles are converted.
          • modifying one line in GameScript.cpp should allow to animate the ink, but there's more code cleanup waiting there, for more efficient memory management, for instance.

          Wednesday, June 13, 2012

          ghost busting with spr2png.pl

          No matter how much I improved SEDS, I still can't "optimize" my spriteset below 1024 tiles without messing up something. So I had to admit a disturbing possibility: maybe my tileset is *really* corrupted, and has been so unnoticed for some times ... maybe I'm suffering the equivalent of infamous cross clusters.

          Let's recap: in .spr files, you find BLCK section that provides you the tile number for each block (logical entity) on that page. Then, you'll find one FREE section per "ram type" (block, sprite, streamed animations and drafts) telling you which tiles could be reused because you deleted its content. Good so far... except when they disagree.


          Corriger ce spriteset de la school zone s'avère décidément plus complexe que prévu. Après une nouvelle série de corrections apportées à SEDS, toujours pas moyen d'avoir les bonnes images. En tentant de "rétrécir" les images, je me retrouve avec plusieurs sprites qui partagent les même données. Un vrai méli-mélo (in)digne du système de fichier FAT sur lequel tout celà est sauvé.

          Permettez que je vous passe les détails techniques: il y a deux marquages des tiles occupés dans un fichier .spr (disons "vertical" et "horizontal"), et là, ils ne sont plus d'accord. Une stupide erreur au moment de sauver les sections 'FREE' des différents types de graphismes.

          I already had modified spr2png.pl tool with a --cleanup mode that renders horizontal stripes accross tiles that weren't listed in any BLCK section earlier in the week, and now I've just added vertical stripes on tiles that are listed in the FREE section. We should thus see only solid sprites or 'dotted' tiles. But that's not exactly what happens: instead, I've got quite a lot of sprites with vertical stripes, that are thus supposed to be kept, but that could be erased as soon as I'll start editing new stuff.

          My first mission, should I choose to accept it, will be to fix the .spr file so that all tiles stay safe. Then will come the hard stuff. Where in the code is the ghost maker... Have I forgot to adjust free lists when copying things around between spritesets?

          Hopefully, not. It seems to be simpler than this: I have 3 FREE sections for the 'sprite' tileset. My bet is that I failed to set the proper spriteram identifier and have all "sprite, draft and streamanims free tiles" applied on the sprite tileset ^^"

          Monday, May 28, 2012

          sponge-hands-and-ink-and-mockup

          Here I stand, guilty of doing low-level debugging where the situation wasn't calling it. Now that I have a "test level" for the school zone, it's very tempting to start writing more monster code. I thought I could easily hack a Sponge Bop test while *deline was asleep this afternoon, but for some reason, only the first frame of the animation did show up. The rest was just rubbish: Bilou feets and similar stuff.

          Was my data corrupt ? Was there some nasty bug related to 32x32 sprites in the revised game engine (there shouldn't have been?) I scanned virtually everything, but the data I was (painfully) reading in DDD made little sense.

          I finally decided to hack some debugging output in my .spr to .png converter to see what "pages" were containing, and I turned suspicious over the following entry:

          4x4=1020,1036,1052,1068,1116,1132,1148,1164,1180,1196

          1036 ? 1052 ? that's a bit surprising for a sprite number ... when I looked at the shape of the spritesheet, the obvious (finally) hit me: the DS can only enumerate 1024 tiles for sprites. No more, no less. Everything on the fifth column of the spritesheet can be nicely viewed in the SpriteEditor, but cannot be used in games. It's not even the first time I encounter the problem >_<. I think I'll need something in the Sprite Editor that warns the user about this when saving a tileset. And I'll have to figure out how I solved the problem last time...

          Oh, and it's been over one year that I'm longing for a "draft" tileset and a "animation" tileset in .spr files ... I think it's now time to add this to Sprite Editor ...

          developments:

          • [done] enable up to 4 SpriteRam;
          • [wish] show how much tiles are used in each SpriteRam (other than pressing L+START to enable debugging, I mean), and which spritepage should be moved to compress the tileset.
          • [done] shrink spritea.spr so that it can be fully used by the engine;
          • [next] enable 16x16 <-> 32x32 sheet conversion;
          • [next] find a way to use the ink animation in the level;
          • [done] produce a warning when saving a file where sprites or blocks set has too much tiles;
          • [done] allow hint on which tile is used when producing tilesets with spr2png.pl

          regression tests after the edit:
          • [ok] change the spriteram used for a page
          • [ok] save and load file with more than 2 spriterams
          • [---] use the "scan colors" and "color remap function" (actually, nevermind: it operates on the working sheet, not on the SpriteRam itself).
          • [ok] use the "compact tileset" feature (doesn't it just reduce the 'watermark' when last tiles are no longer used ? couldn't that be automated with load/save ?)
          • [fair] use the "color zap" (dirty bit and warning message "file your sheet first" ?)
          • [fixed] copying page only works for "blocks" pages.
          • [fixed] cursor-assisted deletion of objects doesn't behave as expected with 32x32 sheets.
          I'm a bit surprised to see the "SpriteRam*" pointer so scattered all over the code... I might have to change them into "spriteram_no" here and there so that only some core component deal with sprdata[i] directly.

          Tuesday, May 22, 2012

          Dumblador turns back

          Here it comes. Some final tweaks on dumblador's "walk to the right" animation last night and I now have a CompoundGob that turns back when it encounters a wall (how sweet ^_^) Dumblador avance et fait demi-tour. L'occasion de revenir sur le fonctionnement des personnages dans mon moteur de jeu. Accrochez-vous un peu: le 'gobscript' est conçu plus comme un modèle de bytecode en ASCII que comme un véritable langage de programmation, mais comme dumblador est tout simple, ça reste lisible (j'espère ^^") Please bear some GobScript since it's still a pretty simple and straightforward monster:

          anim1 = spr:0
          anim2 = spr:3
          statL0 :anim1 {
          using walker
          selfmove
          test 0 (2,4)-(8,14) 0001
          area 0 (0,0)-(8,4) 000A
          }
          on commence par importer des animations depuis le jeu de sprites (il suffit de connaître leur numéro, ici n°0 pour avancer vers la gauche et n°3 pour avancer vers la droite) et on leur donne des identifiants locaux (anim1 et anim2, respectivement). Le comportement de dumblador va maintenant être construit comme une combinaison d'états réutilisant ces animations: L0 pour avancer vers la gauche et R1 pour avancer vers la droite.
          statR1 :anim2 {
          using walker
          selfmove
          test 0 (2,4)-(8,14) 0001
          area 0 (0,0)-(8,4) 000A
          }
          
          statL0->statR1 on fail (100 :0)
          statR1->statL0 on fail (100 ~ :0)
          statL0->statR1 on hit0 (100 :0)
          statR1->statL0 on hit0 (100 ~ :0)
          end
          
          The only thing you have to remember about your spritesheet is now the position in the animation slots where your things are. That's slots #0 (walk left) and #3 (walk right) for me. You give them animation identifiers for your monster (1 and 2, resp.) From that, you can define states walk left and walk right. Each state defines an animation being played and a behaviour. The combination of using walker and selfmove means that DumBlador will move forward at constant speed, according to what's defined in the animation, but not faster than the value defined in its internal variable v0 (x speed)
          Vous pouvez penser à un "état" comme à une action que fait un personnage: s'il est dans l'état "avancer", il fait son animation "un pas en avant" et utilise un morceau de code C++ un (contrôleur) identifié via using walker qui reprend les tests "y-a-t'il du sol? dois-je suivre une pente?, etc.". Le mot-clé "selfmove" indique que c'est l'animation qui définit de combien de pixel on avance à la fois pour une meilleur synchronisation. On reste donc par exemple dans l'état "vers la gauche" tant que tout va bien. Le contrôleur génère un "fail" lorsque le personnage arrive dans un mur. À ce moment-là il va falloir choisir un nouvel état. Les commandes du types statdepuis -> statvers on fail [condition] (action) permettent de construire les transitions qui seront testées dans ce cas-là. Ici, l'action consiste simplement à écrire une valeur constante (100 ou -100) comme nouvelle vitesse horizontale (variable n° 0). "walker" is what's called a controller for the GOB. It can also report events and indicate when it failed to perform the desired movement. The two on fail statements indicate transitions from "walk left" to "walk right" and back when it's no longer possible to move forward. That could be due to a wall or the end of a platform. With this simple script, dumblador "has no way to figure out". Another part of the current behaviour is that dumblador turns back when Bilou jumps on his "head". This is achieved by the two on hit statements. It's still necessary to provide the (relative) coordinates of the hitboxes manually. Here the "hit" statement corresponds to a passive area in the state definition, which is seen in dark cyan in the Inspector widget. "000A" is the bit mask that corresponds to Bilou's stomping action or AppleAssault's attacks. I could have used "0002" to make DumBlador impervious to punch attacks and reacts only to stomps. Enfin, pour compléter le comportement décrit par chaque état, les instructions test|area n° (coin1)-(coin2) avecqui donnent les zones de collisions (rectangulaires) qui vont permettrent d'interagir avec les autres personnages. La partie un peu "magique" se situe dans le nombre hexa avecqui. Pour chaque "type" de collision, il faudra choisir un des 16 bits disponibles et faire en sorte qu'au moins deux zones de collisions (p.ex. le corps de blador et celui de Bilou) utilisent le même bit (0001) mais dans un test pour l'un et dans un area pour l'autre, pour refléter l'asymétrie frappeur-frappé du moteur de collisions. Finally, the curious (100 ~ :0) are GobExpressions. It's a minimalist encoding of "set var[0] to -100". It works as those RPN calculators, where you type "2 40 +" to compute "40 + 2". Only simple parts are used here: push the constant 100, negate it (I don't have negative constants so far ^^") and assign it to variable 0 (mnemonic: Pascal uses := for assignments). Reusing a constant here is required as the walker controller is allowed to alter the speed in the final steps towards the wall. Would you like to give it a try yourself ?