Tuesday, December 14, 2021

And after all ... here's my waterfall

After almost 3 weeks of quarantine, I knew I was going to see my brother again. He stated the new 'release' looked fine, and I wanted him to see the animated version I had in mind. So I did my best to get that done by the end of the week, although this is hardly of any emergency in the not-yet-written list of things to fix in that build. I mean, yeah, the water is more convincing if the falls flow, but we can walk on it anyway, so ...

Premier changement par rapport à la démo téléchargeable: animer la cascade. Ouais, je sais c'est clairement pas le truc le plus prioritaire, mais c'est un projet-hobby, donc la priorité, ça doit rester de se faire plaisir. En plus, je tenais un créneau pour montrer ça à mon frangin, alors autant lui en mettre carrément plein la vue, non ?

I wanted the waterfall not to look like a simple scrolled tile, so instead I scrolled two layers independently, at different speeds. Yeah, I know this is quite cheap. Well, I also gave 'noise' variations in the frames of the fore layer and I intend to add 'wavy' animation to the back layer. That produced something I'm proud of, even though it's far from being perfect. It also has the bonus advantage that I can make characters looks 'in the water' by being between the two layers ^_^.

Comment éviter que la cascade n'ait l'air d'un tapis roulant bleu ? Ma p'tite idée était de jouer sur deux plan, avec deux vitesses de scrolling différentes et deux niveaux de détails différents. à l'avant, c'est "haute fréquence" et vitesse de chute élevée. A l'arrière, "basse fréquence" de détails et vitesse faible. Mais un cycle de 16 pixels pour la face avant, c'était trop court par rapport à l'effet désiré.Qu'à celà ne tienne: il me faut de toutes façons aussi un "pied de chute" où l'eau mousse. Si je garde la mousse sur le demi-bloc du bas, je peux utiliser le demi-bloc du haut pour avoir un cycle de 24 pixels de haut et un pied de 8 sans que le moteur d'animation par blocs de 16x16 n'y trouve à redire.

Les bords, eux, n'existent que dans la face arrière, y compris le dessus de la cascade. ça me fait 45 kB/s à streamer entre la RAM et la VRAM, et la NDS donne l'impression de parfaitement tenir le coup. Pourtant, il se pourrait que j'introduise malgré tout du palette cycling pour la "couche de fond". Bin oui, la je n'ai que de l'eau qui tombe, mais je veux aussi de l'eau qui coule au sol et qui entraîne Bilou avec elle. Et pour la faire couler malgré un dénivelé doux, je vais soit devoir sortir des sprites, soit multiplier le nombre de blocs animés au-delà du raisonnable.

There's a catch remaining though. I have plans for flowing water *on the ground* too, including on sloped ground. With the current setup, I have used 6 animated tiles with 12 to 16 frames each. If I ever try to expand that to ground tiles, I'll quickly blow up my DS resources before I'm half-done with the game I intend to make. I might have to animate all but the foreground layer using palette cycling instead.

No comments: