qq_tracker_code_advanced_default

I’ve recently released an app; iOS Icons, on the app store. The app has been doing well and a lot of people have found great use for this tool. I’ve recently started receiving reviews for iOS Icons on the Mac App Store with 2 reviews being completely inappropriate and just plain wrong. Here are some screen shots of the reviews and a link to iOS Icons on the Mac App Store:

Link to iOS Icons on the Mac App Store: http://itunes.apple.com/us/app/ios-icons/id413612688?mt=12#

Screen Shot of Review:

Here is a description as posted on the Mac App Store:

The original dev tool for creating all iOS device icons. Simple to use. Just drag your 512×512 image file into the app and click on preview to instantly see how your icons will look in all available sizes.

The reason that I made iOS icons is because I wanted an app that was similar to Icon Composer which does its job well but only generates the icon set for Mac Apps and not any of the required resolutions for any of the iOS devices.

Supports PSD, PNG, TIFF, BMP, JPEG and many other file formats.

Once your icons are saved you can import them into Xcode.

Version 1.1 has been submitted to the App Store to provide additional requested features ( Icon Names and Rounded Corners and Glass Preview )

Now I would think that if anyone took the time to read the description and maybe even looked at the screen shot of the App then it should be clear as to what the purpose of this app is. The issue I have with reviews like this is that you have no way to fight it. You can submit a concern / issue to Apple about it but there is no guarantee that they will even check into it, let alone do something about it.

That review with 1 star hurt my overall star review, I should have 4 stars but instead I have 3 1/2 stars. This will most likely discourage some people to even look at the app further. As developers we should at least have a way to comment on a review because honestly, some of these reviews are just not fair and some of them as is with this case are completely irrelevant.

I may come across as ranting here, but I needed to say something about it where people could see. Hopefully the complaint I filed with Apple will have some affect and they will consider removing the review but I’m not holding my breath.

What do you guys think? Are you  a developer that has received an unfair or blatantly irrelevant review for one of your apps? What have you done to try and correct the situation?

We thought it would be a great idea to have an installer for the cocos2d game engine to make it quick and simple for everyone to install the latest stable cocos2d build. The cocos2d installer app is a native Mac OS X app that after installation allow you to, with a click of a button, download the latest stable build of the cocos2d game engine, install it and the Xcode templates to get you up and running and making games simple and quick.

You can download Cocos2d Installer by clicking on the link below:

  cocos2d Installer (368.6 KiB, 1,046 hits)

As new cocos2d builds become available we will update the Cocos2d Installer app so that you can grab the latest version of cocos2d.

We were going to list this app for free on the Mac App Store but because of some of Apple’s guidelines, specifically file locations, we have had to remove it and host it here. If you find the app useful or can think of something else to add to it to make it more useful then feel free to leave a comment.

I would like to start this post by introducing some new software that will make the lives of developers much easier. When I first starting developing my new game Elementals HD for the iPhone I had no idea that loading individual PNG’s as textures for sprites would result in a final memory consumption of over 130MB on load. That’s really bad considering that the newest iPod Touch only comes with 256MB of RAM which to this day I will never understand. Apple added the hi-res display to the iPod Touch which means that images will use twice the amount of memory that they were using before. With the iPhone 4 they did it right and doubled up on the memory which helps a lot with the HD images taking up twice the amount of memory as the SD ones do. So anyway, back to the topic.

I needed some way to minimize the amount of memory utilization, so I started reading about sprite sheets and image sizes in the power of 2, etc… I found a neat utility called Zwoptex to create sprite sheets of all my images. This ended up helping me quite a bit, not only did it reduce the amount of disk space but it also reduced the amount of memory being used. At this time I was able to get my memory utilization down to about 90MB. To me, this is still quite high and I was not satisfied with the result, so I continued to look for a solution. I started reading about PVR’s and how fast they load and then I read about compressed PVR’s. Next, I needed to figure out how to use these PVR’s to lower my memory utilization and speed up my loading times.

I found an awesome app called TexturePacker which runs natively on Mac OS X. TexturePacker is a very similar tool to Zwoptex in that it creates sprite sheets from images but is very different and far more advanced when it comes to optimization. Long story short, I was able to use TexturePacker to create *.pvr.ccz sprite sheets for HD and SD images and reduced my memory utilization down to 50MB… WOW.. Now that is a lot better then the 130MB I started with. What I’d like to do now is present a tutorial on the usage of TexturePacker and walk you through step-by-step to get HD images loaded into TexturePacker, optimize them, publish them and finally write the code in Xcode to make them work. I’ll also share some best practices for memory management at the end of the tutorial.

Software you will need:

  1. Texture Packer

After you are done downloading the software above, you can follow the below steps to install TexturePacker and start up the Demo Project

Install TexturePacker:

If you haven’t downloaded Texture Packer yet, you can download it here. After the download has completed you can double click on the DMG file so that it mounts a disk image. The disk image contains the Texture Packer installer package. The screen should look like the screen shot below:

Texture Packer - Disk Image Contents

Double-Click the TexturePacker Package File and you will see the install screen, like the one below:

Texture Packer - Install

Texture Packet - Install

From there just follow all of the prompts until Texture Packer has completed the install process. You will find Texture Packer within your applications folder. Go ahead and launch Texture Packer. You will get the following screen:

Texture Packer Essential vs Texture Packer Pro

Texture Packer Essential vs Texture Packer Pro

Unless you’ve purchased a license you should choose Essential. The main difference is that with the Essential (Free Version) anything you export will be exported in red. In the next section I will give a brief overview of Texture Packer and the features we will use the most.

Note: All typos within the installer have been fixed since version 2.1.3

Importing Sprites:

Texture Packer - Import Sprites

Texture Packer - Import Sprites

Referring to the screen shot above I used the Import Sprites button to import a selection of sprites to work with. Once I imported the sprites, Texture Packer automatically adjusts the sprite sheet size to fit the 3 sprites I imported. If you look to the bottom right of the application on the status bar, Texture Packer displays the size of the resulting sprite sheet and the amount of memory it will consume. In this case with the above images, my sprite sheet will be 128×128 and consume 64 kB of memory. 64kB of memory isn’t a whole lot but lets go ahead and do some optimization anyway and see if we can cut down on memory usage.

