Wednesday, July 27, 2022

Oh!? A post! A shell !? Progress ?

I know it's been a long time. Would you like an explanation ? It's a nice one, with Persian princes and oversea travels and unicorns. Maybe even a dragon!

Anyway, I finally got some code refactory completed so that more 'controllers' can record impact speed into script-friendly variables. That at last allow me to code whether a scorpeye shell should bounce or not when it can no longer keep moving the way it was.

Salut! Vous êtes toujours là ? Bien! Merci ^_^ Allons-y, alors. J'ai enfin repris mon projet NDS, finalisé cette classe GobImpactController dont dérive maintenant GobGravityController, mais aussi GobFreemoveController, ce qui devrait (enfin) permettre à cette satanée carapace de scorpion de faire demi-tour quand elle se prend un mur.

Enfin, ça aurait suffi sur un sol lisse et infini. Mais j'avais justement un trou dans mon miniveau de test, j'ai donc pu chipoter un peu plus avec les testpoints, pester sur le fait que le contrôleur de chutes signale un event quand on se prend un mur (plutôt que d'annoncer l'échec du mouvement, vu qu'on peut toujours continuer à tomber ... dans un sens, c'est logique).

Je vous aurais bien mis une vidéo de tout ça, mais à 1Mo la vidéo de 10 secondes ... les plus irréductibles sont invités à la regarder sur twitter.

Oh, granted, there's been pitfalls. The fact that moving along the ground fails when you hit a wall while falling down and hitting a wall just creates an event, wasn't exactly welcome-back-to-coding-friendly.

But well, there it is. There it bounces. Unless you throw it straight into a floor+wall corner or on some odd location on the sand. I'll need more runME+InspectorWidget to find out what is going on there. Or maybe some more muad'dibugging ?

Monday, June 27, 2022

gdb, intel flavour

J'ai beau avoir de nombreuses heures de gdb derrière moi, la syntaxe AT&T opcode source, destination, ça reste quelque-chose de complètement non-naturel. Quand on s'est habitué à écrire du code assembleur avec opcode destination, source, on y reste. Pareil pour les 42(%eax,%ebx,4) vs. [eax + ebx*4 + 42].

Et voilà qu'à travers le wiki du projet "gdb-dashboard", je découvre qu'il est possible de passer gdb en mode 'intel' d'une simple commande.

set disassembly-flavor intel

là. c'est tout.

I've been using gdb a lot already, but that never made the AT&T assembly syntax natural to me. So I was quite (happily) shocked to discover an option to switch to intel syntax instead. Huzzah! And not only that, but a 'dashboard' option that let me have disassembly + source + values + registers + backtrace view of what I'm doing without losing the power of the basic text-mode GDB command line !

So if you don't mind I'll make this post my advanced-gdb-recipies until all my work stations are in sync.

Et si on veut la même chose en sortie d'objdump, ce sera

objdump -M intel -mes-autres-options

[ sauvegarder et continuer ]

Attention: gdb-dashboard et ddd sont mutuellement exclusifs.

A tout hasard, un appel x86_64, ça donne call(rdi, rsi, rdx, rcx, r8, r9, stack...)

Et si jamais le débuggeur insiste sur le fait que "No function contains program counter for selected frame", on peut toujours forcer disas address, +size ou utiliser set disassemble-next-line on

edit: pour montrer/cacher un panneau, on utilise juste dashboard nom_du_panneau

Juste, pour éviter les pointeurs en bleu-foncé illisible, on peut ajouter les commandes gdb classiques à la fin du fichier .gdbinit (avant `python Dashboard.start()`):

set style address background none
set style address foreground cyan
set style address intensity dim 

Et pour les noms de registres (en noir sur mon Pc de bureau T_T), il faut aller éditer le style "low" ... j'en profite pour tester ces codes ANSI 256-couleurs:

'style_low': {
   'default' : '38;5;103' # 32-16 = 36*red + 6*green + blue
}

oh, et si jamais le panneau "source" paraît un peu étroit, 

