samedi, octobre 25, 2014

GobAnim::isJedi()


jump, twist and roll!
That's quite amazing, how I manage to postpone an upgrade of the game engine for days and then have two of them implemented in a couple of hours simply because I used doxygen-on-cybook to brief myself on what's around and what is the most straightforward path for implementing them. I have now a way to instruct that a specific transition animation has priority over the running one, which is mandatory for your "air-grab" to have any visible effect when you're turning back or reaching the top of your jump -- in a word, for a consistent behaviour. It also allowed me to give "float-land" a first attempt.

Et voilà: j'ai pu indiquer que certaines animations peuvent "forcer" la main à certaines animations de transitions, comme prévu, mais plus facilement grâce à mon cybook-qui-garde-mon-code-sous-la-main. Comme quoi, je ne regrette pas son passage par le service-après-vente ;). Du coup, on peut déclencher l'animation "attraper en l'air" à n'importe quel moment. Je me suis aussi amusé à modifier l'autre "pirouette en l'air" pour lui donner un aspect de "je descend en planant", même si on ne peut pas dire que Bilou soit un très bon planeur jusqu'ici. Il faudra voir ce que ça donne avec une vraie DS en mains, par contre. Au clavier desmume, c'est assez moyen et on commence à bien s'embrouiller entre la course, le saut, le grab et la pirouette/vrille...

Allez, si ce n'est pas encore fait, profitez-en pour voter pour votre power-up préféré ;-)

Automated OAMs management

Over the summer, I crafted plans for managing larger levels, that would use more than 128 hardware sprites (the OAMs in DS parlance) for all the monsters. Some of those plans use the notion of a "Gob Group", that could be used to spawn several objects at once, at level-specific locations by having them statically placed (unlike shoot-able "dyngobs") but wouldn't be active unless their group is enabled.

Browsing through the game engine code for another purpose on my cybook, it struck me that it would be so easy to have lazy allocation of the hardware sprites as we approach on-screen area and early recycling of those OAMs when we're going far enough from that area. It's now coded. Funny enough, it doesn't affect activation and movement of GOBs in any way: only whether they have hardware sprites assigned to them or not.

lundi, octobre 20, 2014

catch this!

A new animation and a good deal of "sprtools" to merge pixels drawn on "lime" DS and animations built on the DSi ... Unfortunately that will not be enough. There's one "dead" moment where you cannot see the "grab-in-the-air" animation whatever you do: when Bilou reaches the top of his jump. The reason is that there's already a "transition animation" running at this time, and that there is no way so far to cancel such an animation for another. I may have to fix that before I can proceed any further: it will likely be very important for super powers.

dimanche, octobre 12, 2014

Énergie Scolaire ...

Vous aurez peut-être noté le nouveau sondage de ce blog: quels power-ups ajouter au jeu "Bilou: School Rush" ? Ces power-ups seront essentiellemt détenus par les crayons-soldats, histoire de rendre les affrontements avec ces derniers plus excitants. Voilà donc ce à quoi vous pourriez vous attendre:

If you feel so, and especially if you have played Bilou: School Rush a few times, I'd love you to vote for the following nominated power-up candidates. Writing them down, and given the short length of the game, it would likely be cheap if these were permanent power-ups. I rather see them as "consumable" powers, e.g. you could have 3 throws, 5 float and 1 pound left.

Straight throw: fini le lancer en cloche. Comme dans les esquisse, le super-throw lance l'objet droit devant vous. Il reste actif jusqu'à ce qu'il sorte de l'écran ou heurte un mur. De quoi rendre plus aisé l'assomoir d'encriers.
Default throw fits physical laws by making bladors fall. Bilou throws them at an angle of 45°, making it a mid-range weapon that's demanding to aim, like Worms' grenades or DK barrels. Straight Throw switches instead to Blues Brothers' like weapons, where the blador is moving faster, perfectly horizontally, and at constant speed until it gets off-screen. The counter-part is that when you miss your target, your weapon is gone for good nonetheless.

Air dash: Le bon vieux mouvement aérien qui permet de se tirer d'affaire en nous soustrayant un instant à la gravité pendant qu'on part à toute vitesse. On le retrouve dans Giana Sisters, par exemple.

Air Dash and Ground Pound allows you to reclaim control from gravity. You should have fallen, but you're allowed for a short distance to follow a straight line by pressing a single button. You should have been waiting to reach terminal velocity but you get it instantaneously, and get rid of that annoying horizontal speed for an accurate land. Wall Kick, finally, is a twisted version of Air Dash, that can be chained (more open along time), but is restricted in space (only along walls). 

Ground Pound est son complémentaire direct, qui annule toute vitesse horizontale pour passer directement à une chute en vitesse terminale. (cf. les 2 derniers 'super pouvoirs' sentis pour la "version GBA" du jeu).

Wall Kick, la désormais célèbre technique de ninchat du jeu de plate-forme ne serait que moyennement utile dans ce type de jeu, à moins de bien l'ajuster pour qu'elle permette de compenser un saut un poil trop court.

Big Punch, l'attaque niveau 2 de Apple Assault, qui serait capable d'incapaciter crayons et gommes (voire encriers) à courte distance. Le seul avantage sur un lancer de taille-crayon serait ici ... qu'il n'y a pas besoin de disposer d'un taille crayon. Peut-être moins marrant que dans le jeu d'exploration puisqu'il perdrait en grande partie son intérêt de "brise-craie".

Remember Apple Assault ? "Big Punch" is the intermediate weapon you could receive, that dispatched apples at safe distance, with a massive move. Here, it could stun pendats and recto-verso jumping erasers without requiring you to carry bladors around.

Float-Land, lui aussi, agit directement sur la gravité. Il s'agirait de doter
Super Powers as sketched in Summer 2014.
Bilou de l'équivalent des cheveux de Rayman ou de Dixie, voire d'une feuille-mojo pour planer un peu et atterir en sécurité quand il s'avère que le saut est trop court.
Maybe you'd rather float safely to that next book rather than rely on a timed jump ? That power-up is for you, raccoon friend ;)

Last one, the Wide Grab, is for all those who'd love to catch big air with a spongebop, but typically miss their (B) timing. Wide Grab would double your grabbing hit box. How couldn't you love that ;)


Wide Grab permettrait d'élargir la distance à laquelle Bilou peut se saisir d'un taille-crayon ou d'une éponge, sans aller jusqu'à lui faire don d'une "main-lasso". Cette marge de manoeuvre supplémentaire permettrait soit un gameplay plus "nerveux" (assomer et attraper un blador en un seul mouvement) mais aussi donnerait plus de chance aux joueurs de faire du rodéo sur les éponges.

Restera un choix crucial: celui d'octroyer un pouvoir semi-permanent (p.ex. jusqu'à la prochaine blessure) ou des "munitions" pour le pouvoir en question (mais autorisant de cumuler plusieurs pouvoirs). Vu le côté "arcade" de School Rush, je pencherais plutôt pour la 2eme option.

samedi, octobre 11, 2014

Palette Sonore : CJ à la rescousse!

Un point sur lequel je peux facilement donner raison à Kirby Kid, c'est le désert sonore dans lequel on évolue dans le jeu. Un petit "p'tcha!" quand Bilou se fait toucher, un "bop" quand on rebondit sur un monstre et un 'ting' quand on chope un bonus. Et c'est tout. Le lancer de taille-crayon, les encriers qui se préparent, les éponges qui bougent ... tout celà est aussi silencieux que si vous étiez sur Mars.

Kirby Kid also pointed out the lack of sound in the game. Especially, the fact that you don't hear anything when you jump makes it a curious jump-and-run game. I tried converting more of CJ's samples into sound effects, but it didn't really took off. I'll need dedicated samples so that we clearly hear the jump as not being a part of the background music. I also want dedicated sounds when you stun something, when you 'hap' in the air trying to grab something, when you bounce on a pink eraser or when you're interacting with an inkjet.

All this also stems for some code refactoring. As of writing, there is a limited palette of 16 special effects (including sound effects) you can use in the level. It is close to 75% of use, and the major problem comes from the fact that it is _global_. Much like each .cmd file now has its own palette of animations, I need to give dedicated effects palette to each character.


Il est donc grand temps que j'appelle CJ à la rescousse. Mais ça ne suffira pas. Actuellement, je suis limité à 16 effets spéciaux pour l'ensemble du jeux. Celà reprend les sons mais aussi les créations d'ennemis comme les petites étoiles qui indiquent que Bilou s'est fait assomer ou les pieds des Bladors quand on les assomme. Si je veux pouvoir proposer des bonus quand on dégomme un crayon ou une gomme sauteuse, il faut que je fasse d'abord disparaître cette limite.

