Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Quick question about animation — Gideros Forum

Quick question about animation

edited October 2013 in General questions
Hello! I was sick and this is why I went missing.

Also thanks Atilim for putting the features that I requested!

Anyway, I saw the movieclips, and the textures...

Animation in Gideros if I understand is movieclips requesting a certain region from a texture? With the regions ordered by a number?

Or I understood it wrong? The MovieClip examples I found tend to be quite... "disembodied" and not be attached to a example Bitmap object and Texture object.
I make games for children: http://www.kidoteca.com

Comments

  • Hello,
    Well what MovieClip accepts is a Bitmap objects, and a frame numbers during which Bitmap will be shown on the screen.
    Inside Bitmap object you can use both texture for single graphic, or texture region from some larger texture (basically all you can do with Bitmap).

    So MovieClip itself, has nothing to do with Textures, but rather with Sprite hierarchy, when which Sprite object will be added to render hierarchy.

    Additionally you can tween the Sprite objects, inside MovieClip object.

    Hope that helps :)

    Here is a small example:
    http://appcodingeasy.com/Gideros-Mobile/Animating-Box2d-objects
  • movieclip accept one bitmap, or several bitmaps?
    I make games for children: http://www.kidoteca.com
  • Single MovieClip can store multiple Bitmaps
    Single Bitmap in a MovieClip may have multiple frames, where it is shown.
    local bmp1 = Bitmap.new(Texture.new("image1.png", true))
    local bmp2 = Bitmap.new(Texture.new("image2.png", true))
     
    local mc = MovieClip.new{
        {1, 100, bmp1},
        {51, 150, bmp2}
    }
    So this creates a movie clip where on frames from 1 to 50 only image1.png is showed, then from 51 to 100 both image1.png and image2.png are shown
    and from 101 to 150 only image2.png are shown

    ;)
  • wait, you can make a movieclip show more than one stuff at the same time? O.o

    also, you said that single bitmap on movieclip can have multiple frames... I don't understood that
    I make games for children: http://www.kidoteca.com
  • @speeder_kidoteca basically in this context frame is the amount of time the Bitmap spends on the screen.
    As in, if you run your app at 60FPS, then 1 frame is 1/60 of a seccond or to make your Bitmap appear on the screen for 1 second, you need to assign span of 60 frames to it
Sign In or Register to comment.