glitchy add_hex_overlay animation

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

Post Reply
User avatar
ZombieKnight
Posts: 180
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

glitchy add_hex_overlay animation

Post by ZombieKnight »

Hi,
I have an explosion animation, but it's glitchy(sometimes, at some point stops animating for a while); it behaves the same without ~SCALE.

Code: Select all

wesnoth.interface.add_hex_overlay(x, y, {halo="projectiles/fireball-impact-[1~16].png~SCALE(200,300), misc/blank-hex.png:[60*16,999999]"})
Any idea what causes it?
How to make the animation smoother?

I appreciate any help you can provide.
I had saurian in profile before, but I've merged my discord profile with forum one...
white_haired_uncle
Posts: 1230
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: glitchy add_hex_overlay animation

Post by white_haired_uncle »

I have no idea, but that animation is perfect for something else I'm working on. Thanks!
Speak softly, and carry Doombringer.
User avatar
Heindal
Posts: 1361
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: glitchy add_hex_overlay animation

Post by Heindal »

I assume it has something to do with SCALE. As far as I know it is only possible to use overlays and graphics that are 72*72 pixel.
When it gets bigger the graphic glitches.

There are some exceptions, units and terrain can be bigger than 72*72.
See Titan units.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
User avatar
ZombieKnight
Posts: 180
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: glitchy add_hex_overlay animation

Post by ZombieKnight »

XD, enjoy!
I had saurian in profile before, but I've merged my discord profile with forum one...
User avatar
ZombieKnight
Posts: 180
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: glitchy add_hex_overlay animation

Post by ZombieKnight »

Heindal wrote: April 18th, 2024, 5:58 pm I assume it has something to do with SCALE. As far as I know it is only possible to use overlays and graphics that are 72*72 pixel.
When it gets bigger the graphic glitches.
That's quite possible, but it's a core animation and it has 100x150 px by default.
Can I make it more polished somehow?
I had saurian in profile before, but I've merged my discord profile with forum one...
User avatar
ZombieKnight
Posts: 180
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: glitchy add_hex_overlay animation

Post by ZombieKnight »

I mean it's much better when you keep moving with the mouse... why is it so, how to reproduce that thing mouse moving is doing in Lua?
I had saurian in profile before, but I've merged my discord profile with forum one...
User avatar
Ravana
Forum Moderator
Posts: 3020
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: glitchy add_hex_overlay animation

Post by Ravana »

I ran multiple lua wesnoth.interface.add_hex_overlay(42, 23, {halo="projectiles/fireball-impact-[1~16].png~SCALE(200,300):[60*16]"}) over time on same hex and I still dont see anything glitchy.
User avatar
ZombieKnight
Posts: 180
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: glitchy add_hex_overlay animation

Post by ZombieKnight »

According to Sevu, it's caused by something like settings, but he doesn't remember...
Do you have any idea what might cause it? (I've tested on 1.16.3 so maybe something was updated since then)
I had saurian in profile before, but I've merged my discord profile with forum one...
Post Reply