Tuesday, January 21, 2025

Have you tried melonDS ?

Have you tried using melonDS for DLDI-based homebrew? It's my personal preference, it emulates the DSi too, and it's getting GDB support for debugging soon (though not yet). (@asie.pl) [...]
It's free software (doesn't even require any dumps for DS mode, though hardware dumps are required for DSi emulation) and I use Linux exclusively.

This post was a draft last updated on 20th November ... Asie's comment was from March 2023, after I tried to get my demo running on 3DS and believed it wouldn't be hard to fix DLDI support in desmume... (but I was wrong)

And today I just notice that I do have "hobby/melonDS" folder in my fresh-Debian laptop. 111MiB of cmake & dependencies later, I can rebuild the emulator (got hell lots of warnings, but it did build) and managed to make it load and play the current "Three Rooms of Dreamland" demo.

It has polished UI for setting keyboard/joystick, it has much more stable sound output than desmume had and did load my files properly, despite I couldn't do it from the command line yet (EFS files wouldn't be found unless I use the menu to load the .nds)

It has a nice "DLDI" entry indeed, where you can define some appealing "sync SD to folder" ... but I'll have to read more documentation if I want to make any use of that. If it can let me use Level Editor for DS straight on files hosted on my laptop, that could excuse the lack of a GDB stub ...

No fancy VRAM preview or any similar power-emulator as those I've seen on 8-bit and 16-bit console emulator either ... sigh.

Sunday, January 19, 2025

Debian pour Icebear

Une surprise 2025 dont je me serais bien passé: le laptop du bureau ne fonctionne plus avec le lecteur de cartes d'identité belges ... selon jigé, ça marcherait mieux avec Edge ... très peu pour moi. Le couac, c'est que ma bonne vieille distribution ubuntu ne sait plus faire les mises à jour non plus. J'ai donc passé un moment à essayer de faire tourner d'autres distro dessus, à commencer par une RockyLinux (j'avais déjà l'iso) qui n'a pas réussi à booter, puis la LTS d'Ubunutu (24.04) pour laquelle j'ai dû chipoter (boot UEFI obligatoire) mais qui n'a pas su utiliser eid.belgium.be une fois tous les package installés. La raison ? les gens de chez Ubuntu sont fan du système "snap" et firefox se retrouve maintenant lui aussi dans un "snap".

Bon, j'avoue que moi, je ne suis pas franchement fan de snap. L'idée était sympa quand il s'agissait de recevoir un jeu et ses dépendances sans venir mettre des crochets dans toutes les bibliothèques du système, mais quand on retrouve gnome-dans-un-snap ou firefox-dans-un-snap, franchement, pour la gestion du disque sur un système pas si tera que ça (typiquement je limite la partition système à 42Go), ça devient vite pénible. Et là, en plus, ça rend une fonction primaire du système (remplir la déclaration d'impôts) impossible, donc ciao.

Où trouver une distribution Ubuntu-like qui n'utilise pas snap ? Debian, tout simplement.

Alors pour les non-pingouins d'entre vous que le paragraphe sur snap n'a pas fait fuir, debian c'est la distribution sur laquelle Ubuntu s'appuie. En gros, des fans de debian ont un jour voulu faire en sorte que leur linux soit plus accessible, capable de lire des mp3 nativement, avec une configuration plus simple de la connexion internet, etc. et ils ont lancé Ubuntu avec tout ce qu'ils avaient préparé.

