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.


Bowels of the Memory Manager ...

With cases stacking up, I got used to ignore all those testimonies that pretend that "Malloc is the killer, I've seen him". I wouldn't trade Malloc's skin for my oldest pair of gloves, as he's always the first one people blame.
Bah. People. What do they know about crime, after all...

Hopefully, I have other noses for such cases, so I paid tracemem.pl a visit and showed him the shots Coroner GDB gave me from the victim.
At first, Tracemem pretended to know nothing about that laying frame... he always does, until I provide him hexadecimal evindence he can't deny, as the victim's and suspects addresses.
"Free(man) is cheating you", he finally dropped, panting. "Look at those figures: these are not even addresses. I have no idea what this is, but this is certainly not addresses".
"When you've got no idea, Tracemem, it usually means you've seen them last week. I don't need idea, I need info. Tell me what you know".
"Okay, okay" he added "take it easy... You shouldn't mess up with those guys, really. They're trading bare hex they compile themselves in a hideout they name "AnimEDS". They say they can make you move in ways you've never experienced before. I don't have anything to do with these guys, right ? I just serve drinks when people order. I don't want any trouble".

I'd lost almost half a week, and all I know is that the last address where Free had been seen is fake, and actually a room in a building owned by someone else in the AnimEDS gang. Not yet enough to get the cavalry moving. I had need for another vision of the problem. I went to Doc Xygen and showed him the remains of GameScript. "I want descriptions", I insisted, "don't puzzle me with line numbers". I didn't tell him that pictures in malloc.h were made up from archives, but that's the best way to make him sing. With his usual frenzy, Doc Xygen started to show all the connection he could find. Among the expected ones, however, there were surprising exchanges. "Wait, SpriteSet got some cans from Malloc and directly sell them back to Free ?" I asked.
"Elementary", the Doc said, "SpriteSet is low on stack. With only 16K brutto, he's got to rent space to Malloc&Free for his loading activities on the docks.
Nothing to worry about. But ... hmmm ... *this* is interesting", he said, drawing a red circle around a triangle of pictures among the boxes and arrow he had scribbled all over the desk. "Interresting?"
"Clearly", he said. "Look, GobAnim and GameScript both tried to sell back some cans to Free, a few cycles from each other! Both pretending that they had the exclusivity on products by A'n'Im Eds"
"So they would have a tussle next to Free's place just as Malloc was going out!?"
"Of course", added the Doc. "Malloc gets back the cans that Free buys to the dockers, optionnally clears them and sells them back to other dockers. Everyone blame them, but noone else has cans to provide ..."

I fixed my hat and thanked the doctor: Malloc & Free's dubious activities are none of my business. I had a name to give to my client, and he'd be able to deliver his new product in due time. Happy clients make larger checks.

Thursday, December 13, 2012

Note to future self

Do *not* plug your DS' microSD card in your funky phone even if you're *desesperate* about shooting picutres/video. You did that on Dec. 6th and you've lost all your SEDS/AnimEDS backup history in crossed cluster chains.

And no, you don't seriously have time to port a journalised file system to the NDS to avoid that further on. Sync on a regular basis, and push to Git master.

Wednesday, December 12, 2012

GobAnim vs. GobAnim

Something went 'oops' when trying to upgrade the 'bouncing feet' behaviour for dumblador's behaviour. I edited new animations for the feet in AnimEDS (mostly to take advantage of the bounding box edition feature), but when I injected that into the ongoing test level, I simply didn't see any feet anymore.

Armé de mes nouvelles petites anim' pour les pieds baladeurs de Dumblador (et des zones de collisions associées), je venais tout juste de faire les ajustements à blador.cmd, mais en lançant le jeu dans l'émulateur, j'ai juste eu droit à une avalanche de "oops? endless looping" sur la console de débugging. Un p'tit breakpoint bien senti sur iprintf (oui, carrément) m'a permis de voir que je faisais fausse route: ce sont des GOBs "simples" (comme dans AppleAssault) qui sont créés pour les pieds et non pas des CompoundGobs comme Bilou et Dumbladors. Du coup, l'interprétation des données d'animation est erronnée. Je vais devoir passer plus de temps que prévu sur ce point-là.

I had to rely on some DDD to figure out that gob shooting currently systematically create a SimpleGob instance, but that attaching a AnimEDS animation to a SimpleGob just results in non-sense (and likely no display). I thus have to merge a bit more those two co-existing animation parsing (binary and textual) and rendering (compound or simple). The easy way out would be to claim "oh, I can also shoot compound gobs", but the reality is that 90% of shots (weapons, dustballs, feet) will be simple gobs. Only monster generators and Bosses may need something else.

  • [done] GobAnim::parse() should use AnimUser encoding, rather than AnimCommand {} structs. Keep the API (GobScript syntax) unchanged.
  • [done] SimpleGob::play() should align to that new encoding.
  • [done] enable BBOX, origin and pageno's colours bits from anims.
  • [ok] ensure a 1-limb AnimEDS encoding can be used to create SimpleGobs in GameScript::GobCommand() 
  • [done] GameScript::setGobState() no longer blindly cast to SimpleGob to call setstate()
  • [done] GobGun::shoot() no longer blindly generates SimpleGob()s

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, December 03, 2012

levez .. abaissez ... levez ... balancez!


Petite réflexion de week-end: comment s'assurer que Bilou ne puisse pas tenter de prendre un 2eme objet en main. Pour l'instant, c'est en tombant une 2eme fois sur Dumblador que celui-ci passe en mode "transporté", ce qui autorise un nombre arbitrairement grand de Dumbladors à suivre Bilou.

Il faudra donc impérativement que les zones de collision déclenchant le ramassage et le lancer soient liées à un état précis ("ramasse" ou "lance") plutôt qu'à une zone générique, vu qu'on a pas de zones conditionnelles. Il suffit alors d'une des variables d'état de Bilou pour se souvenir s'il y a ou pas un objet à lancer lorsque le bouton d'action est enfoncé.

Technically speaking, we can now carry dumbladors. But we're carrying too much of them: every bop on a stunned blador turn it into the "carried" state. I'd rather avoid having 3 bladors following Bilou: grabbing a new one only if none is being carried at the moment would be by far preferable.

Conceptually, there are two "meta-states" (free hands and carrying), and we're only switching from one to the other by picking up or throwing objects. Practically speaking, however, there no such "meta-states" in the state machines, but there are some per-gob variables that can complete those states, so sIdle-> sPickup and sIdle->sThrow transitions would be conditional (and use dedicated collision areas).

Reste le problème de l'apparence proprement dite (les mains en l'air). Au départ, j'avais envisagé un mécanisme de "costumes" (cf. Monkey Island) rudimentaire qui aurait consisté à "geler" la position des mains de Bilou en ignorant toutes les commandes d'animation les concernant. Le hic, c'est que d'une animation à l'autre, les mains ne sont pas forcément liée au même "membre" logique.

Pas évident non-plus de modifier le contenu d'une page de graphisme en guise de "costume" (comme on l'aurait fait pour Kirby), à moins d'effacer complètement les mains du sprite de Bilou et de les intégrer à l'objet transporté (Dumblador, donc). La seule alternative restante serait de donner une deuxième version de *chaque* animation... j'imagine que vous comprenez aisément pourquoi j'aime autant trouver autre chose :P

To ensure proper operation, it is required that some  active collision zone could force state change after the first collision has been triggered. Then, I still have the problem of "animating the pick-up", but I came up with a nice approach for that.
Last but not least, I'll have to ensure that Bilou's hands remain above his head while moving along with a blador ... which may involve an alternative for *every* animation. I'm still thinking about a more practical way to handle that.