On the left hand side of the app you will see the Texture Settings menu that is divided into 3 categories; Geometry, Layout and Output. Scroll down to Output and find the Image format setting. The default for this setting is RGBA8888 which results in a sprite sheet with the highest quality and the most memory usage. Change this setting to RGBA4444 and watch what happens to the memory usage. 32kB is what the memory usage is now… WOW we just cut memory usage in half but at the cost of quality. Why? The reduced quality comes from taking a 32-bit image and converting it to a 16-bit image. Make sense?

Ok, lets fix the quality to make it look a little better. Two fields down, you’ll see Dithering. The default Dithering setting is NearestNeighbour which makes for some ugly gradients when going from 32 to 16-bit. Go ahead and change this to FloydSteinberg+Alpha and watch in amazement as your gradients start to look like gradients again. You may notice that this results in your sprites looking a bit noisy but remember, we are working with hi-res images here and every 4 pixels will equal 1 point so the image should look pretty sharp, at least that’s what I’ve experienced.

Let’s take a minute to go over the Output Category that’s in the Texture Settings Menu:

  • Data Format – This setting is for defining in what format the sprite sheet data should be processed in. We need to select cocos2d for this. What this will do is generate a plist file that we will load into frame cache a little later.
  • Data File – This will be the output location and name of the data file (plist file for cocos2d) You don’t need to set this as it will automatically be filled when you set the Texture File
  • Texture Subpath – Not sure what this is for, I’ve never used it
  • Trim sprite names – Leave this unchecked, I’m not sure what this is used for
  • Texture Format – Here you will choose the output format of your sprite sheet. You can choose any format you like, they are all compatible with cocos2d but I recommend Compressed PVR (.pvr.ccz). This will give you the most compression and pretty quick load times.
  • Image format - This is where we will get most of our optimization from. For most of the sprite sheets we create we should choose RGBA4444 as it will give you the best result. RGBA4444 is used for sprites with transparency’s. If you have a sprite that doesn’t use any transparency you should use RGB565. If you have a sprite sheet that absolutely needs to have the highest quality then use RGBA8888 but we aware that this will result in high memory use, especially if your sprite sheet is 2048 x 2048.
  • Texture File – This is where you would set the name of your texture file. Click on the browse button to select your location and then give a name. If you are working with hi-res images be sure to add -hd at the end of the filename, you’ll see why, later.
  • Dithering – I covered this earlier but just to re-cap, if you are using RGBA4444 you should use FloydSteinberg+Alpha and if you are using RGB565 then use FloydSteinberg
  • Premultiply alpha – This is used to limit the amount of artifacts and possible thin black borders around your sprites when sprite anti aliasing is on. Also semi-transparent pixels might get too dark without this setting. If this is enabled be sure to add the following to your code:
    [CCTexture hasPremultipliedAlpha:YES]
  • AutoSD – This is one of my favorite features of TexturePacker. What this little nifty checkbox does is automatically create a low-res sprite sheet and plist file for you but you have to make sure that you named your Texture file with a -hd at the end.

A Note from the author of TexturePacker: Whenever possible, you should use Add Folder to import your sprites because this uses smart folder. Every time you add sprites to the folder and update your sprite sheet it re-scans the contents of the folder and adds all sprites. This makes sprite handling much easier than adding single sprites.

Ok, so now we have our sprites imported and have everything optimized. Next we will talk about Publishing.

Publishing Sprite Sheets:

Before you click on the Publish button be sure that you’ve got all of your settings configured the way you want them. Here’s a quick step-by-step re-cap of the steps above:

  1. Import sprites either by using the Add Sprites or the Add Folder button.
  2. Set Data Format to cocos2d
  3. Set Texture format to Compressed PVR (.pvr.ccz)
  4. Set Image format to RGBA4444
  5. Set Texture file to something-hd
  6. Set Dithering to FloydSteinberg+Alpha
  7. Check AutoSD

With all of the above completed go ahead and click on the Publish button. Texture Packer will now export your hi-res and low-res sprite sheets and associated plist data files.

You should have something similar to the following screen shot:

There isn’t too much to say about publishing, the next section will cover how to get your sprite sheets to work with cocos2d.

Writing The Code:

After publishing your sprite sheets with Texture Packer, the next and last step would be to add this into your project and get them to show up in your scene. I’ll be walking you through adding your sprite sheets to your project and showing you code examples of how to make the best use of your new sprite sheets.

Open up Xcode, create a new cocos2d Project from one of the cocos2d templates and copy the 2 sprite sheets and 2 plist files that were exported from TexturePacker into your Resources folder within your Xcode project, make sure that copy files is checked.

Copy Items

Copy Items

Once the sprite sheets and plist files have been added go ahead and click on your HelloWorldScene.m and find your init method. Once you’ve located your init method replace what’s inside the if statement with the following lines of code:

[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA4444];
CCSpriteBatchNode *spritesDemoNode;
spritesDemoNode = [CCSpriteBatchNode batchNodeWithFile:@"demosprite.pvr.ccz"];
spritesDemoNode.tag = 805;
[self addChild:spritesDemoNode];
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"demosprite.plist"];

The code above does the following:

  1. Sets the current Pixel format to RGBA4444 to match that of our sprite sheet that we set in TexturePacker
  2. Creates a sprite batch node using the Compressed PVR
  3. Sets a tag ( has nothing to do with texture packer but I use tags for other reasons )
  4. Adds the node as a child to your current Layer
  5. Adds the sprite frames to cache from the plist file that was exported by Texture Packer

Next we need to create a CCSprite from the frames that are in cache, we do this with the following code:

CCSprite *spriteDemo = [CCSprite spriteWithSpriteFrameName:@"fireball.png"];
spriteDemo.position = ccp(size.width/2, size.height/2);
spriteDemo.tag = 1;
[self addChild:spriteDemo];

The above code does the following:

  1. Creates a sprite from the frames in cache. In this case I had an image named fireball.png that was one of the images that was imported into Texture Packer. When Texture Packer creates the plist file it uses the names of your sprites for the frame names, which makes it easy to use.
  2. Next I am setting the position to the center of the screen. size is a variable that I’ve setup that has the height and width of the screen as properties.
  3. Again I am setting a tag, not something you have to do
  4. Last we are adding the new sprite to our layer.

If all went well and you’ve followed all of the above directions then you should be able to build your project and see your sprite on the scene. Granted, this is more work then copying individual PNG’s into your project and just creating sprites from the PNG’s but that is a big waste of memory and will eventually crash your app. Remember, with Texture Packer I was able to reduce my memory to more then half of the original memory utilization even using Zwoptex did not make a huge improvement with memory usage. I would definitely recommend Texture Packer to anyone that is interested in optimizing memory.

If anyone has any questions or comments please feel free to leave them. If anyone has any more optimization tips, please share, I would love to hear them and I’m sure everyone else would appreciate it as well.

Have you ever had to send a text message, but you just lost your cell phone. Maybe had it stolen, or just happened to drop it in the toilet one drunken night (not judging).

Anyway If you’ve ever been in one of the above situations or similar, or just want to try a cool experiment, here’s how you can send a text message for free by sending an email.

Just send your email to one of the email addresses below, substituting ‘number’ with the 10 digit US number you’re sending it to.

  • AT&T: number@txt.att.net
  • Qwest: number@qwestmp.com
  • T-Mobile: number@tmomail.net
  • Verizon: number@vtext.com
  • Sprint: number@messaging.sprintpcs.com or number@pm.sprint.com
  • Virgin Mobile: number@vmobl.com
  • Nextel: number@messaging.nextel.com
  • Alltel: number@message.alltel.com
  • Metro PCS: number@mymetropcs.com
  • Powertel: number@ptel.com
  • Suncom: number@tms.suncom.com
  • U.S. Cellular: number@email.uscc.net

Fill in the body with whatever you were going to type in your text message and hit send.

There may come a time when you need to check your Mac’s version to make sure that your Mac has compatible hardware with certain applications and games, for instance the new release of Angry Birds on the Mac App Store requires OpenGL 2.0 which is not supported on GMA 950 graphics adapters which are used in certain Mac’s. Currently the unsupported Mac’s are as follow:

  • MacBook 1,1
  • MacBook 2,1
  • Mac Mini 1,1
  • Mac Mini 2,1
  • iMac MA710xx/A

In my honest opinion Rovio Mobile failed in a big way on their part by not doing enough testing and ensuring that Angry Birds would run on all devices. Even if they couldn’t get it to run on older Mac’s they should have added specific system requirements.

To check the version of your Mac just follow the quick tutorial below or scroll down for more detailed screen Shots:

  1. Click on the Apple in the upper left part of the screen
  2. Click on About This Mac
  3. Click on More Info…
  4. Under Hardware Overview look for the Model Identifier

Screen Shots:

Let me know if anyone needs any help figuring this out.

It’s relatively simple to Jailbreak your PS3 using your iPhone but to figure out the entire process from beginning to end was actually quite a challenge for me. I couldn’t find a single tutorial that explained in detail steps what you have to do to prepare your iPhone to Jailbreak the PS3 and then how to use the iPhone to Jailbreak the PS3 and then how to load packages like Open Manager, FTP Server, SNES9x, etc.. and finally how to go about putting game backups on the PS3′s internal Hard Drive.

This Tutorial will provide you with a complete overview of what is required to Jailbreak your PS3 using your iPhone 2G and will be broken up into the following sections:

  • Preparing your iPhone 2G for Jailbreaking
  • Jailbreaking your PS3 with your iPhone 2G
  • Installing Packages ( FTP Server, Open Manager, Backup Manager, SNES9x )
  • Copying a backup game to your PS3′s internal hard drive

You will need to download the following files below:

  • Download:

      iPhoDroid 2G Mac PSFreedom (59.6 MiB, 1,417 hits)

    (iPhoDroid for Mac)
  • Download:

      PS3 FTP Server (517.9 KiB, 1,233 hits)

    (FTP Server for PS3)
  • Download:

      Open Manager 1.17.1 (1.3 MiB, 1,118 hits)

    (Manage Game Backups)
  • Download:

      Backup Manager 1.1 (527.5 KiB, 1,057 hits)

    (Manage Game Backups)
  • Download:

      Backup Manager 2 (525.8 KiB, 1,065 hits)

    (A modified version of Backup Manager that allows you to load a backup without a disc in the drive. I haven’t tested it)
  • Download:

      SNES9X PS3 (14.1 MiB, 1,076 hits)

    (An SNES Emulator)
  • Download:

      Cyberduck 3.7 (19.9 MiB, 1,386 hits)

    (A Mac FTP Client, I’ve tried FileZilla but it had issues)

IMPORTANT NOTE: As of the writing of this tutorial, there is no way of jail breaking any PS3 with firmware above 3.41. Also, this tutorial is written with the Mac user in mind, if you are using Windows you should be able to apply the same processes mentioned here.

Preparing Your iPhone 2G for Jailbreaking:

Note: This tutorial assumes that your iPhone 2G is already Jailbroken. If your iPhone 2G is not jailbroken then lookup redsn0w and perform the Jailbreak.

  1. Connect Your iPhone 2G to your Mac and make sure iTunes is not running.
  2. Launch iPhoDroid
  3. Click Shoot!
  4. iPhoDroid will now install Openiboot and the Android Operating System as well as PSFreedom
  5. On the final screen iPhoDroid will tell you that your phone will enter recovery mode
  6. You will notice that your phone will have openiboot loaded up.
  7. Scroll down to Install using the Volume Buttons.
  8. Press the Home Button
  9. Disconnect the iPhone from your Mac
  10. Wait for init to scroll on the screen

Your iPhone is now ready to jailbreak your PS3. It is currently running in a loop basically waiting to detect the playstation. It is important that you do not let your phone sit in this loop for an extended length of time. Allowing your iPhone to stay in this loop for hours will eventually brick your phone. Please be warned.

Note: To boot your phone back into iOS push the Lock and Home buttons at the same time and hold them until the screen turns off. You are now presented with the openiboot menu. iOS should be selected by default. Push the home button. The first time after loading openiboot and trying to get back into iOS might not work as the phone may still be in recovery mode. If this is the case plug the phone back into your Mac and launch iPhoDroid once again but instead of clicking on Shoot! click on Exit Recovery Mode. This will allow your iPhone to properly boot into iOS.

At any time you can have your phone back in the init loop by pressing and holding the Lock and Home button and then selecting Android and pressing Home. So go ahead and get your phone into the init loop mode and follow the next part to jailbreak your PS3.

Jailbreaking your PS3 with your iPhone 2G:

Assuming that you’ve followed all of the steps above correctly, your iPhone 2G should be running in the INIT loop.

  • If you have a PS3 Slim, unplug the power from the back, then plug in your iPhone to the USB port then plug the Power Cable back in.
  • If you have a PS3 Phat, flip the power switch to Off, then plug in your iPhone to the USB port then flip the Power Switch to On.

With the iPhone plugged in, press the power button on your PS3 and then immediately press the eject button. You should now start seeing some lines of text appear in-between the INIT’s. When the iPhone comes to a stopping point there should be about 4 lines of text. Unplug the USB and plug it back in immediately. Then wait for a bunch more text to scroll on the iPhone. When this text stop scrolling you, you have successfully jailbroken your PS3.

Using your controller navigate to the Games section of your XMB and you should notice 2 extra folders that weren’t there before. The folder that we are interested in is the Install Packages folder. The Install Packages folder will be used in the next section to install Open Manager, Backup Manager, FTP Server and SNES9x.

At this point I think you can disconnect your iPhone but lets keep it plugged in until we have all of the packages installed. Leave your PS3 on and your iPhone connected.

Installing Packages ( FTP Server, Open Manager, Backup Manager, SNES9x ):

Assuming that you’ve followed all of the steps above correctly and have the FTP Server, Open Manager, Backup Manager and SNES9X packages downloaded, you will need a flash drive.

  1. Plug your Flash Drive into an available USB port on your Mac
  2. Copy all of the .pkg files onto the root of the flash drive.
  3. Unplug the Flash Drive from your Mac
  4. Plug the Flash Drive into an available USB port into your PS3
  5. Navigate to the Install Packages Folder
  6. You should see all 4 of the Packages that you added to your flash drive
  7. One by one click on each and install them.

When all of the packages are installed you will be able to run each of them by clicking on their icon within the Game section of your XMB.

Here is a brief overview of the packages we have just installed:

  • FTP Server – This package adds an FTP server to your PS3 and will allow you to remotely connect to your PS3 so that you can move and copy files and folders. We will use this FTP server in the next section when I go over how to copy game backups from your Mac to the internal HDD of your PS3
  • Open Manager / Backup Manager – Open Manager and Backup Manager are essentially the same thing. They allow you to manage games loaded onto your PS3 either from your Mac or from Blu-Ray Disc. You can copy, delete and launch your games using either of these packages. We will be using these to launch the backup game that we will be copying from the Mac to the PS3.
  • SNES9X – I’m sure everyone has heard this name before. SNES9X is a Super Nintendo emulator and has been ported to just about every console on the market. It allows you to play Super Nintendo Roms. This is always good to have for those nostalgic days when you just have that need to play some retro games. I’ll briefly cover this package and how to add ROMS to your PS3 so you can play them with SNES9X.

At this point of the tutorial you should have a jailbroken PS3 with all of the necessary packages installed. In the next section I will go over how to copy a backup from your Mac to the PS3′s internal hard drive and how to launch the game using Backup Manager.

Copying a backup game to your PS3′s internal hard drive:

Now, this is the part of the tutorial that I’m sure everyone has been waiting for. If you’ve made it this far, congratulations because you are only a few steps from playing a backup of your PS3 game. Now I’m going to go ahead and state a warning.

Warning: I do not condone software piracy. I am simply providing instructions that will aid consumers in making backup’s of their originally purchased games so that they may keep their purchased games in a safe place and play only their game backups. I do not and will not host game backups for download. I will only provide a way of searching for available backup downloads, this is only in case there is something wrong with your original game ( scratched, broken in half, melted, etc… ) which means that you have already purchased the game and the store will not offer you an exchange or a refund.

Ok, with the warning aside, lets proceed.

  1. Start the FTP Server from the Games section within your XMB
  2. You will notice an IP address at the top. This address will be used for CyberDuck
  3. Navigate to Start FTP Service ( This should already be selected ) Click X on your controller

From your Mac

  1. Launch the Cyber Duck Application
  2. In the Quick Connect Text Field, enter the IP address that is displayed on the FTP Server, from Step 2 above, and press enter.
  3. Once the connection Completes, you should see a folder “dev_hdd0″, this is the internal HDD of your PS3.
  4. Double Click on dev_hdd0
  5. Find the “game” folder and Double Click on it.
  6. Find the “LAUN12345″ folder and Double Click on it.
  7. Find the “GAMEZ” folder and Double Click on it. If there is no GAMEZ folder then we will have to create one. This is very simple. Right Click anywhere in the white space and then click on New Folder and give the folder a name of GAMEZ in all caps.
  8. Double Click on the GAMEZ folder. It should be empty. This is the location where we will copy the game backup to.
  9. Drag the extracted game folder into the Cyber Duck Window and wait for it to finish copying. Depending on your network connection (Gigabit Ethernet, 10/100, wiFi), this can take a while. So go do something but leave your PS3 alone.

When the copy process has finished go back to your PS3, Exit FTP Server by navigating to Exit to XMB and pushing the X Button on your controller. When you are back at the XMB, scroll to Backup Manager and push X to Launch it. If all went well then your game should appear there. You will need to insert an original Game disc for this to work.