Et donc, quand on vient de lancer une version démo (on dit "une live", nous autres ^^") d'Ubuntu et qu'on lance juste derrière une version démo de Debian 12, il y a quelques surprises ... comme "ehM pouraoui je suis en qwertyM" parce que le module de boot ne prend pas son temps à vous poser des questions avant de débarquer sur le bureau. Ou "Eh ? comment, perdu.com n'est pas joignable ? " pour me rendre compte que "ah bah oui, le wifi n'est pas configuré ^^" ... de nouveau, ça faisait partie des questions préliminaires avec Ubuntu.

Mais, youpie, le package de support des cartes d'identités, lui, marche bien, y compris dans firefox. Enlightenment et terminology sont disponibles et je pense bien avoir pris un package "mate" plutôt que gnome. Alors qu'est-ce que je fais encore sous ouinouin plutôt que de prendre en main ma nouvelle debian ? Eh bien, c'est que le boot system du laptop, ce n'est pas UEFI de base. Et j'aimerais le garder en dual boot. Et il y a une commande pour grub (1) qui devrait me permettre de détecter la debian et l'ajouter depuis ubuntu ... je voulais vérifier ce que c'était avant de lancer update-grub en aveugle (qui n'était évidemment pas dans la liste des grub* que je testais puisque ... lol ... il *finit* par grub là où tous les autres outils *commencent* par grub ^^"

edit: voilà: ça boote. Maintenant, copier les signon.json et autre key4.db pour que le nouveau profil firefox puisse avoir mes identités, copier le répertoire .e pour récupérer ma config enlightenment ... forcer un peu l'affichage de firefox pour que ce soit supportable

edit+: bon, si je veux pouvoir faire tourner mon bon vieux desmume de référence, je vais devoir suivre mes instructions pour ajouter le support 32-bit ...

Saturday, January 18, 2025

Hydrocity pixel waterjets

Bin ça! Il y avait un parfait exemple de jet d'eau dans un jeu 16-bit dans la série Sonic, et j'étais complètement passé à côté! Heureusement qu'il y avait Tim pour poster une photo de son Anbernic Arc-S pour me remettre sur le droit chemin!

L'effet est plutôt convainquant, plutôt utilisé comme script de transition/narration entre 2 phases que véritablement comme un élément de gameplay interactif, mais ça reste pertinent. Il reste un peu moins de 2 secondes à l'écran avant que Sonic ne soit propulsé plus haut tandis que le jet redescend et sort du cadre.

Last year, I was looking for 16-bit references of a water jet and I couldn't find anything satisfying, but it seems like I completely missed those location-transition-events in Hydrocity Zone act 1 of Sonic 3. I hope you'll excuse me: my memories of Hydrocity essentially resume to "this place hates me". Trying to keep enough air in Labyrinth Zone wasn't easy, but it felt possible and a sort of appropriate final challenge in the game. You'll completely miss the water jets if you're watching a speedrun or any competent player as well: they're sole purpose is to bring back upwards player who failed to stay on the high dry path.

ça se passe dans Hydrocity, la deuxième et parfaitement imbuvable zone de Sonic 3. Il se trouve que j'ai le jeu sur une cartouche combo Sonic Genesis 2D pour NDS et j'ai donc fait l'effort de retourner jusque dans Hydrocity, mais sans encore arriver jusqu'au jet vertical pour me rendre compte par moi-même.

Il faudra pour ça, une fois le jet horizontal passé, que je m'aventure dans les profondeurs jusqu'au couloir avec les hélices qui nous poussent vers la droite. ça malgré les pics, les poissons mal foutu et les tapis qui nous ramènent en arrière juste quand on est sur le point de pouvoir reprendre de l'air ... C'est beau le rétro, mais là, c'est quand même pas loin de l'abus vu qu'on est encore qu'au 3eme stage du jeu ... 

For the era, they seem to work surprisingly well. They only need 4-colors palette cycling, and are even somewhat light on tiles consumption, with a 32x32 pixels pattern (plus mirroring) for the trunk and 32x48 for the top (and even one 16x16 block of the top being shared with the trunk). You've got one big arc per pattern, which clearly works better than the repeated pattern of Mc Donald's Treasure Land Adventure. (although, this is not the worst water animation in that game ...). Note too how the top part uses the raster in opposite direction so that it feels that water is falling down there. (yeah, obvious, I know)

Bon, mais trève de rouspétances, regardons ces pixels. l'artiste s'est concentré sur un motif d'arc répété avec un dégradé plein de tramage (plutôt une bonne idée sur la technologie CRT de l'époque) pour finir par un arc de cercle plus arrondi où le dégradé est mis à contre-sens.

Le tout est évidemment animé par palette cycling ... ça vaut mieux vu la surface à prendre en compte. A noter aussi la grandeur du motif. On a pas essayé ici de faire de petites vagues répétées: la partie "champignon" est constituée d'un seul dégradé ! Du coup, c'est bien l'effet "mouvement" qui prévaut sur l'effet "clignottement".

