devolution

Author Topic: General Discussion  (Read 3816221 times)

0 Members and 13 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9450 on: February 14, 2017, 01:41:41 PM »
Ok, we need to replace all simple recolors, they are not gonna work with webms.
I added a new darkness effect, and looks like there is an issue with webm-based effects. Different skills want me to assign webm in different places, or give ctd.

Spells want it in core.rpy:
Code: [Select]
                elif type == "on_darkness":
                    be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.7
                    size = (int(target.besprite_size[0]*1.5), int(target.besprite_size[1]*1.5))
                    what = Fixed(target.besprite, Transform(be_dark_mask, size=size, offset=(-30, -50)))
                    t = self.target_sprite_damage_effect.get("duration", 1)
                    at_list=[fade_from_to_with_easeout(start_val=1.0, end_val=0.2, t=t)]
And P2P skills want it in assets.rpy:
Code: [Select]
init -1:
...
    python:
        be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.
You can see them both in the last push. Once I remove one of them, corresponding BE functions cannot find it any longer and give ctd.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9451 on: February 14, 2017, 02:16:49 PM »
You can see them both in the last push. Once I remove one of them, corresponding BE functions cannot find it any longer and give ctd.

What skills? I don't think that we even have darkness p2p skill.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9452 on: February 14, 2017, 02:18:14 PM »
Midnight Arrow.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9453 on: February 14, 2017, 02:20:32 PM »
Midnight Arrow.

I've commented out code from python block in the init and there are no ctd with Midnight Arrow. These effects are drawn from one place, there should be no need for redefining them.

Did you try out my proof of concept from earlier post? I'll throw it into pytfall to use with some fire animation so we can see what it looks like, hold on...

Edit: Pull and try Firaja. Keep in mind that those were randomly picked colors.
« Last Edit: February 14, 2017, 02:40:12 PM by Xela »
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9454 on: February 14, 2017, 02:59:15 PM »
Ok, I pushed again. There was a minor error that crashed the game when exiting BE.

After you check out the conceptual fire thing, change this:
Code: [Select]
                elif type == "new_fire":
                    what = AlphaBlend(Transform(target.besprite, alpha=.8), target.besprite, damage_color(*target.besprite_size), alpha=True)
                    # what = AlphaBlend(Transform(target.besprite, alpha=.8), target.besprite, Transform("fire_mask", size=target.besprite_size), alpha=True)

to

Code: [Select]
                elif type == "new_fire":
                    # what = AlphaBlend(Transform(target.besprite, alpha=.8), target.besprite, damage_color(*target.besprite_size), alpha=True)
                    what = AlphaBlend(Transform(target.besprite, alpha=.8), target.besprite, Transform("fire_mask", size=target.besprite_size), alpha=True)

And check it out :D This one used out "fire_mask" to overlay all sprites!
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9455 on: February 14, 2017, 03:04:38 PM »
Check our Darkra... Itachi amaterasu all the way :)
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9456 on: February 15, 2017, 02:55:37 AM »
Can't pull right now, will check it later.

There are a few issues with the damage effect which places something on the target sprite without changing the sprite itself. I think it was one of the first damage effects you coded. The darkness damage effect from yesterday is also based on it.
Code: [Select]
                    size = (int(target.besprite_size[0]*1.5), int(target.besprite_size[1]*1.5))
                    what = Fixed(target.besprite, Transform("content/gfx/be/frozen_2.png", size=size, offset=(-30, -50)))
                    t = self.target_sprite_damage_effect.get("duration", 1)
                    at_list=[fade_from_to_with_easeout(start_val=1.0, end_val=0.2, t=t)]

1) It tries to show the damage effect only inside the mob sprite. Most mobs have square sprites, but most characters have rather thin sprites. It's mostly ok (but not perfect) for the static "frozen" effect which shows a simple png, but it twists terribly webms when used by mobs against MC team because it doesn't care about keeping proportions.

It should be based on sprite size, but not limited by it, because it breaks webms immediately.

2) Static offset doesn't seem reliable for all cases. I tried to replace it by proper align, but the animation just doesn't work with it. Anchors work, but I wonder if they will be any better for different cases than offsets.
« Last Edit: February 15, 2017, 03:10:11 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9457 on: February 15, 2017, 04:14:58 AM »
I need attack names and aiming instructions (who tries to waste who). It's difficult to figure out the problem otherwise.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9458 on: February 15, 2017, 05:21:12 AM »
For darkness, it's one of simple darkness spells, like dark or darkra, vs default hero team in BE testing mode.

For ice, it's for example Big Ice Break weapon skill, also against MC party.
The issue with ice is especially weird: Blizzarja spell also uses "frozen" damage effect, and works properly. But Big Ice Break skill for some reason resizes the png sprite to fit into target sprite, even though their code is almost the same.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9459 on: February 15, 2017, 06:33:47 AM »
I don't understand what your new darkness effect is supposed to do, it looks like an extra attack.

Ice thing you don't like cause it resizes the overlay sprite too aggressively?

Edit:
For ice, it's for example Big Ice Break weapon skill, also against MC party.
The issue with ice is especially weird: Blizzarja spell also uses "frozen" damage effect, and works properly. But Big Ice Break skill for some reason resizes the png sprite to fit into target sprite, even though their code is almost the same.

Best I can tell they both resized in exactly the same way and look pretty good.
« Last Edit: February 15, 2017, 06:40:20 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9460 on: February 15, 2017, 07:36:53 AM »
I don't understand what your new darkness effect is supposed to do, it looks like an extra attack.
Something like the effect which you added to show whose turn is it atm. Like an aura of energy swarming around the target feet. Current resizing works much worse for small webms, so it stopped me from figuring out and setting required offset to make it look like an aura.

Best I can tell they both resized in exactly the same way and look pretty good.
You right, I was confused by massive blizzarja animation around the target, so it felt like png is bigger too.

But the issue with resizing remains. I attached to this port two small screenshots to show the deference in size for sprites.
For thin sprites it already looks like an icicle, and there could be even thinner sprites.

It looks ok for png picture, but it breaks small webms. For them resizing should keep proportions.

As for the offset part, it's the only damage effect based on offset. If we'll even have nonstandard big sprites - like dragons - it might not work for them properly, unlike aligns.
« Last Edit: February 15, 2017, 07:58:06 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9461 on: February 15, 2017, 11:43:38 AM »
I've commented out code from python block in the init and there are no ctd with Midnight Arrow. These effects are drawn from one place, there should be no need for redefining them.
I think I confused two dark effects yesterday, we have three different ones  :D

But first of all, why do I have to define it manually to avoid ctds if it's already located in the autowebm folder, which should automatically define it? Is there no way to avoid it?

Did you try out my proof of concept from earlier post? I'll throw it into pytfall to use with some fire animation so we can see what it looks like, hold on...

Edit: Pull and try Firaja. Keep in mind that those were randomly picked colors.
Yes, looks great. We already have two mask-based fire effects, but it will be perfect for healing effect which used to recolor sprites.
« Last Edit: February 15, 2017, 11:45:41 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9462 on: February 15, 2017, 12:05:16 PM »
Manually define what? I've reread the entire conversation three times and still can't make heads or tails of it. Ice overlay is adapted to the size of the sprite to create covered in ice effect. When we'll have "Freeze" Curse of some kind to make, I want to use the same to stay for a turn or two. I think it's perfectly reasonable to resize it exactly the way it is now.

You need to explain to me what you want your new Dark effect to do exactly, and I'll try to arrange that. Been working on BE in BR for most of the day (fully animated, it feels very different), it's pytfalls time soon.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9463 on: February 15, 2017, 12:30:49 PM »
Code: [Select]
be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.As you can see by its path, it's located in the autowebm folder. So in theory I don't have to define it anywhere in the game as long as I call it by its name, be_dark_mask. That's how all spells/skills webms inside BE worked so far.

And yet if I don't define the webm here, I will get ctd.
Code: [Select]
                elif type.startswith("on_darkness"):
                    be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.
                    size = (int(target.besprite_size[0]*1.5), int(target.besprite_size[1]*1.5))
                    what = Fixed(target.besprite, Transform(be_dark_mask, size=size, offset=(-30, -50)))
                    t = self.target_sprite_damage_effect.get("duration", 1)


As for the new darkness effect, it basically should look like the effect which shows whose turn is it - maybe with different Y offset though.
« Last Edit: February 15, 2017, 12:33:53 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9464 on: February 15, 2017, 12:39:42 PM »
Code: [Select]
be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.As you can see by its path, it's located in the autowebm folder. So in theory I don't have to define it anywhere in the game as long as I call it by its name, be_dark_mask. That's how all spells/skills webms inside BE worked so far.

And yet if I don't define the webm here, I will get ctd.
Code: [Select]
                elif type.startswith("on_darkness"):
                    be_dark_mask = Transform(Movie(channel="main_gfx_bow", play="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/movie.webm", mask="content/gfx/autowebm/be_dark_mask inf main_gfx_bow/mask.webm"), zoom=1.2, alpha=0.
                    size = (int(target.besprite_size[0]*1.5), int(target.besprite_size[1]*1.5))
                    what = Fixed(target.besprite, Transform(be_dark_mask, size=size, offset=(-30, -50)))
                    t = self.target_sprite_damage_effect.get("duration", 1)


I don't buy that, you're prolly not using it right. If you predefine the image manually or automatically, this line:
Code: [Select]
what = Fixed(target.besprite, Transform(be_dark_mask, size=size, offset=(-30, -50)))
should be:

what = Fixed(target.besprite, Transform("be_dark_mask", size=size, offset=(-30, -50)))

and it should work. There is no other good way of doing it. You way is better because you're using a different channel here from what we normally do and that can be very important, but it would not cause CTD, just graphical artifacts.

As for the new darkness effect, it basically should look like the effect which shows whose turn is it - maybe with different Y offset though.

Ok, I'll take a look. What is it currently called and what do you use for testcase?
Like what we're doing?