When you launch your game from within Backup Manager it will require you to have an original game in the drive, doesn’t matter which one just be sure its an original. Once the game is launched it will take you back to the XMB, now when you scroll to the game disc in the drive, the actual name of the original will be replaced with the name of the backup you are loading. So go ahead and push the X Button. on the game disc and your game should load. Remember to say no or cancel to ANY AND ALL UPDATES. Try to not be signed into PSN, I am not sure of the repercussions of playing backups online.

NOTE: The game folder that you are copying to the GAMEZ folder via FTP should have a similar file structure to the below:

BCUSXXXX ->

  • PS3_DISC.SFB
    PS3_GAME
    PS3_UPDATE

If you’ve downloaded the game from NewZBin or any other USENET site then this will most likely be the format after extraction.

Well that’s it for this section. I will now briefly cover SNES9X and will list some links to an example game NZB and a link to a great SNES Roms site.

SNES9X How To for the PS3:

If you’ve followed all of the above steps, which you should have, then SNES9X should already be installed. If you didn’t install it then please scroll up to installing packages and install SNES9X. If you’ve already got it installed then follow the steps below:

On The PS3

  1. Launch FTP Server
  2. Start FTP Server

On The Mac

  1. Launch CyberDuck FTP Client
  2. Type in the IP Address into the Quick Connect Text Field and press enter.
  3. Navigate to dev_hdd0 and double click.
  4. In here we will create a folder called ROMS. Right click anywhere within the window and click on New Folder.
  5. Name the folder roms
  6. Double Click on the roms folder. This will be the folder to copy all of your downloaded roms to. This procedure is the same as copying a PS3 game you just drag the SMC file to the roms folder. See below for a site that has many SNES roms available for download.

On The PS3

  1. Exit the FTP Server by navigating to Exit to XMB and then pushing X on your controller.
  2. Launch SNES9X
  3. Navigate to the dev_hdd0 folder and push X
  4. Navigate to the roms folder and push X
  5. Select the ROM you wish to load and push X

You should now have SNES9X running with your selected ROM. If it isn’t working feel free to leave me a comment. Now as promised the next and last section has some links for you.

Links:

Last but not least an NZB file for Mortal Kombat vs. DC Universe for PS3

Hopefully you’ve found this tutorial useful, as you can imagine it takes a lot of time to put something useful together and make sure that its 100% correct. If I missed anything or have made a mistake along the way or if you’ve got questions feel free to comment as always.

NOTE: Just wanted to mention that after you have booted your PS3 with the Jail Break hack, you can disconnect your iPhone and turn it off. The iPhone is only needed in the beginning when you turn your PS3 on. Any time you reboot your PS3 you must reconnect the iPhone and perform the Jail Break hack in order to use any of the installed packages or play backed up games. Remember that leaving your iPhone running for an extended period of time in the INIT loop can eventually brick your iPhone.

I take no responsibility for any hardware damage or PSN banning that might result in performing any of the above steps.

I’ve been following the cocos2d community for a while now and discovered that their latest release includes the ability to build your app for OS X. The folks over at cocos2d are trying to make it a simple process to port your iPhone / iPad app over to Mac OS X, probably in preparation of the newly anticipated Mac App Store that we should be seeing soon.

There doesn’t seem to be 100% full support for Mac OS X just yet but the basics are working. You might be asking yourself, how would I go about changing my project to build Mac OS X instead of iPhone? Honestly I haven’t found an easy way, so if someone wants to jump in and help me out I’d appreciate it but for the purposes of this tutorial I will be creating a new App.

Let’s review some of the steps we will need to perform to accomplish this task.

Begin by downloading the latest version of cocos2d here. When the download has completed, go ahead and extract this to a folder on your Mac.

  1. Start a New Cocoa Project
  2. Add Cocos2d Sources to Project
  3. Edit AppDelegate.h & .m files
  4. Import Frameworks
  5. Create a new Objective-C class
  6. Change Settings in Interface Builder for MainMenu.xib
  7. Import sample artwork files

I’d like to add in that I am not stating that this is the best or only way to setup a project with cocos2d to build on OS X and I may have taken some unnecessary steps and may have made a few mistakes. The following is what I did to get it to work for me. If anyone has any suggestions to make this a more accurate or better tutorial, please feel free to let me know.

Start a New Cocoa Project:

First we’ll need to open up Xcode and then start a new project. This time though, instead of starting with one of the pre-defined cocos2d templates we will be using the Cocoa Application template that you should find under Mac OS X -> Application. Please see the screen shot below:

Once you have created a new project you should see the Xcode interface come up. For the purpose of this tutorial I have named my App Demo Mac Port. Your screen should look similar to the screen shot below.

In the next step you will be adding the cocos2d sources to your project, so be sure you’ve downloaded the latest release of cocos2d to be sure you have the version that supports Mac OS X.

Add Cocos2d Source to your Project:

For this step you will need the cocos2d files, if you haven’t downloaded cocos2d yet you can download the latest version here. Once downloaded, go ahead and extract to somewhere on your hard drive.

After you have extracted Cocos2d you will need to navigate to the location on your hard drive where you extracted Cocos2d then open up the cocos2d-iphone-0.99.5-beta3 folder and locate the cocos2d folder. See the screen shot below:

We will need to add this folder to our project. I usually just drag it from the Finder window into the project. Drag the cocos2d folder into your project right under your App name on the very top. A dialog window similar to the screen shot below will pop up.

Click on Add and this will add the required Cocos2d sources to our project. Your Xcode Project interface should look similar to the screen shot below.

The next section will guide you through modifying the AppDelegate.h and .m files.

Modify AppDelegate.h & .m Files:

In this section you will need to modify the AppDelegate.h & .m files to work with Cocos2d. I will not be explaining the code her but I will list the code so you can see what these files should look like.

AppDelegate.h

#import "cocos2d.h"
 
@class CCSprite;
 
//CLASS INTERFACE
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
@interface AppController : NSObject
{
	UIWindow *window;
}
@end
 
#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
@interface Demo_Mac_PortAppDelegate : NSObject  {
    NSWindow *window_;
	MacGLView *glView_;
}
 
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet MacGLView *glView;
 
@end
#endif // Mac

AppDelegate.m

//
// Actions Demo
// a cocos2d example
// http://www.cocos2d-iphone.org
//
 
// local import
#import "cocos2d.h"
#import "Demo_Mac_PortAppDelegate.h"
#import "DemoScene.h"
 
// CLASS IMPLEMENTATIONS
 
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
 
#pragma mark AppController - iOS
 
@implementation AppController
 
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
	// CC_DIRECTOR_INIT()
	//
	// 1. Initializes an EAGLView with 0-bit depth format, and RGB565 render buffer
	// 2. EAGLView multiple touches: disabled
	// 3. creates a UIWindow, and assign it to the "window" var (it must already be declared)
	// 4. Parents EAGLView to the newly created window
	// 5. Creates Display Link Director
	// 5a. If it fails, it will use an NSTimer director
	// 6. It will try to run at 60 FPS
	// 7. Display FPS: NO
	// 8. Device orientation: Portrait
	// 9. Connects the director to the EAGLView
	//
	CC_DIRECTOR_INIT();
 
	// Obtain the shared director in order to...
	CCDirector *director = [CCDirector sharedDirector];
 
	// Sets landscape mode
	[director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
 
	// Turn on display FPS
	[director setDisplayFPS:YES];
 
	// Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
	if ([UIScreen instancesRespondToSelector:@selector(scale)])
		[director setContentScaleFactor:[[UIScreen mainScreen] scale]];
 
	// Default texture format for PNG/BMP/TIFF/JPEG/GIF images
	// It can be RGBA8888, RGBA4444, RGB5_A1, RGB565
	// You can change anytime.
	[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];
 
	CCScene *scene = [CCScene node];
	[scene addChild: [nextAction() node]];
 
	[director runWithScene: scene];
 
}
 
// getting a call, pause the game
-(void) applicationWillResignActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] pause];
}
 
// call got rejected
-(void) applicationDidBecomeActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] resume];
}
 
// application will be killed
- (void)applicationWillTerminate:(UIApplication *)application
{
	CC_DIRECTOR_END();
}
 
// sent to background
-(void) applicationDidEnterBackground:(UIApplication*)application
{
	[[CCDirector sharedDirector] stopAnimation];
}
 
// sent to foreground
-(void) applicationWillEnterForeground:(UIApplication*)application
{
	[[CCDirector sharedDirector] startAnimation];
}
 
// purge memory
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
	[[CCDirector sharedDirector] purgeCachedData];
}
 
- (void) dealloc
{
	[window release];
	[super dealloc];
}
 
// next delta time will be zero
-(void) applicationSignificantTimeChange:(UIApplication *)application
{
	[[CCDirector sharedDirector] setNextDeltaTimeZero:YES];
}
 
@end
 
#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
 
#pragma mark AppController - Mac
@implementation Demo_Mac_PortAppDelegate
 
@synthesize window=window_, glView=glView_;
 
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
 
	CCDirector *director = [CCDirector sharedDirector];
 
	[director setDisplayFPS:YES];
 
	[director setOpenGLView:glView_];
 
	// Enable "moving" mouse event. Default no.
	[window_ setAcceptsMouseMovedEvents:NO];
 
	[[CCDirector sharedDirector] runWithScene: [DemoScene scene]];
}
 
@end
#endif

Within the applicationDidFinishLaunching method you will notice the [[CCDirector sharedDirector] runWithScene:[DemoScene scene]]; line.  This line specifies the Scene we want our project to start with. In the next section I will list some more code for a new Objective-C class.

Create a New Objective-C Class:

At this point we will need to create a new Objective-C class. Right click on the Classes group within your Xcode Project interface and click on Add -> New File. You will be presented with a dialog similar to the following.

Click on Next and you’ll be presented with the next dialog.

I’ve named my class, DemoScene.m be sure the check mark to create DemoScene.h file is checked. Click on finish, you should now see your new class files in your Xcode project interface. Below you will find the code you should put into these 2 files. If you are familiar with Cocos2d, then the code below should look familiar to you.

DemoScene.h

//
//  DemoScene.h
//  Demo Mac Port
//
//  Created by Chris Fletcher on 10/24/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//
 
#import
#import "cocos2d.h"
 
@interface DemoSceneLayer : CCLayer {
 
	CCDirector *Director;
 
}
@end
 
@interface DemoScene : CCScene {
 
	DemoSceneLayer *_layer;
 
}
 
@property (nonatomic, retain) DemoSceneLayer *layer;
 
+(id)scene;
 
@end

DemoScene.m

//
//  DemoScene.m
//  Demo Mac Port
//
//  Created by Chris Fletcher on 10/24/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//
 
#import "DemoScene.h"
 
@implementation DemoScene
@synthesize layer = _layer;
 
+ (id)scene {
 
	CCScene *scene = [CCScene node];
	DemoSceneLayer *layer = [DemoSceneLayer node];
	[scene addChild:layer];
 
	return scene;
 
}
 
- (id) init {
 
	if ((self = [super init])) {
 
		self.layer = [DemoSceneLayer node];
		[self addChild:_layer];
 
	}
	return self;
}
 
@end
 
@implementation DemoSceneLayer
 
- (id)init {
 
	if ((self = [super init])) {
 
		CGSize winSize = [CCDirector sharedDirector].winSize;
 
		CCSprite *starBG = [CCSprite spriteWithFile:@"starbg.png" rect:CGRectMake(0, 0, 960, 640)];
		starBG.position = ccp(winSize.width/2, winSize.height/2);
		[self addChild:starBG];
 
	}
	return self;
}
 
-(void) dealloc {
 
	[super dealloc];
 
}
 
@end

As you can see from the code above, we are simple creating an Interface and Implementation for a layer and a scene and then adding a CCSprite to the layer. This is very simple Cocos2d functionality but should be enough code to get you started.

We can’t Build & Run the project just yet. We have a few things left to do, mainly importing some frameworks & images and then making some changes in Interface Builder. The next section will cover the frameworks we will need to import.

Importing Additional Frameworks:

In this section of the tutorial I will cover which frameworks we will need to add to our project and how to add them. The frameworks we will add are as follows:

  • QuartzCore.framework
  • OpenGL.framework
  • ApplicationServices.framework
  • libz.dylib

To add a framework to our project, right click on Frameworks and then  Add -> Existing Frameworks. You will be presented with a dialog similar to the following screen shot.

Find the QuartzCore.framework and click Add, then right click on Frameworks and then Add -> Existing Frameworks and find the OpenGL.framework and click Add. Repeat these steps for the ApplicationServices.framework and the libz.dylib.

When you are done adding all of the frameworks your Xcode Project interface should look similar to the screen shot below:

At this time all we have left to do is is import some images and then make some Interface Builder changes. This is turning out to be a pretty lengthy tutorial but I promise we are almost at the end. In the next section I will quickly cover the images that need to be added.

Add Images To Our Project:

The code in the DemoScene.m file uses a CCprite that uses an image named starBG.png. You can download this image from the link below:

Download:

  Star Background (1.3 MiB, 1,761 hits)

The Cocos2d source requires that an image called fps_images.png exists in our resources folder to render the FPS image that you are used to seeing on the bottom left hand corner. You can find this file in the Cocos2d/Resources/fonts folder within the extracted folder from the cocos2d sources.

When you have both files located, drag them into the Resources folder of your Xcode project.

At this point we have done all that is required within our Xcode Project, the only thing left to do is to make some changes and additions to our MainMenu.xib file within interface builder.

MainMenu.xib & Interface Builder:

Go ahead and locate your MainMenu.xib file inside of your Xcode Project interface. It should be located inside of your Resources folder. Double Click on MainMenux.xib, this should launch interface builder.

After Interface Builder has launched, the first thing I like to do is resize the window to what the size of my application will be. For simplicity I will set the size of my window to 960×640 since I already have all of my images created at that resolution to support the iPhone 4.

After you have resized your window to 960×640, it should look similar to the following screen shot.

While we have focus on the window lets make a quick change. You will need to change a setting in the Window Attributes. At the bottom find the check mark for One Shot and uncheck this box. See the screen shot below:

After changing the size of the window and unchecking the One Shot mode we need to add an OpenGL View to our window. In your Library scroll down until you see OpenGL View. Select this and drag it onto your Window. You should now see something similar to the screen shot below:

Go ahead and resize the OpenGL View to the size of the window. Your resulting window should look similar to the screen shot below:

Now that we have our window and our OpenGL view resized to 960 x 640 we will need to make some changes to the OpenGL View. First, you’ll want to change the Class to MacGLView. With the OpenGL View selected go to the Identity tab and change the class name to MacGLView. See the screen shot below:

Next, click on the Attributes tab and make the changes as in the provided screen shot below:

After you have finished making the changes above, we will need to make one final change. We need to create a link to the glView outlet in our AppDelegate to the OpenGL View, so drag a connection from glView to OpenGL View. You can reference the screen shot below:

Now we are done with Interface Builder so go ahead and save and then exit Interface Builder and go back to your Xcode Project. At this point we have everything setup to properly run a cocos2d app on Mac OS X. You should see your app start up and it should look similar to the following screen shot.

Congratulations, you now have the basic building blocks to create / port your app for Mac OS X. I’ve tried to be as thorough  as possible when creating this tutorial and I am hoping that I didn’t miss anything. You can download a working project which includes everything from this tutorial below.

Download:

  Demo Mac Port (6.9 MiB, 1,951 hits)

Was this tutorial useful? Have you used this tutorial to create a Mac App using Cocos2d? I’d like to hear stories

How much time and effort would you say a typical developer puts into making a game? I can tell you from experience that if you are just one person, it can very well take months upon months to come up with a good game and maybe close to a year to come up with a great game.

If you’ve ever developed a great game or even just an average game, you should also know the value of having a free Lite Version for your paid Full Version. If your game requires a purchase of even .99 cents you should make sure that you provide users with a Lite / Trial Version of your game that they don’t have to pay for. The purpose of having a Lite Version is so that they can try out your game with the other reason being of course marketing.

Everyone will download the free version over the paid version so what you have to do is make sure that your free version leaves with some sort of cliff hanger, something that will make the user want to purchase your full version to continue playing. If you’ve ever watched a season of any TV show, you’ll see that at the end of the season it leaves you with a cliff hanger and by the time the new season comes on, you can hardly contain yourself. This is what your game should do, it should make the user curious about what comes next, what will happen to the hero at the end of the story???

Anyways, enough of that… let’s get on with the tutorial. I will be showing you how to implement within Xcode a really quick and easy method to keep your Full and Lite versions separate but together…

An overview of what we will be doing is outlined in the steps below:

  • Start a new XCode Project
  • Duplicate the current Target
  • Rename the Duplicated Target
  • Rename the Duplicated Info.plist File
  • Change the Icons in the Duplicated Info.plist file to use the Lite Version Icons
  • Change the Bundle Identifier to match with the bundle identifier from Apple for the Lite Version
  • Edit Build Properties of the Duplicated Target
    - Add C / C++ Compiler Flags
    - Change the Product Name
    - Change the name of the Info.plist file to the name of the Duplicated Info.plist File
  • Add Logic to code to separate features of Lite and Full version.

As you can see, in only a few steps we can set up our app’s environment to make it very easy to have a lite and full version within the same project and be able to build them separately. In the tutorial listed below I will be covering what I have outlined above with a lot more details and screen shots.

Let’s Start by Opening Xcode and starting a new project. I’ll be starting a new Cocos2D project as you can see in the Screen shot below and I’ll be calling it MyGame.

After you’ve started a new project and Xcode has finished loading you will need to look on the bottom left side of the window. You’ll need to locate and expand the Targets group and then right-click and click on duplicate. See the screen shots below for an example.

This will make a duplicate of the MyGame Target, and will also create a duplicate of the Info.plist file. Next we will need to rename the duplication of the MyGame Target. I’m going to use the name MyGameLite. We will also need to rename the duplicated Info.plist file, and for simplicity I just named mine InfoLite.plist, to keep a standard naming convention. You can see some example screenshots below.

You’ll also notice that in the above screen shot to the right clicking the Build drop down will now show you 2 Targets, one for MyGame and one for MyGameLite.

Next we need to edit some of the Build settings for the MyGameLite Target. If its not already expanded, expand the Targets group and then right click on the MyGameLite target and from the pop-up menu, click on Get Info. An example screen shot is shown below.

After clicking on Get Info, you will be presented with a dialog box that has a number of tabs across the top of it. The tab we are interested in is the build tab. Go ahead and click on the build tab and ensure that in the Configurations drop down, that All Configurations is selected, then in the Search window type Product Name. If you are following this tutorial to the T, then your product name should say MyGame. We’ll need to change that to MyGameLite. To change it, just double-click on MyGame and then make your change and click on OK. See example screen shots below.

Don’t close the Build Settings just yet, we have a few more steps to take before we’re done. In the search bar type. Other C. This should give you results similar to the screen shot below

What we are interested in here are the “Other C Flags” and the “Other C++ Flags”. Your results may differ from mine depending if you already have some compiler flags setup. Double click on the empty space next to Other C Flags and you will get a dialog window pop up. In this window you will need to type the following without quotes: “-DLITE_VER” and then click on OK. This should set both the “Other C Flags” and the “Other C++ Flags” See screen shots below for examples.

I know that the screen shots are a little small but if you click on them you can see the images a little bigger. There is one more setting that we need to change in the Build settings and that is to specify the name of our Info.plist file. Currently it is still defined as Info.plist but we want to set it to InfoLite.plist so that the build settings match.

Go ahead and type Info.plist File and locate the “Info.plist File” string which should read “Info Copy.plist” or something similar. Change this string to InfoLite.plist.

You are now done with Build settings and you can safely close the Build Settings Dialog. See below for some example screen shots for renaming Info Copy.plist

Now we just need to make a few minor changes to our InfoLite.plist file and then we can start modifying some code. Locate the InfoLite.plist file, usually in the left column under the Resources group and click on it. You should see the values of the InfoLite.plist file listed in your preview window on the bottom right.

We need to change the Icon and the Bundle Identifier. To do this you simply edit each with the proper names. For instance, I used IconLite.png for my icon file and used com.domain.mygamelite for the bundle identifier.

The bundle ID’s for the Lite and Full version of your game must be different in order for Apple to recognize that they are 2 separate applications and so that you don’t run into any issues when using the uploader.

That’s pretty much it for setting up the environment. It seems like a lengthy task, but once you’ve done it a few times, it should only take you about 5 min or so to get your environment setup for multiple apps within one project.

So lets go ahead and do some coding so I can show you how to use the environment we just setup to differentiate your code from being for your Lite version or for your Full version.

Within any file in your Xcode project, I am using a Cocos2D template so I will be using HelloWorldScene.m, all you have to do is place the following code:

#ifdef LITE_VER
//- Code that should be executed if the build target is set to MyGameLite
 
#else
//- Code that should be executed if the build target is set to MyGame
 
#endif

What the above code does is, it checks for compiler flags of LITE_VER, remember when we set the Other C and C++ Flags? Well this is where they get used. Anything between

#ifdef LITE_VER

and

#else

will get compiled if the Lite version build target is selected while everything between

#else

and

#endif

will not. You should be able to figure out how to move forward from here. I suggest that this be the first thing you do before starting the development of your game. The game I am currently working on is about 45% finished and it just now occurred to me that I need to start thinking about a Lite version. Even if you think that you will be making a free app, go ahead and make a Lite version anyways, you never know, and you might change your mind later.

Believe me, this is much easier to implement when you haven’t already spent months writing thousands of lines of code :(

So… I’m hoping that this was able to help someone, and if anyone needs any help or has any questions, feel free to leave me a comment.. Happy Developing

Since the introduction to the iPhone 4, we now have some additional icons we need to create to support the Hi-Res graphics of the iPhones Retinal Display. Altogether we now have a total of 6 app icons, each with a different pixel size in order to support all devices they are as follows:

  • iPhone 4 Hi-Res App Icon ( 114 x 114 )
  • iPhone App Icon ( 57 x 57 )
  • iPad App Icon ( 72 x 72 )
  • iphone 4 Hi-Res Spotlight Icon ( 58 x 58 )
  • iPhone Spotlight Icon ( 29 x 29 )
  • iPad Spotlight Icon ( 50 x 50 )

After recently developing a few iPhone apps, I found it to be a redundant task to create 6 icons every time I make a new app. To make this process faster, I’ve created a php script that takes the highest resolution icon and converts it down to the 6 icons required.

You can find this script at my company website at http://empoc.com/ios-icons/

It only takes a few seconds to create all of the icons and when the script has finished running you will be able to download them all in a nicely zipped up file. I’ve also got instructions there that will show you what to do with the icons once you’ve downloaded them.

Please have a look and let me know what you think…

Applications are that access the internet / network upon startup are becoming more and more common. With that in mind, have you ever developed an iPhone app that needs to parse some XML data upon startup? Do you know what happens when your app is launched and it has to sit and wait while data is being received? Nothing happens, nothing but a black screen until your app finally loads.

As far as I’m concerned, that is not the best way to convey your companies image to the end user. Why not put something up for the user to look at while they are waiting for your app to load.

Apple has made this process quite simple.

Start by making yourself a splash image in Photoshop or any other graphics editing software you would prefer. There are 2 different resolutions you can use depending on if you are hiding or showing the status bar.

If you are showing the status bar then you should use 320 x 460 if not then you can use 320 x 480

When you are done creating your splash image, save it as Default.png (Note: the image name is case sensitive)

Copy the created image to the root of your resources folder within your XCode project.

That’s it, that is all there is to it. The Default.png image will load up as soon as you launch your app and will go away as soon as your application is done loading.

A word of caution, Apple implemented this feature to make loading times less visible to the user and recommends that you should use a screen shot of your app’s main view. There have been reports of apps being rejected on the App Store for including lines such as “loading…” or “waiting…” on the splash screen, although these are few and far between.