Recent Posts

Pages: [1] 2 3 ... 10
1
Development / disable spin attack
« Last post by xglichtrapx on July 28, 2022, 02:41:41 AM »
How do you disable the spin attack?
2
Game art & music / Re: Snow flakes
« Last post by kabaiakh on July 21, 2022, 05:25:28 PM »
We want to animate falling snow flakes in the Solarus game engine framework.



The main screen size is 320x240 (QVGA for those from bygone days), traditionally animated using wrapping tiles.

Let's pick up a 32x24 one, because the dimensions (width && height) of one tile must be multiple of 8 under Solarus.
Put it into motion with 24 frames so the animation can loop at 40_ms delay per frame (slow snow, persistence of vision).
We get a 18.432_kpx animation (32*24*24), tiled 10x10 on the screen as shown hereafter.

One small tile
WxH   |   kpx   |   tiling
32x24   |   18.432   |   10x10
     

Preferring something with less -- if not without -- patterns ?
We could generate a more evenly randomized tile and ...
we would replace patterns with a grid or ...
we should try to make one single 320x240 tile.

One big tile
WxH   |   kpx   |   tiling
320x240   |   18432   |   1x1
     

This tile is 1000 times heavier (320*240*240=18432_kpx).
Too large / too tall for Solarus, which prefers the overall size of tiles sets
to be less than 2048 for compatibility reasons.

So, besides getting rid of patterns, we also need to limit pixels overweight in the process.
The good news is both those goals can be reasonably achieved by superimposing
two differently sized tiles so that they conceal each other's patterns.

Two differently sized tiles
WxH   |   kpx   |   tiling
32x40+40x24   |   74.24   |   2x2
     

Let's begin the off-putting underlying theory detailed explanations with a basic layout of two same size tiles.
Each one has its own patterns, we label them and .
When we overlay both, we obtain a new pattern, unrandomly labeled .

1 * tile #1   
1 * tile #2   
overlay   

Not that good once tiled on the screen. We still see patterns.

Tile #1
WxH   |   kpx   |   tiling
24x24   |   13.824   |   13.33x8

   
     Tile #2
WxH   |   kpx   |   tiling
24x24   |   13.824   |   13.33x8

   
     Overlay
WxH   |   kpx   |   tiling
24x24   |   13.824   |   13.33x8

   
If we do the same thing with differently sized tiles as aforementioned, we get something more interesting.
Let's just take a tile of 2 patterns and another one of 3 patterns :

1 * tile #3   
1 * tile #4   
overlay   

The overlay builds a 'meta-tile' comprised of 6 new patterns which then resume their cycling.
Those 6 patterns are built upon only 5: 2 from tile #3 ( and ) plus 3 from tile #4 (, and ).
Arithmetically, 6=lcm(2,3) and 5=2+3 (arrest this man, he talks in maths).
We do not 'see' 3 repeating or 2 repeating but only one larger .

Tile #3
WxH   |   kpx   |   tiling
16x24   |   9.216   |   20x10

   
     Tile #4
WxH   |   kpx   |   tiling
24x24   |   13.824   |   13.33x10

   
     Overlay
WxH   |   kpx   |   tiling
48x24   |   23.040   |   6.66x10

   
With this second tile example, the meta-tile is 48x24 (from a 16x24 tile and a 24x24 one).
Tiny compared to 320x240 but the bigger the meta-tile, the fewer patterns.
So what would be the best ratio for our screen (smallest tiles for biggest patterns-concealing) ?

That would be scann'd and dimensioj-kalkuli is here to enumerate all the possible combinations;
among which two in particular attract attention.

   |    meta-tile    |    tile set    |    W / H    |    H / W    |   
sizes A    |    160    |    1280    |    40    |    32    |   
sizes B    |    120    |    960    |    40    |    24    |   

Since 32 is 1/10 of the screen's width and 24, 1/10 of its height,
let 32 be the width for tile #5 and 24, the height for tile #6.
We get a 160x120 meta-tile. 1/4 of the screen. Shiny.

There is also another scheme: 40x32 + 24x40.
Unfortunately, 40*32*32+24*40*40 = 79.36_kpx when 32*40*40+40*24*24 = 74.24_kpx only !

Now is time for kahelo-animi to (slowly) generate images magically.

Tile #5
WxH   |   kpx   |   tiling
32x40   |   51.2   |   10x6

   
     Tile #6
WxH   |   kpx   |   tiling
40x24   |   23.04   |   8x10

   
     Overlay
WxH   |   kpx   |   tiling
32x40+40x24   |   74.24   |   2x2

   
Compared with the first two one-tile solutions, lightest * 4 but heaviest / 250.
Totally worth it, as it prevents eye bleeding. Judge yourself.

One small tile
WxH   |   kpx   |   tiling
32x24   |   18.432   |   10x10

   
     Two differently sized tiles
WxH   |   kpx   |   tiling
32x40+40x24   |   74.24   |   2x2

   
     One big tile
WxH   |   kpx   |   tiling
320x240   |   18432   |   1x1

   
Remains to be applied to Solarus:

           
My God !
It's full of stars.
And, voila ! solarus-vetero.tiles.png solarus-vetero.dat
Crystal bits of snowflakes all around my head and in the wind.

The scenery provides its own patterns hiding as shown below
(customary animated GIF everywhere for compatibility).



Foreground flakes
Are sparse, scattered and fast.
Could also be big and bright.
     

Background flakes
Are numerous, tight and slow.
Could also be tiny and dark.

Of course, the principle is not tied to two tiles top, it would work well with way more.
Needless to say, laziness can grasp even the most motivated ...

Similar to the context-free chaos theory, this method should be quite ecumenical
and could theologically theoretically be applied to animations other than snow: mist, rain, swell  ...
It might as well already exists, just like this ancient 'differential scrolling' was indeed a mere parallax.
3
Game art & music / Re: Snow flakes
« Last post by kabaiakh on July 21, 2022, 12:36:06 AM »
Be reassured, I ain't no ser spammer.
For demonstrating purpose, I made use of CSS to overlay images.

Thank you for your exlpainations, this thread won't rot unanswered.
I'm working on a conversion into something that can be displayed here.
4
Your projects / Re: Minish Cap Maps in Solarus
« Last post by Max on July 20, 2022, 02:07:09 AM »
Looks really cool! Nice work : )

Most people don't post here that often haha, so you're in good company. Almost all Solarus activity is on the discord. Although there's probably some usefulness to having forums, since they work as searchable archives of scripts and stuff that are posted.

I don't think you'll be able to use the tilesets for animated water, if they still are like they were when I last looked at them. You'll probably need to set up new water yourself. Maybe check the Spriter's Resource for tiles? Something I've done at times is looked at Youtube videos of Minish Cap, paused them, and stepped through from by frame (usng the < and > keys) to check each frame of an animation. Maybe you can recreate Minish Cap's tiles that way. Good luck!
5
Game art & music / Re: Snow flakes
« Last post by Max on July 20, 2022, 02:00:47 AM »
Hi! The forum get some suspicious spam posts sometimes and this looks a lot like one! Sorry if it's not.

However, you ought to explain more what your link is pointed to and what you want feedback about.
6
Game art & music / Snow flakes
« Last post by kabaiakh on July 19, 2022, 09:01:21 PM »
Hi.

I've recently finished some work of mine and I thought some of you might be interested in.
AFAIC, I would appreciate feedbacks: understandability and/or prior existence of the technique, optimisations for weight at run time within the Solarus engine, incorrect spelling ...

Enjoy ! ;–)

https://kabaiakh.pagesperso-orange.fr/solarus-vetero/
7
Your projects / Re: Minish Cap Maps in Solarus
« Last post by Dianthus on July 17, 2022, 05:41:03 PM »
Hi guys. Just wanted to post that i am still around and working on the project. I just dont post that often. I am trying to finish minish woods. Still no idea how to do the water. Cant figure out the animations.

8
Game art & music / Re: Legend Of Zelda Link's Awakening tile set
« Last post by suffixdreadful on June 18, 2022, 06:21:33 AM »
The old and aging animatronics are joined by a new cast of characters
9
Development / How to buy items
« Last post by CopperKatana on June 13, 2022, 02:02:59 AM »
Hello, I am trying to program a shop in my game. But I think I'm not quite understanding  how to implement buying things. I watched the official tutorial on Shops and there was a dialog called _shops.question, which says something like:

Price is $v rupees.
$? Buy
$? Don't Buy

And the engine should fill in the item's price in the $v part, and recognize the "Buy/Don't Buy" part as selectable options. While the price of the item is properly displayed in my game, these options are just displayed as text with the $? symbols. The engine does not recognize them as choices.
How can I make it so that these are choices, and how do I control what effect each choice has?
10
General discussion / My new YouTube channel, 100% fangames content
« Last post by Zeldo on June 04, 2022, 09:49:04 AM »
Hello everybody :)

I created a new YouTube channel ! It's ZeldoGames and you'll find some fangames content and my personnal creations on it.
Here's the link to the channel: https://www.youtube.com/channel/UCogiQaYMY_EvxR0TCUsxgbw

The videos are in French but I added English subtitles for you ;)

Thank you :D
Pages: [1] 2 3 ... 10