Friday, March 29, 2013

Floating or non-floating ?

J'étais donc arrivé à vaincre les premiers défis techniques liés aux encriers et j'avais une animation assez convaincante. Suite à une demande de Lazycow, j'y ajoute une capture vidéo montrant les 2 "inkjets" qui bombardent Bilou à l'écran...

S'en est suivi une discussion assez animée sur pixelation qui est partie beaucoup plus vers les choix de gameplay que vers le côté "artistique" pur et dur, ce qui n'était pas forcément pour me déplaire.
Mais on touche à un élément "sensible": les encriers peuvent-ils ou non flotter dans les airs sans support apparent. Ce ne seraient pas les plate-formes mobiles les plus incongrues qu'on ait vu, mais ça représente un "décalage" par rapport à tout ce qu'un encrier est supposé pouvoir faire. Or, ça fait un moment que je me suis convaincu qu'il est primordial de faire en sorte que le monde virtuel dans lequel le jeu se déroule soit cohérent de façon à ce que le joueur y reste impliqué et qu'il continue à s'identifier au héros (fût-il une balle bleue :)

It's a fairly long story that all started on "way of the pixel" as Lazycow asked for the droplets to complete the inkjet animation. So I showed up a byzanz record of my on-going level and everyone stared at those floating inkers, suggesting that they rather feel ground-borne. But floating inkjets is a pretty well established design decision that has already been used in several maps. Still, I don't want the fiction to fall apart just because of some detail that looks too-odd-to-fit-the virtual world.

Quand Helm dit
I would never think to use them as platforms and even when I would figure it out I would say 'well... this is weird' and it would take me out of the game.
"Il ne me serait jamais venu à l'esprit de m'en servir comme plate-forme. Et si même j'avais fini par trouver, je me serais dit "c'est ... bizarre" et ça m'aurait ~sorti du jeu lui-même~".
La fin (entre ~) n'est qu'une traduction approximative, mais j'y lis une rupture du vortex reliant l'esprit du joueur à l'univers du jeu. Le genre de "glitch dans la matrice" qui fait que l'esprit se persuade qu'il est impossible qu'il soit dans la réalité. La frontière entre une bonne fiction et un délire où le lecteur ne parvient pas à rejoindre l'auteur et le regarde se bidonner tout seul.

Clairement, ça clashe. J'ai mis le temps pour re-penser à tout ça: les encriers-volants étaient un des premiers élément de gameplay que j'ai introduit moi-même quand j'ai commencé à faire du "level design" pour Bilou en 2007. Ils figurent sur la bannière de ce blog. Ce n'est pas rien. Mais oui, je suis le Grand Conteur de l'aventure (pardon pour les majuscules) et je peux trouver mieux que cette solution "peu chère" même si j'y suis émotionnellement attaché.

Quite some time ago, I planned and kept secret the addition of a "cork lid" being a sort of organic key that Bilou carries along to change the behaviour of inkjets. The idea is that the height Bilou could reach would be higher when he's using the lid. The ground-based and the airborne inkjet thus co-existed in level designs, with little attempted to harmonise that. Of course, it would still be possible to ride an inkjet with no lid, but that wouldn't throw you as high.

Parmi les solutions envisagées, il y avait la possibilité de faire en sorte que Bilou soit "propulsé" vers le haut en lieu et place de gouttes d'encre, s'il saute dans un des encriers. C'est une autre façon d'atteindre les hauteurs, et je pourrai donc l'exploiter à certains endroits où je retire un encrier-flottant-verticalement.

J'avais aussi prévu depuis un moment qu'on puisse rajouter un bouchon par-dessus un encrier, pour l'empècher de bombarder d'encre, mais aussi pour pouvoir être propulsé encore plus haut ...

Dans l'exemple "lancer le taille-crayon", je jouais sur le fait que Bilou arrivait dans un encrier pour motiver le fait qu'il lui était impossible d'emmener un taille-crayon. Celui-ci est facile à adapter: il me suffit de descendre un brin l'encrier (vide) de façon à ce qu'il flotte dans l'encre. Rien d'anormal ici.

A first use case featuring the inkjet was the "bridge" that brings Bilou to the blador-and-pencil area. Here, Inkjet is different from any platform by the fact that Bilou need his hands to grab the inkjet and avoid falling. Therefore, he cannot bring a dumblador along. It's fairly easy to adjust, though: an empty inkjet could easily float in the ink, so I just need to raise the level of the ink swamp by one tile and I'm done.

Le "niveau de rémi" me bloque beaucoup plus. Je voulais combiner les 2 propriétés du taille-crayon (solide et transporteur) pour lui faire bloquer l'entrée d'un passage vers la gauche. Cette entrée n'aurait été débloquée qu'une fois l'encrier en route vers le haut (avec Bilou à son bord). Seulement voilà: une fois engagé dans le conduit, pas moyen de sortir de l'encrier. On devra pour ce faire attendre d'être arrivé à l'étage au-dessus, et on aura donc à combiner un bon timing tout en évitant Bangbash et la rangée de crayons pour entrer  dans le passage sans pour autant se faire écrabouiller par l'encrier qui redescend.

My nephew-drawn level brings a tougher challenge. The inkjet here is moving vertically, only when triggered by Bilou's landing. When idle, it blocks the way to a secret room. Without that room, Plummet -- the scribble feather -- could have been used, but I specially designed around the presence of a moving block that push the player into a narrow vertical pipe. You can't escape that pipe until the inkjet has reached the ground level, with a Bangbash to take care of.

S'il n'y avait pas eu ce passage secret, j'aurais pu faire appel à Plummet, la plume qui accompagne l'encrier bougon qui sert d'introduction à "Deep Ink Pit" Mais suspendu à une plume, on peut se détacher n'importe quand ...

Dans un autre essai de niveau, j'avais mélangé encriers et livres-écrabouilleurs pour forcer le joueur à ajuster son timing plutôt que de foncer toujours plus vite en avant. Ici aussi, le fait que Inkjet soit solide oblige de correctement calculer son coup pour ne pas tomber dans les crayons.
Une éponge qui monte et descend devrait pouvoir reprendre le rôle, cela dit.

Another timed challenge that used inkjet moving up and down to force you dodging the smashing book rather than rushing forward. I guess Spongebob could easily be used instead, here.

Ici, image d'archive (excusez la qualité moyenne du scan): le premier niveau de la school zone dessiné par Piet avec deux encriers qui montent et qui descendent. Ils ont pour rôle de mettre suffisament la pression au joueur pour qu'il soit tenté de minimiser les risques et du coup "loupe" la clé nécessaire pour quitter le niveau. Mais vu leur côté ascenceur, on pourra si nécessaire refaire un essai en faisant demi-tour une fois l'erreur constatée.

And last but not least, here comes ancient scroll where my brother depicted the first school zone level. First inkjet ever, and they weren't floating on their own, but were rather standing on "magically floating erasers" ... not much better. They were used to intimidate the player and make her miss the key among the bonuses, while offering the option to move back upwards and eventually grab it. Would it work if I had some bouncing erasers on the ground with the inkjets bopping up and down ? it's fairly high ...  

Les encriers sont-ils sur des gommes volantes dans le dessin de Piet ? sans doute. Est-ce une meilleure idée ? J'en doute.
Assez rapidement j'ai voulu "habiller" ces deux encriers, par exemple avec une grosse poulie et des cables: ils se retrouvent dans le matériel prévu pour le cours de physique et montent/descendent accrochés l'un à l'autre. Sauf que si c'était réellement le cas, Bilou devrait pouvoir s'accrocher lui aussi à la ficelle, non?

Ce n'est qu'en commençant ce texte et en voyant les lattes côte à côte que mon cerveaux embrumé par mes 34 ans tout frais à suggérer l'interprétation de "ce sont des flacons du cours de chimie accrochés à ces saloperies de statifs universels gradués, et ils sont maintenus par des pinces qui montent et qui descendent" ...

I was staring at those two-decade-old inkjets and suddenly, the rulers started looking like those graduated rails that the chemistry teacher used to build goldberg machines featuring erlenmeyers and test tubes. They would perfectly grip on an inkjet, wouldn't they ? you can move the grips up and down at will, too ... and the rail itself is too slippery, so Bilou cannot grab it on his own! Eurèka!

J'ai enfin fini les corrections des TP de mes étudiants, donc je chope un microfin et je fais un test ... Hmm ^_^
Oui, ça j'aime beaucoup mieux. ça ne sera pas utilisable partout, mais des classes de chimie, il y en a aussi. La tige sur laquelle la pince est montée est suffisamment glissante et large pour qu'intuitivement on puisse admettre que Bilou ne parvient pas à s'en servir seule. Reste à ajuster la perspective pour qu'il n'y ait pas trop "d'espace mort" entre l'encrier et la tige (qui fait office de mur).

Je crois qu'on y est. Coder ça, ce sera l'affaire de quelques pixels supplémentaires ... rien à voir avec "la plume en 3D" ou "une grosse poulie avec des cordes et tout ^_^