The pattern is rather noisy, but that shouldn't be a big issue for the CRT screens it is designed to. Given the size of each area, the motion illusion prevails over the flashiness. At least when played at 75% of the intended 60fps. Maybe it also worked at 60fps on CRT screens (we had 50Hz here, so who knows ...). 

All I can tell you is that it took me dedication to bring Sonic in the proper spot(s) of Hydrocity on my Sega collection for Nintendo DS cartridge and on the 3DS LCD screen the result was ... meh ... mostly getting a averaged blue tint all over the jet, the pixels staying in place for most of the 2 seconds where we see the jet, with my brain saying "ah! I spot the pattern!" rather than "wah! That's blasting fast!".

So well, it was a nice reference at the time. I mostly works because you're taken off-screen once the jet should retract and because it's a one-time event rather than what I need (a trigger-on-demand event) or what Mc Donalds and Bubsy games needed: an platform going up and down continuously.

J'affronte donc une deuxième fois le niveau, fort de la carte mémorisée ... il y a surtout des zig-zag imposés à toute allure entre les deux jets d'eau du niveau 1 (aucun dans le niveau 2, qui a besoin de ces tiles-là pour nous mettre plus de toboggans). Je peste contre les poissons-pirhaña qui m'empêchent de sauter pendant plusieurs secondes alors que les bulles d'air ne sont suffisamment grande pour respirer qu'à partir d'un sonic du sol ... je choppe un bouclier-bulle ... je le perd ... je suis propulsé une 2eme fois.

Eh bin, les gars, l'effet "mouvement", à 60fps sur un écran LCD, il est un peu perdu dans la bagarre ... on voit juste une trombe bleue d'une couleur plus ou moins uniforme tellement ça va vite. Un peu déçu, je vous l'avoue.

Saturday, January 11, 2025

Dreamland checkpoint

"I can roughly work 1 maybe 2 days on Bilou every time the kids have holidays" was my answer to my step-brother when he asked whether I was still working on my game. So where are we (compared to 2024) ? 

Let's check some boxes, to see that. Note how I realised that I shouldn't try to include that level with 3D books : that would require new tools development and we're now past that kind of change.

Some of the box have been shifted from cyan to green: that means they're still things that will require more significant work to be done, but they're not *mandatory* for a first playable version of the level they're featured in.

And I just read a note I made to my today's self: 

There'd be some fixing on the old maps, possibly some keys or switches by NPCs, but that shouldn't be as ambitious as The Big Green Zone Relooking I've been talking about 3 years ago. The aim would rather to make the game more fun to play, and clearly not to get rid of any magic door.

The geyser thing is almost a "big relooking" thing... "push and flood the level" clearly was. It shouldn't stop me from trying the level.

Cosmic Boll by Yoritoshi

There was a twitter account I held for later while leaving the network: it had a yellow ball avatar, and I remembered a few nice exchanges with somebody doing a platformer featuring a yellow ball, but I couldn't find any track of those exchanges. I ran out of keywords idea to grep my tweet.js and blog.xml ... I asked my contacts for help, but I still wouldn't find it.

cosmicboll animated screenshot showing waterfall pushing you down
But eventually, in the "more tweets" online document I've been crafting, I found back the picture I wanted, where cosmicboll (and not bowl or ball) encounters a waterfall and the water pushes it (him?) down, increasing gravity. Something I don't have yet for my own waterfall and that definitely looks and feel fun.

The game is not from that person with the yellow ball avatar but from the Spanish-speaking developer Yoritoshi, who has been working on the game since at least 2018.

The small snippet I have here may give you the feeling that there is some Sonic legacy in that title, and likely Yoritoshi's videos will convince you even further, since some of the sound effects featured are raw samples from the megadrive titles.

Petit résumé pour mes lecteurs francophones: La balle jaune dans le gif animé ci-dessus est le personnage principal du jeu "cosmic boll" de Yoritoshi, dont j'ai suivi de loin le développement au fil des tweets. On aurait presque pu appeler le jeu cosmic Brawl, vu l'importance que les combos et la variété des attaques dans ce qui aurait pu aussi non passer pour un Sonic-like. Le jeu est téléchargeable en version Windows sur le site itch.io du dévelopeur et je n'y ai pas encore joué.