dashboard source -style height 20

 (merci Andrea et l'équipe du wiki ^_^)

Sunday, June 05, 2022

Nova the Squirrel

She's created some games on the NES and now she's creating a sequel for her best title on the SNES. How could one be more awesome than this? Well, she could be doing it in open-source 65* assembly, for instance ? Check: she does that too. She's Nova, likes world building and character design and her mascot character is a green squirrel going also under the name "Nova". I've been following her twitter account for a handful of years now, and it's really about time I give her platformer a try, be it only to tell you about it.

I can't deny a mario-worldish aesthetics to the world in which Nova the Squirrel takes place, but it would be reductive to claim it to be a Mario clone. 

Elle est plus jeune que la NES, plus jeune que la SuperNES, et à son âge, je me disais que finalement, en programmant sur GBA/NDS je pourrais probablement faire mon jeu sans avoir besoin de reconstruire un OS en premier. Elle, c'est Nova. Elle a décidé de faire son jeu en assembleur 6502 sur NES puis de lui donner une suite sur la reine des 16-bits. Tout sa dans son propre univers, avec ses propres graphismes. Et en open-source, s'il vous plaît. De quoi faire péter le compteur de génialitude.

Ne vous laissez pas endormir par l'aspect Mario-like de ses graphismes: considérer "Nova the Squirrel" comme un clone de SMW serait réducteur. Les comportements des adversaires sont plus variés, et le personnage peut 'emprunter' les techniques des monstres qu'elle rencontre. On rencontre des bumpers, des briques destructibles, des items à ramasser ... tout le panel d'interactions avec l'environnement qu'on pourrait attendre d'un jeu peaufiné et ambitieux des années 16-bit répond présent.

From what I've been able to test from her demo, there's an interesting variety of monster motions, power-up that come as a sort of 'copy ability' flavour (triggered by UP+SHOOT, which I always seem to forget ^^"), bumpers, breakable bricks, collectibles and such. And slopes.

Your default attack is just stunning monsters, copied abilities may defeat them. Although not all power might defeat all monsters (conway's Glider deletes the red stompers, but bombs just stun them, for instance).

Since it's a demo, i can't really tell the story yet, but it could go like some fastfood-king has invaded squirrel-land and over consuming fastfood twisted the mind of inhabitants making them dangerous to anyone. If you see a flying burger in this game, remember: it is not trying to heal you.

The game smartly comes up with a sort of level selection screen that acts as a mini-map. Some of the levels come up with so many mechanics that I fail to find words to describe them, producing avalanche of block-changes, with crates-that-turn-into-bumpers-that-then-disappear, or blocks that disappear into arrows that destroy more nearby blocks.

Seriously, there's significant amount of work in the game engine here.

Si son jeu NES est aujourd'hui achevé, l'épisode Super-Nintendo est toujours à l'état de démo. Il faudra imaginer soi-même le pitch du jeu et on pourra sans vergogne passer en revue toutes les armes prévues dans le jeu. Il faudra se débrouiller un peu aussi pour découvrir les commandes disponibles et les mouvements du personnage, y compris le "copy ability" assez cruxial pour avancer. Mais à part ça, la démo propose déjà des environnements variés et des niveaux bonus en mode 7. Possible que l'aspect sonore soit toujours en grand chantier... je n'ai plus la mémoire très précise à ce sujet (traduction écrite plusieurs mois après la version Anglaise)

And just when I thought I had discovered enough to write a post about it, Nova surprises me with a mode-7 bonus round (?) possibly inspired by chip challenge.

And I was also about to miss that START takes you to an inventory where the demo-mode pre-loaded all sort of powers for you to toy with. From the fire and bottles-throwing you can already find in-game to exotic devices like a sword or a fishing rod.

Seriously, the amount of work and love in here is amazing. (yeah I know, you expected 'insane' instead, but that wouldn't be respectful at all. This is dedication).

Seriously, girl/miss/ma'am/squirrel, you rock. I hope you'll keep rocking for long and I'd better start coding again so I can be up to the challenge and get at least half as amazing as I see you are.

edit: quite interesting to read her write

Back in 2007 or so, I was using a DS for tons of stuff and I always wanted to make my own homebrew for it, but I wasn't a good enough programmer back then. I am now, but it's probably a bit late for some of those projects to feel worth making to me, at least for the DS.



Tuesday, May 24, 2022

Flop ...

Aaw. un câble de portable trop tendu, et j'ai toutes les prises de mon bureau-à-NUC qui se retrouvent sans courant. j'avais justement bien besoin d'un contretemps comme ça pour me remettre à bilouter, tiens.


(et comme de bien entendu, impossible d'avoir un professionnel qui réponde à mes appels au secours :-/ )

Wednesday, May 11, 2022

freemove ou pas

Bon, le week-end était bien chargé et la semaine qui commence risque d'être du même accabit, mais j'avais quand même trouvé le temps de modifier la configuration de runMe pour corriger l'affichage des sprites 32x16 et du même coup pouvoir utiliser InspectorWidget convenablement. Il est temps que je trouve pourquoi les carapaces de Scorpeye ne font pas demi-tour quand elles rencontrent un mur.

Et on dirait bien qu'une des raisons, c'est que j'ai utilisé pour cet état-là le contrôleur "freemove". (oui. encore;) Et freemove n'a pas le code C++ qu'il faut pour 'rapporter' la vitesse à laquelle on se déplaçait au moment où une collision avec le terrain a empéché un déplacement d'avoir lieu. Or c'est cette valeur qu'il faut utiliser pour faire le demi-tour.

Despite a week-end with a good deal of events, I managed to fix runME so that it could too display 32x16 pixels sprites properly. That unlocked the use of InspectorWidget to find out why scorpeye shells won't bounce when they hit a wall.

Apparently, the core reason for that is that the GobFreemoveController I use for sliding shells is unable to tell at what speed it was moving when there had been an impact with the wall. As a consequence, the script handling state transitions cannot properly program the new speed. And yes, that is very similar to an issue I've had with 'swimming' state for Bilou not so long ago. That sounds like I should refactor something so more state controllers can report impact speed...

Bref, soit un contrôleur comme 'walker' ferait l'affaire, soit il faut que je prévoie quelque-chose d'autre. peut-être que 'sauver la vitesse actuelle si le déplacement en cours n'est plus possible' devrait en soi être un contrôleur autonome dans la chaîne ?

Ou je met une vitesse 'hard-codée' pour l'instant ?
 

Monday, April 25, 2022

Silence, on tourne ...

 J'ai repris un tour de Harry Potter et les méthodes de la rationalité. Dès le 1er chapitre, j'avais envie de le faire connaître, mais les gens qui ont le temps de tourner les pages ne sont pas légion autour de moi. Par contre un audio book, ça a l'air plus commun. En particulier pour mon frangin.

Du coup, c'est logique que je lui chipe son enregistreur Zoom. Evidemment, il y a déjà des enregistrement de l'excellentissime version originale. Ici, je m'attaque à la traduction française, en réécrivant des p'tits bouts à gauche ou à droite pour avoir un rhytme qui me plaît mieux.

J'ai encore du chemin avant les Sparkling Unicorn Princess, mais on devrait voir débarquer Drago d'ici un week-end ou deux.

Lucky you, English speakers. Harry Potter and the Methods of Rationality reads so well. But for most of my family, reading a novel in English is far beyond their level. And well, there is a translation in French, but every here and there, you stumble upon some sentence that sounds awkward, or not like something someone would have said. The meaning is almost always preserved, but the rhythm is lost. Can I do better ?

(tout ça ne booste pas la vitesse de développement de Bilou's Dreamland, mais que voulez-vous: il faut maintenir son équilibre psychosophique aussi, non ? ;)

PS: pour le chapitre suivant, il faut obligatoirement que je prépare un faux-guru-meditation-screen sur le thème "Fundamental Attribution Error"

PPS: on dirait bien que hpmor est en 'creative common' ... ça va plaire à mon frangin, ça.

PPPS: la conversion en .mpeg marche moins bien pour ces derniers épisodes. 

ffmpeg -loop 1 -r 2 -i Downloads/hp-stairs.jpeg -i Documents/hpmor12.mp3 -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -movflags faststart -pix_fmt yuv420p hpmor12.mkv

Behaviour edition on DS. ?


I'd like to be able to edit state machines (for Bilou and monsters) on the Nintendo DS itself. That'd be the pinnacle of on-the-road game making. There's a significant drawback to address before I can do that, though: usable state machine scripts currently heavily rely on GCC pre-processor to turn into engine-compatible text. Most of it is just providing nicknames for things that the engine solely knows as numerical identifiers.

So I'd need at least a sort of token-parser that can handle some of the substitutions on the DS itself. Both for potential Behavour Editor on DS and for runMe. Only the compiled .nds that embed the game would still use PC-pre-processed scripts (and see only numbers).

I've been toying with that idea summers ago, digitized and kept-as-draft the best part of it for seasons. It's not yet time I start implementing it (I don't think so, at least. It's irrelevant to the 'dreamland' effort), but it may be time I stop being silent about it...