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 02-08-2011, 04:24 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 2
JuniorDev is on a distinguished road
Default Tweejump - Change character animation?

Hi guys,

I don't know if any of you have heard of "tweejump" (an open source game inspired by Doodle Jump, PapiJump, etc). The creator(s) at iPlayful, Inc. released the source code (yes, the Xcode project). There are no xibs or nibs in this whole Xcode Project. And, yet enough, there are no pictures of the animation for the bird. Although, there is a picture called "sprites.png", that does have the animation for the bird (the one that is jumping), along with several other animations that don't have their OWN image file. Would editing the "sprites.png" and putting a new animation over the old one change the animation for the bird when the application is built? If not, how would I change the animation for the main character?

And, P.S. What is "sprites.png", anyway?
JuniorDev is offline   Reply With Quote
Old 02-09-2011, 10:05 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 260
davejas69 is on a distinguished road
Default

It looks to me like from what you are describing that it is a "sprite sheet".
Try googling it and you will see many examples.
Essentially it is one image with all of the art assets placed on it and they are
accessed by calling their coordinates. If you have an animation of a character
walking or throwing a punch, your sprite sheet will contain every frame of
that animation, as well as other art assets. I haven't used them myself so you will have to research it to find out how to use them.

To simply change this example, I would load sprite.png into Photoshop or whatever image editor you use and place your desired character in EXACTLY the same place and at the same size as the bird is now.
davejas69 is offline   Reply With Quote
Old 02-11-2011, 03:39 AM   #3 (permalink)
Indie Dev
 
hm50's Avatar
 
Join Date: May 2009
Location: South Bend, Indiana
Posts: 162
hm50 is on a distinguished road
Cool

You should also find a plist file with the same name or close to it.
Was that app written with cocos2d? Either way, if you create each of your individual frames for the animation, you will likely need to create a new plist file also, and then also change the for loop that loads those images from the plist so that the loop refelcts the correct number of animation frames. This may sound difficult at first until you look into one of two apps I am aware of, Zwoptex or TexturePacker. I use Zwoptex, there is an online flash version. Google "zwoptex flash". From there you just need to import your images, align them (using the align menu) then export the texture file and the coordinates (plist file). Pretty easy app to use really.

Good Luck!!
__________________
iPhone 3G

Support Indie Devs!! (that goes for newbs too!)

Apps:
Spell Blocks
See Read Say
iStatus
myVIP
myMVP
hm50 is offline   Reply With Quote
Old 02-12-2011, 12:04 PM   #4 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 135
jcdevelopments is on a distinguished road
Default

Quote:
Originally Posted by hm50 View Post
You should also find a plist file with the same name or close to it.
Was that app written with cocos2d? Either way, if you create each of your individual frames for the animation, you will likely need to create a new plist file also, and then also change the for loop that loads those images from the plist so that the loop refelcts the correct number of animation frames. This may sound difficult at first until you look into one of two apps I am aware of, Zwoptex or TexturePacker. I use Zwoptex, there is an online flash version. Google "zwoptex flash". From there you just need to import your images, align them (using the align menu) then export the texture file and the coordinates (plist file). Pretty easy app to use really.

Good Luck!!
Im looking at the project and am wondering were in the code can i change the size of the objects on the Sprite file
jcdevelopments is offline   Reply With Quote
Old 02-12-2011, 12:56 PM   #5 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 26
tobban2 is on a distinguished road
Default

Quote:
Originally Posted by jcdevelopments View Post
Im looking at the project and am wondering were in the code can i change the size of the objects on the Sprite file
Don't know but what is in the file bitmapFont.fnt?
tweejump / Images / bitmapFont.fnt
tobban2 is offline   Reply With Quote
Old 02-12-2011, 01:30 PM   #6 (permalink)
Indie Dev
 
hm50's Avatar
 
Join Date: May 2009
Location: South Bend, Indiana
Posts: 162
hm50 is on a distinguished road
Smile

You could use the scale property when you add the object, ie: myobject.scale = 1.5;

The .fnt file is one of two files that make up some of the labels in the game.
__________________
iPhone 3G

Support Indie Devs!! (that goes for newbs too!)

Apps:
Spell Blocks
See Read Say
iStatus
myVIP
myMVP
hm50 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: 423
9 members and 414 guests
7twenty7, chemistry, ChrisYates, hussain1982, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

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