Avant les premiers tweets présentant ce jeu-là, l'auteur travaillait sur des fangames Sonic, bien intégré dans la communauté, étendant le travail d'un certain "LakeFeperd" et participant à la convention SAGE régulièrement.

It is even stronger when you get a look at the level editor screenshots that Yoritoshi published: there are ramps, there are loops and all ... There are some explanation in the earliest tweet using the #cosmicboll tag:

Began to add enemy characters of my own to replace the dummy from LakeFeperd's engine with, but I hope CF2.5 doesn't pull any nonsense on me when I add hitboxes to their attacks. (Jan 20, 2018)

LakeFeperd's own video often mentions SAGE event, and if we dig deeper than the video about "Spark the Jester", we see that they are about Sonic fan games... So yeah, people gather to show each other their Sonic fan games (and likely fanart and play sonic games and plenty of blue things), there are Sonic-targetted game engines for many different game construction kits, and Yoritoshi was already doing that in 2012.

But Cosmic Boll is not just a Sonic clone. Actually, the gameplay does not feel that much like Sonic. The amount of attacks you have at your disposal to dispatch foes is just impressive. If you believed "Kirby Fighter mode" has a large range of attack, Cosmic likely features 2 or 3 times as much moves. The amount of enemies per wave and the hitpoints per enemy is clearly designed to make the fights a key moment of the game and feel overpowered. And then there are "orbs" you can collect which will e.g let you turn into a fireball when you dash or shoot firewaves when you punch.

And there apparently also are special gadgets that allows you to make surprizing things like sizing down ennemies, althought I have to admit I haven't understood everything about that.

Saturday, January 04, 2025

Et bash!

Et bang! Petite scéance de gamedev avec mon fiston ce soir, pendant que nos dames nous ont laissé la maison pour nous tous seuls ... je venais de terminer d'ajuster le déplacement de Bangbash, il avait envie de pouvoir *interagir* avec Bangbash. J'avais déjà des animations esquissées, le temps de produire l'animation, d'ajuster les coordonnées des boîtes de collisions et de transférer tout ça... il a un peu d'expérience en Scratch et je venais de lui proposer de jeter un oeil à mon agenda/journal/42 pour voir un peu ce qu'il comprenait du GobScript (pas si simple) et de lui expliquer un peu à quoi tout ça servait...

There. Now bangbash is bashing too ... That was a "requirement" from my son, and tonight was dad-and-son evening, so after suggesting he could read the 'gobscript' entries of my notebook (bujo?), after cleaning up animations with AnimEDS and my Nintendo DS (and telling him that, yes, those are programs I wrote myself too, and no, that Nintendo DS is not modified in any way, only the game cartridge it uses is special), came the time to put that together on the PC.

Bon, il est resté plutôt sagement sur la chaise à côté de moi tandis que j'ajoutais un état $BASH ici, puis une zone de collision pour que l'état assomme Bilou, puis que je rallonge l'animation "assommé" le temps que Bangbash fasse demi-tour (histoire d'éviter le pilonnage systématique), etc. jusqu'à réactiver un dumblador dans le niveau démo et qu'on puisse se débarasser de bangbash en lui lançant le taille-crayon.

Il me restera à rendre bangbash solide et faire en sorte qu'il blesse Bilou pendant son saut dans les 2 sens et puis finaliser les graphismes de l'attaque et de Bilou assommé...

(petit moment de fierté au passage quand mon fiston réalise que les outils qui me permettent d'éditer les animations sur la nintendo DS, c'est aussi moi qui les ai programmés ^^)

He has been pretty attentive and quiet while we were going through the steps of 'animation plays, but nothing happens' and 'will you stop bashing, now ?' ... and of course he then asked for the ability to dispatch bangbash with a blador, which wasn't too tricky to do either. Bed time, son: making sure we cannot simply zoom in front of Bangbash will be for another evening ;)

PicoDriller fait des vagues.

A côté de ses productions principales (lunark, castaway), Johan Vinet nous a aussi proposé un petit fangame sur pico8 d'un jeu où il faut creuser plus vite que son ombre, sorte de croisement entre Tetris et Boulder Dash.

Je dit "petit", mais la qualité du gameplay et de l'habillage est tout à fait remarquable. C'eut été un homebrew sur NintendoDS, vous pouvez être certains que je serais resté scotché dessus!

Mais ce qui m'a frappé au point de le reprendre dans ma récapitulation de 2023, c'est la vague géante de l'écran titre. Monochrome, avec au plus un creux à l'écran, elle est tout à fait dans les contraintes techniques de la SNES: on coderait alors les vagues en reprogrammant les "window" à grand coup de HDMA, et ça débloquerait le principal frein à une adaptation de SchoolRush sur la reine des 16 bit ... 

PicoDriller is a fun little Pico8 game, somehow a crossing over Tetris and Boulder Dash, and it would definitely deserve a complete review of its art and gameplay mechanics. And unfortunately, I'm not going to do that today. Sorry Johan (he's one of the Pico Driller author, and I've been playing some of his other games). No, today, I'll just discuss the title screen of PicoDriller and its very convincing big waves.  

Alors autant vous dire qu'à plusieurs reprises au cours de 2024, je me suis posé la question "mais comment savoir quelles valeurs donner, ligne par ligne, à Wstart et Wend pour qu'ils définissent la zone sous une sinusoïde ? et comment coder ça efficacement ? Et est-ce que ça tiendrait dans le budget CPU d'une frame SNES ?"

Et pour bien commencer 2025, je me suis dit "eh, mais si on partait du sommet de la vague et qu'on suivait la pente pour élargir la zone noire masquant l'image ?  Après tout, la dérivée de sinus, c'est le cosinus et le cosinus, c'est le sinus déphasé d'un quart de tour !

The core reason is School Rush, of course, and how the Super NES couldn't render enough sprites on a single scanline to depict the raising ink in the game. But if you use demomaker tricks with the 'window' feature of the 16-bit queen (using it as 2 horizontal lines whose position and size can be updated on every scanline), you might get a wave moving as smoothly as that in PicoDriller intro, and that might be stunning enough to excuse the lack of additional colors. 

The idea isn't new: it has been teasing me for the whole 2024 year. So with the winter holidays coming again I noted that "well, I could just start with the top-of-sine, at a given position, and widen it according to the slope of the sine at that point, right ?" and then taking my noteboox and starting to scribble trigonometric functions, taking into account that slope of sine is cos, that cos at some point is sine later on the curve and things alike until I thought I had enough to write down a little loop that *should* give all the items needed to render the sine with "just" a pre-computed look up table for cos values.

I had the surprise to see game developer Jayenkai (Blockman and countless other titles) objecting that it might still be too much maths for the SNES hardware, and pointing me towards an online BASIC interpreter with fair documentation of their graphics commands ... He proposed an alternative where quadratic curves are used to emulate sine, and to be honest, the difference isn't that strong unless you're interested by the slope of your sine when it crosses the "horizon line".

Jayenkai (platdude, blockman et tant d'autres) trouvait que ça faisait trop de calculs pour une snes et m'a aiguillé vers un basic-en-ligne pour m'illustrer une approximation quadratique très 6502 ... 

C'était juste ce qu'il me fallait pour tester rapidement le bidule, donc j'ai recodé la génération de la table de lookup (grandement simplifiée par la présence de cos() et arcsin() dans le basic) puis la 'simple' accélération/décélaration de la descente par accumulation, un accès à la lookup table par ligne

Bin je dois dire que ça donne plutôt bien ^_^

But that evaluator (gotojse) was a breath of fresh air, allowing me to toy around and eventually build up a way to render what *I* had in mind as well, proving the concept. Okay, I don't have it animated like in pico driller, but that might come later on ^_^ 

Bon, ce qui fait tout le sel de l'effet de pico driller, c'est avant tout la variation d'amplitude appliquée sur la sinusoïde, qui va jusqu'à en inverser la polarité. Le fait d'avoir doublé l'effet avec une "ombre" est très stylé, mais incompatible avec le hardware SNES que j'envisage de piloter. 

Il me semble aussi que le "niveau 0" monte et descend légèrement au fil du temps suivant une autre sinusoïde. Ce qui serait stylé, ce serait qu'il suive en réalité une sinusoïde de très basse fréquence (moins de 45° par écran), mais ça nécessiterait pas mal de calculs en plus ... pas sûr que je puisse me le permettre ici ...