Counter Animation
Moderators: Flumminator, Zomis
Counter Animation
I'm not sure how hard this would be to implement into RnDs, but here goes....
How about a new graphicinfo.conf animation command "counter" (or whatever the current counters are going to be called)
The CEs animation would be a single frame decided by its counter.
This means you could "program" animation yourself.
You could also use this to construct massively detailed scenes with using only two CEs!
For example you have CE1 moving left to right and it leaves behind a trail of CE2s.
As CE2 is dropped its counter is set to +1, and if we where using "counter" as an animation
control in a GIC, it would leave behind the next frame sequence from the PCX.
Using spiral or snake like movement for CE1 you could fill a screen with a full bitmap
and only at the cost of 2 CEs (and memory )
Plus I'd imagine it would have lots of other uses.
------------------------------------------------------------
Global counter.
Has anyone said this already?
As well as setting a counter for single element, how about setting (or adding etc.)
to all CEs of that type?
Like subtract 1 from all CE23s
Combined with the "Counter" animation you could animate groups of CEs in one go.
Say you made a level with CE1 walls using counter animation. Setting the global
counter for CE1 to 2 would change all the walls in the level to frame 2.
How about a new graphicinfo.conf animation command "counter" (or whatever the current counters are going to be called)
The CEs animation would be a single frame decided by its counter.
This means you could "program" animation yourself.
You could also use this to construct massively detailed scenes with using only two CEs!
For example you have CE1 moving left to right and it leaves behind a trail of CE2s.
As CE2 is dropped its counter is set to +1, and if we where using "counter" as an animation
control in a GIC, it would leave behind the next frame sequence from the PCX.
Using spiral or snake like movement for CE1 you could fill a screen with a full bitmap
and only at the cost of 2 CEs (and memory )
Plus I'd imagine it would have lots of other uses.
------------------------------------------------------------
Global counter.
Has anyone said this already?
As well as setting a counter for single element, how about setting (or adding etc.)
to all CEs of that type?
Like subtract 1 from all CE23s
Combined with the "Counter" animation you could animate groups of CEs in one go.
Say you made a level with CE1 walls using counter animation. Setting the global
counter for CE1 to 2 would change all the walls in the level to frame 2.
OK... Done!
Seems to work fine now (after some quirks in the first try, which also revealed an error in copying the CE value for moving CEs when there is no change, but only an action).
> As well as setting a counter for single element, how about setting (or
> adding etc.) to all CEs of that type?
>
> Like subtract 1 from all CE23s
This is already possible by using "CE score" instead of "CE value", which is not connected to every single instance of a certain CE, but to all CEs of that kind on the playfield. I've also added this to your new artwork idea implementation!
You can now define the following in the GIC:
custom_255: RocksFontEM.pcx
custom_255.xpos: 1
custom_255.ypos: 2
custom_255.frames: 26
custom_255.anim_mode: ce_value
custom_256: RocksFontEM.pcx
custom_256.xpos: 0
custom_256.ypos: 1
custom_256.frames: 10
custom_256.anim_mode: ce_score
This uses all characters "A"-"Z" for CE 255 and "0"-"9" for CE 256! :-)
It will all be in the next pre-release. :)
Seems to work fine now (after some quirks in the first try, which also revealed an error in copying the CE value for moving CEs when there is no change, but only an action).
> As well as setting a counter for single element, how about setting (or
> adding etc.) to all CEs of that type?
>
> Like subtract 1 from all CE23s
This is already possible by using "CE score" instead of "CE value", which is not connected to every single instance of a certain CE, but to all CEs of that kind on the playfield. I've also added this to your new artwork idea implementation!
You can now define the following in the GIC:
custom_255: RocksFontEM.pcx
custom_255.xpos: 1
custom_255.ypos: 2
custom_255.frames: 26
custom_255.anim_mode: ce_value
custom_256: RocksFontEM.pcx
custom_256.xpos: 0
custom_256.ypos: 1
custom_256.frames: 10
custom_256.anim_mode: ce_score
This uses all characters "A"-"Z" for CE 255 and "0"-"9" for CE 256! :-)
It will all be in the next pre-release. :)
But that's exactly the way to *animate* the CEs! That's a real advantage, especially as you can change the animation depending on engine interaction, and still only need to use one single CE! Before, you needed several CEs, just to change graphical (animation) properties!
Alan is right here, this is a huge improvement for more graphical possibilities while saving CEs at the same time! :-)
Alan is right here, this is a huge improvement for more graphical possibilities while saving CEs at the same time! :-)
Let me explain on an example: imagine a bitmap made with this technique (see Alan's post above). Well let's try to make it animated - for example, when you press some guy that looks like red player, a "bitmap" gets created with a text "Hello." Then, the text changes to "Kill the Bad Dragon and you'll get incredible reward - 1000 gems." "But his cave is big. Free his prisoners to get more information." That could make endless story possibilities. But such an animation is almost impossible when you already use CE values for the bitmap. (Or isn't it? Correct me.)
> Hm, now I'm really confused.
Strange... that confused me. Nevermind.
Maybe it is possible but it's hard to time it right etc. Well, I'll try to make it (and explain it better) when the pre-release version comes out.
Btw: counter animation could be used even to make simple level backgrounds... (see some other thread, probably named "level backgrounds")
Strange... that confused me. Nevermind.
Maybe it is possible but it's hard to time it right etc. Well, I'll try to make it (and explain it better) when the pre-release version comes out.
Btw: counter animation could be used even to make simple level backgrounds... (see some other thread, probably named "level backgrounds")
*Mathematic Zomis comes in*... hmm... this would make it possible for a CE to show all numbers (0-9)... but then the question might be how to handle those numbers into more mathematics... hmm... seems like I will have to play around with the new pre-release when it comes out... (which better be soon! )Holger wrote:This uses all characters "A"-"Z" for CE 255 and "0"-"9" for CE 256!
> but then the question might be how to handle those numbers into more
> mathematics...
It works pretty nice -- already played around with exactly these things!
Use two CEs with the "0-9" artwork, depending on CE value, and then just set the CE value to change the appearance for a two-digit counter etc... :-)
(You even don't have to reset the CE value from 9 -> 0, as 10 results again in "0" (artwork frame is calculated as "CE value % 10")...)
> mathematics...
It works pretty nice -- already played around with exactly these things!
Use two CEs with the "0-9" artwork, depending on CE value, and then just set the CE value to change the appearance for a two-digit counter etc... :-)
(You even don't have to reset the CE value from 9 -> 0, as 10 results again in "0" (artwork frame is calculated as "CE value % 10")...)
Ok... but what about if there's two CEs with this animation between each other, and they have the value of 25. Then the first CE should show '2' and the second '5'. They won't in this case, they will both show 5. So the first value must be divided by 10, to return 2. And so it will show correctly.Holger wrote:Use two CEs with the "0-9" artwork, depending on CE value, and then just set the CE value to change the appearance for a two-digit counter etc...
(You even don't have to reset the CE value from 9 -> 0, as 10 results again in "0" (artwork frame is calculated as "CE value % 10")...)
That's the mathematic I'm thinking about... and it could be possible with some machine controlling CEs... we'll see.
Good one Holger!
Great you could get it to work (almost) first go.
You compleatly ignored this thead/idea until Holger started posting!
And now you're going off topic......
Great you could get it to work (almost) first go.
Yeah right Zomis. Run my new ideas past you first....HA!.If you see an idea that isn't mentioned in this thread, please contact me.
You compleatly ignored this thead/idea until Holger started posting!
And now you're going off topic......
I'm sure you could animate a full bitmap using counter animation, (god knows why you'd want to though......maybe an FMV intro).Let me explain on an example: imagine a bitmap made with this technique (see Alan's post above). Well let's try to make it animated - for example, when you press some guy that looks like red player, a "bitmap" gets created with a text "Hello." Then, the text changes to "Kill the Bad Dragon and you'll get incredible reward - 1000 gems." "But his cave is big. Free his prisoners to get more information." That could make endless story possibilities. But such an animation is almost impossible when you already use CE values for the bitmap. (Or isn't it? Correct me.)
Lets say we have a large PCX with 3 big frames each 10x10 tiles, to
animate the whole set we first lay down the 1st frame (using CE2 with it's counter set to +1, 1-100 in total).
Now simply by adding 100 to all of these frames (using the global add) we can make them all jump 100 frames ahead, and since it's 10x10 that means the next large frame. Adding 200 will go to frame 3 etc..
This is all theory btw, so I'm not sure it would work!
Here's a large single colour 992x2816 PCX with each frame numbered (0-2727 frames). I think it will come in handy since you could visually debug counter animation using it.
http://www.ambience.2restinpeace.com/counter_2727.zip
(I didn't type the numbers by hand btw )
http://www.ambience.2restinpeace.com/counter_2727.zip
(I didn't type the numbers by hand btw )