iphone - iOS frame by frame animation, by script -


there few questions regarding frame frame animation (such frame frame animation , other similar questions), feel mine different here goes.

this partially design question little ios experience.

i'm not sure "frame frame" correct description of want let me describe that. basically, have "script" of animated movie , i'd play script.
script json file describes set of scenes. in each scene there few elements such background image, list of actors positions , background sound clip. further, each actor , background there's image file represents it. (it's bit more complex - each actor has "behavior" such how blinks, how talks etc). job follow given script referencing actors , background , every frame, place actors in designated position, draw correct background , play sound file.
movie may paused, scrubbed forward or backward similar youtube's movie player functionality.
of questions i've seen refer frame-by-frame animation have different requirements (i'll list more requirements later). suggest use animationimages property of uiimageview. fine animating button or checkbox assume there's short , predefined set of images need played.
if go animationimages i'd have pre-create images front , pure guess won't scale (think 30fps 1 minute, 60*30=1800 images. plus scrub , pause/play abilities seem challenging in case).

so i'm looking right way this. instinct, , i'm learning more go, there 3 or 4 main ways achieve this.

  1. by using core animations , defining "keypoints" , animated transitions b/w keypoints. example if actor needs @ point @ time t1 , point b @ time t2 need animate what's in between. i've done similar in actionscript in past , nice particularly challenging implement scrub action , keep everytyhing in sync i'm not big fan of approach. imagine have implement pause in middle of animation or scrub middle of animation. it's doable not pleasant.
  2. set timer for, 30 times second , on every tick consult model (the model script json file along description of actors , backgrounds) , draw needs drawn @ time. use quartz 2d's api , drawrect. simple approach , don't have enough experience tell how it's going work on different devices, cpu wise, depends on amount of calculations need make on each tick , amount of effort takes ios draw everything. don't have hunch.
  3. similar 2, use opengl draw. prefer 2 b/c api easier perhaps resource wise opengl more suitable.
  4. use game framework such cocos2d i'd never used before seems solving more or less similar problems. seem have nice api i'd happy if find requirements answered them.

atop of requirements i'd described (play movie given it's "script" file , description of actors, backgrounds , sounds), there's set of requirements -

  • the movie needs played in full screen mode or partial screen mode (where rest of screen dedicated other controls)
  • i'm starting iphone naturally ipad should follow.
  • i'd able create thumbnail of movie local phone use (display in gallery in application). thumbnail may first frame of movie.
  • i want able "export" result movie, uploaded youtube or facebook.

so big question here whether of suggested 1-4 implementations have in mind (or others might suggest) can somehow export such movie.
if 4 fail on movie export task have alternative in mind. alternative use server runs ffmpeg , accept bundle of movie images (i'd have draw them in phone , upload them sever sequence) , server compile images soundtrack single movie.
keep things simple i'd prefer server-less, i.e. able export movie iphone if that's ask last requirement @ least able export set of images (keyframes in movie) can bundle them , upload server.

the length of movie supposed 1 or 2 minutes. hope question wasn't long , it's clear...

thanks!

well written question. video export needs check out avfoundation (available of ios 4). if going implement this, i'd try #1 or #4. think #1 might quickest try out, that's because don't have experience cocos2d. think able pause , scrub coreanimation: check out camediatiming protocol adopts.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -