On Mon, Jan 10, 2011 at 4:27 AM, Vincent Torri <[email protected]> wrote:
>
> Hey
>
> for the shoot'm up i'm writing, i would like to have some animations
> (explosions, power ups, ...). I have 2 questions about these animations:
>
> 1) For explosions, it's just a sequence of images and the animation
> finishes when the last image is reached. I used tween images like that:
>
>    group {
>       name: "explosion1";
>       images {
>          image: "explode1_1.png" COMP;
>          image: "explode1_2.png" COMP;
>          image: "explode1_3.png" COMP;
>          image: "explode1_4.png" COMP;
>          image: "explode1_5.png" COMP;
>          image: "explode1_6.png" COMP;
>          image: "explode1_7.png" COMP;
>          image: "explode1_8.png" COMP;
>       }
>       min: 49 49;
>       max: 49 49;
>       parts {
>          part {
>             name: "explosion1";
>             type: IMAGE;
>             mouse_events: 0;
>             description {
>                state: "default" 0.0;
>                visible: 0;
>                aspect: 1.0 1.0;
>                color: 0 0 0 0;
>                image {
>                   tween: "explode1_1.png";
>                   tween: "explode1_2.png";
>                   tween: "explode1_3.png";
>                   tween: "explode1_4.png";
>                   tween: "explode1_5.png";
>                   tween: "explode1_6.png";
>                   tween: "explode1_7.png";
>                   normal: "explode1_8.png";
>                }
>             }
>             description {
>                state: "explode" 0.0;
>                inherit: "default" 0.0;
>                visible: 1;
>                color: 255 255 255 255;
>             }
>          }
>       }
>       program {
>          name: "start_explosion";
>          signal: "start";
>          action: STATE_SET "explode" 0.0;
>          transition: LINEAR 0.5;
>          target: "explosion1";
>          after: "end_explosion";
>       }
>       program {
>          name: "end_explosion";
>          action: SIGNAL_EMIT "end_explosion" "";
>       }
>    }
>
>
> Images #1 to #7 are the animation and image #8 is an empty. #8 is
> 'normal', hence the sequence of the animation is:
>
> #8 #1 #2 .... #7 #8
>
> The problem is that the is a delay at the beginning of the animation
> (which is the display of the image #8 the first time). raster told me to
> add another state, but i don't know what i have to do. Does someone know
> what what i have to add ?

Do you know why is it delaying ? Is it taking too much time to load images ?
Maybe can you preload this image ?

>
> 2) For power ups, ennemies, etc..., the animation is infinite. It's the
> same than explosions except that it does not end. If there are 4 images
> for the animation, the sequence is
>
> #1 #2 #3 #4 #1 #2 #3 #4 #1 #2 etc...
>
> I just have no idea on how to achive that with edje (maybe using embryo
> ?).

Maybe just setting the program to run after itself. In your explosion example,

       program {
          name: "start_explosion";
          signal: "start";
          action: STATE_SET "explode" 0.0;
          transition: LINEAR 0.5;
          target: "explosion1";
          after: "start_explosion";
       }

Give it a try and give us feedback if it works =)

>
> thanks
>
> Vincent
>
> PS: the ultimate goal : Ikaruga (look at videos on youtube) :)

heheh, amazing.

Regards

>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any company
> that requires sensitive data to be transmitted over the Web.   Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to