Transforming elements

Hi @pspeed

Was wondering if there’s any way to define elements that transform. I was thinking of using Lemur elements to display streaks/combos/criticial hits in the scene, but I need them to fade/grow in size/etc.

Would it be a good idea to create entities that contained a ui-component + a decay-component (like the one you used in Asteroid Panic). My decaystate could then simply see the decay-component and set the alpha on the ui-component.

If I read you right, it sounds ok. I will be doing something similar in the “Monkey Trap” sample that I’m writing.

I will be using it both for pop-ups over the heads as the battle results happen as well a log of the events at the bottom of the screen. The closer those entities (attached entities with Action components in this case) get to their decay state, the more faded they will get or whatever. It sounds very similar to what you describe.

re: Monkey Trap, a small video of how far I got by Friday:
[video]http://www.youtube.com/watch?v=eV5IO0EnwyE&feature=youtu.be[/video]

2 Likes

Note: and whether or not to use a Decay component would depend 100% on whether you were already using an ES or not. If not then just use a Control that updates the alpha over time.

Sounds about the same as what I was talking aobut.

I guess the same goes for a Grow-component (scale the spatial), Fade-component (change the alpha on the spatial), Rotate-component etc. (I’m using the Decay component as you used it in Asteroid Panic, to remove dying->dead objects).

Looking forward to the Monkey Trap showcase :slight_smile:

Whaaat, i cant belive it. pspeed himself has lighting artefacts :wink:

@zzuegg said: Whaaat, i cant belive it. pspeed himself has lighting artefacts ;)

Well, 1) it’s not lighting its “fogging” and is just a second pass texture effect. 2) I was trying to finish this game in a week and already failed and I think the effect looks good enough.

I guess the issue comes from shared vertices on the ground… So it might be a not hard to solve problem. I guess the whole map is a 2d array and the light values are calculated by ‘marching trough the array’?
But yeah, looks good and does its job nicely, it’s just looks not ‘right’…

@zzuegg said: I guess the issue comes from shared vertices on the ground... So it might be a not hard to solve problem. I guess the whole map is a 2d array and the light values are calculated by 'marching trough the array'? But yeah, looks good and does its job nicely, it's just looks not 'right'..

It’s because the quads don’t have centers… kind of. Making this look better will require a more complicated mesh and more complicated fog map. It’s still better than not having it at all.