Pendant ce temps, sur Way of the Pixel, ça ne chôme pas. Chacun y va de sa petite proposition.

J'aime assez bien l'approche d'Ymedron (ci-contre) pour un "passage imposé" où il faut ajouter un bouchon pour passer. C'était le genre de petites scribouilles que Julien, Piet où un autre membre de PPP Team m'aurait suggéré il y a 20 ans quand le projet venait de commencer. On aurait pu rêver meilleur cadeau d'anniversaire ? ^_^

Habemus Atramentarium. And thanks to Ymedron's alternate solution, I now even have the perfect scenario for introducing the cork lid without involving some boring text-based tutorial ^_^.

Saturday, March 23, 2013

Release Checklist Time

Tomorrow is the yearly release day. I had hopes to come with a fully functional revamp of the "school zone, level 1" as initially drawn by Pierrick and Piet (aka Cyborg Jeff), but that's not yet possible. You still have the latest gameplay demo to try (3rd evolution since Christmas), I you really want to. That's still significant progress achieved since last year's first appearance of a compound Gob in the game engine.

I toyed with the idea of doing a quick-shot of SeaFox on DS, using the sprites I drew 4 years ago (whoaw. that old 0_0), which would now be somehow a piece of cake with the directional tiles I used for Inkjet and the objects generators that I used for berrybats. But I lacked time for that as well.

On the other hand, all the tools have been upgraded since the Neocompo, with the addition of multiple palettes, and so was the game engine. That's not as impressive as introducing the animation editor, but that's still a significant step.
In SEDS, you have a set of radio buttons telling "cmap slot" just above the raster tool. touching one letter picks that palette for edition, and L-touching it will copy the current data onto another slot. Clicking "okay/sure" activate one slot for the sprite editor. That's pretty much all you can say.
  • [todo] enable some sort of "sheet preview" for all the sheets on top screen, and identify the currently selected sheet(s)
  • [done] L+touch on the '>>' and '<<' buttons navigate to the "next page in the same set as the right (edit) page".
  • [wish] 16x32 and 32x16 edition (even with 32x32 grid)
  • [done] provide a button on screen for launching "cursor" mode, just in case R trigger is not as reliable as it should.
  • [done] provide a "Load" and "Save" button on the file screen that do not depend on L/R triggers.
  • [done] auto-compaction of the tileset as you move pages across types of ram
  • [done] two-way navigation in ram types with L+touch. 

In the animation editor, there's two places where you can use alternate palette. When you describe a "limb" for an animation, you can use the "cmap slot" radio buttons on the "FILE" screen to define its default colour (before L-touching the limb table on the left).


Alternatively, you may need to change the palette slot of a "limb" during the animation, for instance to introduce some progressive shading effect. This is achieved by touching one of the "cmapslot" in the bottom-right corner of the EDIT screen.

See this post for identified bugs and things that needs improvement.
  • [done] provide a "Load" and "Save" button on the file screen that do not depend on L/R triggers. 
  • [done] allow more than 48 animations.
  • [todo] dim the sprite when enabling "box" mode (as suggested here), report the current size
  • [todo] allow the box to be moved without getting resized.
  • [wish] more convenient way to encode limbs default priorities (i.e. grid vs. list)
  • [todo] show both *load slot* and *save slot*.
  • [done] export animations into .gif files 

Changing the color of tiles in LEDS is likely the most hack-ish of the three. You will need to ensure that your tiles are on the background layer, then press L+SELECT to switch to properties edition. From there, press the dpad to the LEFT direction once to hide the tile properties, and then press it again so that it says "colors on" on the top screen. you may then use (A) and (B) button to change the current cmap slot and paint objects with the stylus in the currently selected slot.

[done] make sure monsters are properly rendered on screen
[done] allow cloning of .cmd files and update of which map they use.
[done] feedback on file selection.
[todo] feedback on color selection; e.g. change palette for the upper screen and fade foreground objects.
[todo] make tile flipping simpler in draw mode (e.g. reaffect X or Y button).
[think] enable 'book' of sketched objects to be read/written to (may require A/Y for DRAW/COPY mode to be re-thought too).
[done] display non-functional (missing state) GOBs and allow selection.
[todo] report GOBs' cast
[todo] clear/set GOB init expression, set cast.
[need] in 8x8 mode, move the cursor by 8 pixels, not 16.
[done] allow monsters linking.

Hope you'll enjoy it.

Friday, March 08, 2013

On se lance ?

Quelques commentaires constructifs sur WoTP, 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).

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

Tuesday, March 05, 2013

Poussez-vous !


Push ... push ... push.
Après quelques "tatillonnages", j'y suis presque: les collisions avec les encriers poussent correctement Bilou, sans le faire se "téléporter" d'un côté à l'autre de l'encrier en cas de contact.
Ce n'est pas encore parfait: je n'ai par exemple pas de "bloquage horizontal" pendant le mouvement vertical (et vice-versa), et les encriers peuvent enfoncer Bilou dans un mur. L'affaire de rajouter le bon cando() au bon endroit ...

At last some time to try and add features in the game engine. After several tweaks, I have the right settings, and Bilou no longer goes through inkjets. Neither "normally" nor through quantum leaps. It still need polish, especially to avoid the case where Bilou gets pushed into walls. Most GOBs won't support that. It would be preferred to have a kind of "squish" animation that hurts Bilou when such cases occur. Funny enough, Bilou's code has not changed, except the addition of a simple collision flag. 

Mais à force de petites touches supplémentaires, ça s'affine. Qui veut donc essayer de jouer les Beta-testeurs pour voir s'il reste des choses para-normales dans cette démo ?

There's one flaw in the design, though: So far, I had "repels horizontally" or "repels vertically" opcodes, and a "completely solid" area was implented as "RxRy". That just doesn't work: it makes Bilou ridiculously align to the top/bottom edges while he's pushing the inkjet from the sides. What I need here is an independent "Solid" opcode that behaves either has Rx or as Ry depending on the direction that sees the largest center-to-center distance.
Moreover, when you look at the captured animation, you can notice that something goes wrong when we fall off a inkjet that moves up. Bilou seems to have super-natural speed! That's because all the "repel" opcode do is to trick your coordinates. That's fine on the ground, but it implies they do not alter your speed, so gravity keeps building up Bilou's speed and everything happens as if he was at terminal velocity, falling from high heights. The proper place to fix this is in Bilou's state machine, adding triggers that resets vertical speed in those cases.
Also, there are two metrics produced out of a collision: center-to-center distance, but also area overlap (signed). The later is used to define by how much pixels we should move one object to separate them. Only one of these metrics is available as "we" and "wf" variables in gobscript, but I'm not sure I was properly inspired when I picked center-to-center for the job, as it depends too much on how large objects are.

Saturday, March 02, 2013

Les années creuses.

2002, there isn't much Bilou development: Clicker is taking all my development time. However, after I found a book about OpenGL and used it to render the Clicker logo, I apparently decided to try and write some code for a OpenGL version of Bilou ... It is more an empty shell than anything else, but it shows that Bilou wasn't completely forgotten.

Après avoir un peu potassé OpenGL, je m'étais tout d'un coup mis en tête de tenter une conversion 3D de Bilou, sur base de mes cogitations "Ultimate Game Maker". Ça n'a malheureusement été qu'une coquille vide, mes compétences en C++ à l'époque et l'absence de modèle 3D pour mes personnages ayant tué le projet dans l'oeuf.

But the greenzone isn't very convenient to render in 3D. The idea re-appears in 2004, however, with my discovery of the OGRE framework. This time, I directly hop to the School Zone, which should be more modeler-friendly. Still, Bilou would be pretty difficult to animate as it is made of deformable material.

Pourtant, l'idée réapparaît en 2004, après la découverte du projet "OGRE3D". Cette fois, je passe directement à la School Zone, plus propice au rendu 3D. Mais de nouveau coup dans l'eau: le côté "déformable" de Bilou (et des pieds/mains des autres personnages) me donne des migraines.

I guess I could have pursued with the comic instead, but I actually was stuck with the scenario. Even on the mini-strip that was disconnected from the storyline growing so far, featuring Recto and Verso, two hot-tempered erasers, I couldn't find a suitable conclusion ^^".

Et côté BD, me demandez-vous ? Eh bien, j'ai tenté le passage du petit carnet quadrillé au bristol en 2002 (suivant le conseil de Spoon). Jolis dessins, sans aucun doute, encore qu'au départ le bristol était un rien intimidant. Malheureusement, c'est le blocage scénaristique. Bilou voit sa destinée révélée (sauver la planète en ré-activant les Magic Stones -- suivant le scénario prévu pour la "version GBA" du jeu). Bilou et Bouli sont séparés, le temps pour Bilou d'emprunter le "sentier de feu" pour rejoindre le "deuxième monde"... Puis je coince.

Je tente du coup un petit "hors-série" avec les gommes "recto et verso", et leur pont brisé ... sauf que je n'ai aucune idée de comment réparer le pont ni comment introduire la "chute" de ce hors-série. Un coup dans l'eau.