Showing posts with label Game Programming. Show all posts
Showing posts with label Game Programming. Show all posts

Friday, March 16, 2012

Updating my cocos2d apps for the new iPad

Oy. When you make a cocos2d app for iOS, there is a boilerplate line in the App Delegate class... goes like this:

if( ! [director enableRetinaDisplay:YES] )
    CCLOG(@"Retina Display Not supported");


But, uh oh! New iPad is retina, too! I have at least 5 apps using that line of code. That makes the new iPad think it's in retina mode, so the display gets all messed up!

So here's the fix:

if(![AppDelegate isIPad]){
    if( ! [director enableRetinaDisplay:YES] ) {
        CCLOG(@"Retina Display Not supported");
    }
}

You can use your own "isIPad" methodology... I check for the height and width of the screen. Using this line, retina is not enabled for the new iPad, only for the other devices which support it... iPhone 4 and 4s. The next step, of course, would be to enable retina for new iPad and actually supply those double-sized huge graphics, but that's for another day.

And, even though I'm ready with new updates and have been for several days, only one of the 5 apps I submitted (Guess Your Songs) has made it through the Apple review queue... and that was after an expedite request ;)

You can find my iOS apps by searching for "daveworld" in the app store.

Any other snafus people have found getting ready for the new iPad? Any apps expected to misbehave on opening day?

Friday, April 15, 2011

Bunny's Easter Egg Hop N Drop now available on Android OS

Just in time for the springtime holidays, the Android port of Bunny's Easter Egg Hop 'N Drop is ready! You can get it on the Android Market: https://market.android.com/details?id=com.daveworldinc.hopndrop

Read more about Bunny's Easter Egg Hop 'N Drop in my previous blog entry...
http://blog.daveworld.net/2011/04/bunnys-easter-egg-hop-n-drop-in-app.html

A couple of interesting thoughts about this port from cocos2d-iPhone to cocos2d-Anroid:

Tuesday, April 12, 2011

Bunny's Easter Egg Hop 'N Drop in the App Store! Fun Kid's game for iPhone iPad and iPod Touch!

My latest game, Bunny's Easter Egg Hop 'N Drop, is available in the App Store!

Happy Easter! Catch Bunny's eggs before they fall! Simple to play, challenging to master. Perfect for kids, perfect for the Springtime holiday.

Bunny's Easter Egg Hop 'N Drop is optimized for iPhone, iPad, and iPhone Retina displays. High score leaderboards use OpenFeint and Game Center. Features original bunny hopping music, composed and performed by me :)

Wednesday, March 30, 2011

StarPod released in App Store! Awesome space shooter game for iPhone and iPad with OpenFeint, Game Center

My latest game, StarPod, is now available on the app store!



I really enjoyed making StarPod... it's got rockin' music and cool sound effects, colorful graphics and explosions, plenty of particle systems... it's not a "kid's game" like my previous couple of entries, it's actually a game that i enjoy playing :)

In StarPod, you are a spaceship being attacked by various types of space-dwelling shape creatures. Enemies include fiery squares, icebursts, insidious triangles, starburst caterpillars, and plasmapillars. You have 2 "D-Pad" style controllers, one on the left to move, and one on the right to fire (a la Robotron, Total Carnage, Geo Wars, etc...). Personally, this is one of my favorite playing configurations, I always like a good game where I can get into a zone of moving with one hand and unleashing destruction with the other.

There are two basic goals in the game... destroy lots of enemies for points, and stay alive as long as possible without using a Big Bomb. Every 7 seconds you stay alive without the BB, the points multiplier increases. So, the longer you stay alive, the higher your points multiplier will get. Once you use the Big Bomb or get destroyed, though, the points multiplier resets back to 1. When I play, I am focused on staying alive as long as possible, so I rarely use a Big Bomb... I have gotten the points multiplier up past 60x ;)

This game is fun on iPhone and iPad... on the iPad, the obvious benefit is that there's more D-Pad space, so you will have an easier time seeing on the D-Pad which direction it's pointing. Some players may find it a little tough during the first few plays to remember to keep your thumbs on the D-Pads, but once you do, you will (hopefully) be mesmerized and "in the zone".

There are a bunch of subtle features designed to keep the game mesmerizing and interesting, including:
- each starfield is created on the fly, and each star twinkles
- each enemy has a distinct spawn sound and a distinct explosion sound. the sounds are panned left or right according to the position of the enemies, and the explosion sounds' pitch is variable depending on the size of the enemy at the time of explosion
- each enemy type has a distinct strategy for getting to you, i wanted to make sure that "camping" in the corner would not be an effective strategy for the game ;)
- powerups, including double shot, triple shot, quad shot, and shields up the ante in terms of destruction unleashed
- if you are cornered, and if you have destroyed enough enemies, you can use the big bomb to blow up all the enemies on the screen and get a fresh start. this is particularly awesome when there are lots of different enemy types on the screens, because each enemy will explode one at a time and play it's sound... so you get a little custom concert along with the big bomb :)

Enjoy!

Monday, March 7, 2011

Remembering to use NSAutoreleasePool after calling performSelector

There's nothing worse than working really hard on an iPhone game or app, only to be plagued by poor performance, memory leaks and out-of-control allocations. One of the most important things I routinely forget to do is to auto-release every time i use a perform selector. For example, if I want to play an announcement in 2 seconds, i might say: