Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2011, 06:18 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default Creating animation images?

Hey! Can someone please explain to me how to make animations? I don't mean in cocos2d but in general.

for example lets say you want a pig to look like hes walking, do you draw a pig in like 10 different positions or draw it once and make slight modifications to the image? Is there some type of program to help? Sorry I'm just confused as to how people do this.

Thanks
Rifts is offline   Reply With Quote
Old 10-15-2011, 06:58 PM   #2 (permalink)
Programmer
 
Stinkee2's Avatar
 
Join Date: Nov 2010
Location: New York
Age: 17
Posts: 15
Stinkee2 is on a distinguished road
Default

Do a search for sprite sheets, that's a pretty common thing. I'm sure there's an easier way to do it, but I don't know of any programs that will help you make animations. It would be stupid of me to think that there's nothing that could help you make sprite animations somehow. Maybe like a 2D bone animation kind of thing.. But anyway, yeah search sprite sheets and what they are and stuff. That should give you a good start.
__________________
This is a signature.
Stinkee2 is offline   Reply With Quote
Old 10-15-2011, 07:19 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default

I know all about sprite sheets I'm just confused as to how to make the sprites in all the different positions for the sprite sheet.
Rifts is offline   Reply With Quote
Old 10-16-2011, 03:49 AM   #4 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 5
PandaUser is on a distinguished road
Default

I'll draw pig in 10 positions, copy all this "pigs" files with transparent background (.png file) to XCode.

Next i'll create Array:

Code:
@interface GameClass : UIViewConroller {
   UIImageView *ThePigImageView;
   NSArray *MyPigArray;
}

@property (nonatomic, retain) UIImageView *ThePigImageView;
@property (nonatomic, retain) NSArray *MyPigArray;
Code:
...

- (void)viewDidLoad {
    MyPigArray = [NSArray initWithObjects:[UIImage imageNamed:@"ThePigPos1.png"],[UIImage imageNamed:@"ThePigPos2.png"],[UIImage imageNamed:@"ThePigPos3.png"],[UIImage imageNamed:@"ThePigPos4.png"],[UIImage imageNamed:@"ThePigPos5.png"],[UIImage imageNamed:@"ThePigPos6.png"],[UIImage imageNamed:@"ThePigPos7.png"],[UIImage imageNamed:@"ThePigPos8.png"],[UIImage imageNamed:@"ThePigPos9.png"],[UIImage imageNamed:@"ThePigPos10.png"],nil]; // Array With Images

   ThePigImageView.animationImages = MyPigArray; // Set Animation Images
   ThePigImageView.animationDuration = 0.1; // Set Animation Time Interval
   [ThePigImageView startAnimating]; // Run Animation
}

...
That all.

P.S. If something not understand, comment.
PandaUser is offline   Reply With Quote
Old 10-16-2011, 10:29 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default

thanks panda, the thing I guess I'm having the most problems with is the actual drawing of the image in different positions. I guess its more of an art question then a programming one.
Rifts is offline   Reply With Quote
Old 10-21-2011, 10:26 AM   #6 (permalink)
Registered Member
 
Raffaello's Avatar
 
Join Date: Apr 2011
Posts: 91
Raffaello is on a distinguished road
Default

Usually you draw a base sprite and then you do small modifications to create the animation, instead of drawing each sprite from zero. Search for some tutorials on sprite animation
__________________
My games:
Raffaello is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 386
10 members and 376 guests
7twenty7, apatsufas, comicool, Creativ, Dalia, dansparrow, Duncan C, Murphy, pbart, Tomsky
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:57 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0