Ah, par contre:
  • étourdir les encriers à coup de dumblador: ça marche;
  • moduler la force du lancer de taille-crayon par la vitesse de Bilou: mauvaise idée

Btw, I allowed bladors to stun inkjets but turned away from "blador are thrown faster when Bilou moves faster" -- this is just a nightmare for aiming.

jeudi, octobre 02, 2014

Kirby Kid's Advice: Inconsistent Spongebop

Inconsistent interactions with yellow things. The yellow swinging enemies are neat looking and they have neat physics to them. But interacting with them is very inconsistent and too complicated. It's hard to stay on top of them. It's hard to get the big jump off of them. And the momentum of their swing doesn't transfer to the player at all.
Let's first see what "inconsistent" means in this context. Kirby Kid validated the two definitions I formulated as below:

A mechanic is consistent with regards to 2 object if
  • applying it the same way on the two objects leads to the same result. E.g. slashing something with the sword breaks it into bits in Zelda series. That works on bushes, jars, skulls and even rocks in some games.
  • when it leads to different result, the objects shall be sufficiently different so that the player can easily tell what result it will get from passive analysis of the object. E.g. Jumping on an ennemy in SMB always attacks the ennemy unless the ennemy has spikes on his head. Moreover, the ennemy will always be defeated unless it is shelled.
A gameplay element (applying mechanic A on object B) is self-consistent if
  • it always produce the same result (e.g. bounce by 3 blocks height)
  • when producing different result, the player can relate the cause of this difference to visible difference of state. E.g. a spring that may be loose or compressed will throw you higher if compressed.

Pour corriger mon éponge-qui-se-balance, aussi connue sous le nom de "Spongebop" ou "Bop, l'éponge", je vais avoir un peu plus de mal. Kirby Kid lui a diagnostiqué un problème de manque de cohérence, ce que je peux traduire de la façon suivante: il n'existe pas de manière claire de savoir quel sera le résultat d'un rebond ou d'un balancer qui fait intervenir l'éponge. Kirby Kid mentionnait aussi le fait qu'il est difficile de déterminer si l'éponge va nous repousser vers le côté où si on va pouvoir atterrir dessus. La difficulté principale sera psychologique: dès les premiers coups de crayons, "Bop, l'éponge" est un personnage (et pas une plate-forme) au comportement erratique. Il sera utile, mais il faudra s'en méfier.

From the start I have designed spongebop to be somewhat chaotic, which makes it appear mostly only on the "hard path" of School Rush game. But chaotic must not mean "totally unpredictable". There are two moves that are expected with a sponge bop. The first is to use it to gain height, the other is to clear a larger distance with a jump. Both are based on the fact that, when you press A while un-grabbing a SpongeBop, its current velocity is added to the one of your jump.

Initially, I thought Kirby Kid was mostly criticizing the difficulty to do the first move -- gain height -- because when SpongeBop is  almost idle, the only moment when you can "jump off" is when it moves upwards. But getting that is more a matter of luck than skill: because oscillations of Spongebop across its equilibrium are small and that the "auto-bounce" that happens when you "land" on it can hardly be controlled, the best you can do is to try again and again until it works. You cannot even spam the JUMP button because you'll have to hold it down once successfully bouncing off if you don't want to cancel your jump.


Voyons un peu les interactions que permettent Spongebop:
  • SB peut pousser Bilou bas d'une plate-forme ou l'interrompre dans son saut si le contact est latéral. Incohérence: c'est un rectangle qui nous repousse alors que SB est un patatoïde protubérant.
  • Bilou peut rebondir sur SB s'il tombe dessus et rebondir plus haut s'il appuie sur (A) avec justesse. Incohérence: il est difficile de déterminer la hauteur qu'aura le saut effectué dans la plupart des cas.
  • Bilou peut s'accrocher à SB pour franchir plus facilement un trou. Incohérence: il n'est possible de s'accrocher que lorsqu'on tombe, et pas juste après un rebond malencontreux.
  • Bilou peut faire un long saut en avant en appuyant sur (A) au moment précis où l'on lache l'éponge. Incohérence: rien n'indique pour celui qui n'a pas encore suivi de cours de balistique (ou fait trop peu de balançoire) que la fin du mouvement est un mauvais moment pour cette manoeuvre-là.

 I've been more surprised to see Pierrick failing to clear a large jump by using SpongeBop's swinging speed. He was persistantly trying to jump *at the end* of the swing, but physically speaking, bop's momentum is nul at this time. So indeed, it doesn't transfer to your character.

The way Spongebop behaviour lacks consistency can be summarized as such: when you jump off a Spongebop, the velocity you have will depend on Spongebop's instant velocity. Due to its physics, Spongebop velocity is constantly changing in 2 dimension, meaning that it takes some careful study (or prior knowledge) to pick the moment where you'll get the desired behaviour.


    samedi, septembre 27, 2014

    Kirby Kid's Advice: Inkjet interplay


    Here's another one stripped out from Kirby Kid's precious feedback:

    the double ink jar obstacle could be tuned better so that the player waits less. the rhythm/timing challenge here is pretty complex (two objects moving and attacking at different rate). Also when the ink rises jumping into these jars is difficult when they go under the ink.
    Pas évident, hein, les doubles encriers ? Selon Kirby Kid, ça vaudrait la peine d'en ajuster le rythme pour que le joueur ait moins besoin d'attendre. Effectivement, si on essaie de passer en force ou en vitesse ce genre d'obstacle, ça se finit généralement dans une mare d'encre. Même pour moi. Dommage pour un jeu de course ?

    Yeah, that's quite true, I have to admit. Whenever I fail myself at *deline's level, that's in the only part she has not been involved in: the double inkjets. Same for the later level. I hadn't bother this far because I'm not that good at video game, so it sounds natural to me when there's some place where I often fail.

    Now, there's one easy way I could increase the chance the player goes through such challenge: allow him to undermine it. If only Bilou had the opportunity to stun inkjets by throwing him a dumblador, that would ease moving through. You wouldn't need to time your jumps because inkjet would stay in-place.

    Mais je coince un peu: je ne vois pas bien à quels ajustements procéder. Permettre de simplifier le challenge, ça oui. Il me suffit de permettre au joueur d'assomer les encriers qui resteraient alors gentiment sur place, sans plus jeter d'encre. On redescend à un mode plus simple avec un encrier immobile et un mobile, une seule source de goutelettes. Mais est-ce bien à ce genre de solution que Kirby Kid pensait ?



    You wouldn't have to fear droplets either. Of course, when there's two of them, only one would be disabled that way, but that would still be better than trying to hop here and there to dodge droplets.

    L'autre explication possible, c'est qu'avec leur façon de monter et descendre depuis le début du niveau, mes encriers se trouvent dans un état trop imprévisible au moment où le joueur les rejoints. Le moindre petit retard accumulé et il n'y a plus moyen de se fier à sa mémoire: il faut obligatoirement observer les encriers, repérer le rythme de leurs tirs (qui dépend de la distance qu'ils parcourent) et se faufiler entre les gouttes.

     
    Now, the point I cannot solve is whether that would be solving the "tuning" issue mentioned by Richard. But what could I tune better ? Inkjet's speed doesn't seem too fast, they typically throw once moving up and once moving down. The moment when they'll prepare their blow is constant related to the moment where they turn back, so you *can* learn it from observing, but it will be harder to use this knowledge from one inkjet to the next, since the position of your platform compared to their turn-back position is variable.

    Comparativement, tous les Marios sur 8 et 16 bits n'auraient activé le comportement des encriers qu'après que Bilou s'en soit suffisamment approché. En dosant la vitesse à laquelle il avance, le joueur peut alors "manipuler" leur comportement et les forcer à adopter un schéma qui est plus à son avantage. J'avoue, c'est surtout une technique de speedrunner, et j'aurais tendance à la trouver plus perturbante qu'amicale, mais au moins ça donne une possibilté de contrôle bienvenue dans ce genre de situation.

    One thing that differs from typical Mario games, is that inkjets are active as soon as the level starts. In comparison, all 2D Mario games built before 1995 were technically limited to a dozen of active sprites. Anything that was moved offscreen from a sufficient distance was "deactivated" and monsters -- but also moving platforms -- start activating when the screen approach them. Here, the player will see them at a random initial position because their position depends on the number of frames spent to get there. Comparatively, in Mario, you'd see them at a position that only depend on how fast you were moving when approaching them. Is this what I'm missing ? 
    The ink is interesting to avoid in the air. Once it hits the ground, the player has successfully dodged. If the ink hurts on the ground, the player just waits around for the coast to clear.
    This has been easily fixed. Now the ink only hurts in the air, no longer on the ground. For the "rush" type of game, this is definitely not deconstructing any of the challenge.