And here I thought Zwoptex, and that’s going to be it in terms of Texture Atlas creation. Much to my surprise I found the TexturePacker tool. But in comparison to Zwoptex, it doesn’t have a GUI, it’s a command line utility. On the other hand, it does everything automatically and is probably going to be a great choice for any automated procession. It can output in both Cocos2D and Corona formats.
The TexturePacker is available from the code’n’web website and costs around $15 (€10).
It has a few very interesting features, for example removal of duplicate images and color reduction. Check out the feature comparison chart on the Cocos2D wiki.
AccSim written by Otto Chrons is an App (download on iTunes) that allows you to control your game running in the Simulator with your iOS device. Meaning, the game plays in the Simulator but accelerometer input is actually coming from your device! You can learn more about it on the Built.By.Me website, which includes a sample video:
Hmmm … somehow this game seems strangely familiar. 😀
AccSim doesn’t pack the same punch as iSimulate does, which can also be used for sending multi-touch input, GPS and Compass events to the Simulator, plus a lot more. But the good thing about AccSim is that it’s not just free but the AccSim source code is open source!
Due to a number of breaking changes in the recent Cocos2D beta versions, including the rename of the Cocos2D project to cocos2d-ios.xcodeproj, I’ve made an update to my Xcode project. You know, the one from this tutorial that allows you to keep Cocos2D completely seperate from your own code, which in turn enables you to easily and safely up- and downgrade Cocos2D by merely replacing the Cocos2D folder.
So now it also works with Cocos2D and here is the download:
Download the Xcode Project (Cocos2D v0.99.5 beta 3 and later)
What you have to do to upgrade the project, in case you already started a project with my older Xcode template but would like to upgrade to Cocos2D v0.99.5 beta 3:
- remove the cocos2d-iphone project from your Xcode project
- follow these instructions from Select the Project itself up to and including Drag & Drop Libraries to Target
- (don’t forget to repeat the instructions for all targets you’re using, not just the current one)
- clean all targets and build
Note: depending on the iOS SDK version you’re on, you may have to Get Info on the Xcode project as well as the cocos2d-ios project and on the General tab set the Base SDK to iOS 4.x, then close and re-open the project (Xcode should update the SDK version immediately but sometimes it doesn’t).
If you plan to use Cocos2D v0.99.4 then the Xcode project supporting this Cocos2D version is still available here.
This list is a collection of exemplary games and apps made with the Cocos2D for iPhone game engine. They should be seen as reference products in terms of what you can do with Cocos2D and simply the variety of games and apps developers have created with Cocos2D. This post is linked to from the Cocos2D book.
If you wish to add a game or app to this list, and you can provide prove or guarantee that it was made with Cocos2D, please leave a comment. From time to time I’ll move the notable mentions up to the actual blog post and delete it from the comments (to avoid duplication) but you can still grab some attention and a little traffic to your game by simply adding a comment to it here. And don’t forget that the official Cocos2D website has a games page, where you can also add yours.
Note: the order of the apps in this list is arbitrary, although I try to group similar apps together.
The “Great Apps Made With Cocos2D” List
The Elements (iPad) is a graphical representation of the periodic table of elements. The outstanding feature is the plentiful photographs and smooth 360 animations which invite you to explore the elements that make up you, me and the rest of the universe (excluding empty space, of which there’s a lot I’ve been told). It’s priced highly but worth every cent, and if you need an App to brag about your new iPad: this is it!
Note: iPad demo starts at 2:55
Bloomies is a colorful gardening game, full of bees. If that doesn’t sway you over, maybe the idea of fostering and nurturing your own garden does. The flowers need your constant attention and the gameplay is addictive just like any Tamagotchi-style game. Oh, and it happens to be made by two former colleagues of mine. It’s just a beautiful game, and so is their follow-up game Super Blast.
StickWars is a sort of Tower Defense game where you defend your castle from incoming stick figures by flicking them in the air or literally shaking them to the ground. The developer, John Hartzog, had never before worked with Objective-C or on mobile devices but he pulled it off. StickWars remains to this date within the Top 100 games and continues to be updated even a years after the initial release.
ZombieSmash is also a Castle Defense game, except that this time hordes of zombies are attacking and you get explosives, 16 ton weights, shotguns and other cool items that make a bloody mess to fend them off. Your castle is your barn and if you can defend it, you’ll be rewarded with a slow motion animation of the final zombie losings its, err, unlife. The outstanding feature of this game is certainly the ragdoll animation system that allows zombies to walk, crawl or otherwise try to move even if they lost some of their limbs.
Super Turbo Action Pig revives a simple gameplay concept of a scrolling level where your character always falls down except when you touch the screen to boost his jetpack. The extraordinary part here is that the game’s graphics are extremely well made and the overall presentation of the game, the trailer, the website and the humor are setting a great example.
Farmville, do I even have to explain what it’s about? It’s an incredibly successful Facebook game that has millions of players worldwide building their farms in an isometric landscape. It just goes to show how powerful Cocos2D is if a company like Zynga uses it to port it’s most successful game to the iPhone.
Zombie Farm came out on the iPhone even before Farmville, and it was also created with Cocos2D. It does have it’s own, unique edge and stands well on its own. If you have enjoyed Farmville, you haven’t played Zombie Farm yet! Visit the Zombie Farm forum thread.
Melvin Says There’s Monsters (iPad) is a beautifully animated cartoon kid story with professional quality voice overs. The story is cleverly constructed and has an insightful turning point. It’s a pleasure to watch even for an adult, and it also uses Cocos2D’s page flip animations very effectively. If you have an iPad and kids, it’s a must have!
Alice (iPad) is also a shining example of a kid’s book app for the iPad, made with Cocos2D and lots of Chipmunk physics mixed in for good measure. Visit the Alice forum thread.
Trainyard is an innovative puzzle game that was clearly engineered with the user in mind. It features a mode for the color blind, is optimized to use little battery power, saves and loads the game just as the user left it and even allows users to share puzzle solutions on the web, using a duplicate of the game engine written in Flash. This all besides being a really innovative puzzle game where you lay tracks and combine trains to match them with colored trainyards.
AbstractWar 2.0 is a dual-stick shooter featuring colorful and effectful geometric visuals like its role model game Geometry Wars on Xbox Live Arcade. It’s an intense space shooter with plenty of game modes. You can even play it in multiplayer via a Bluetooth connection and it allows you to use your own iPod music.
Fuji Leaves is an interesting music game, where dropping balls hit leaves and depending on speed and location of impact, a sound is played. With several balls on the screen bouncing around you can dynamically create musical scores. It’s intensely fascinating to play this game, trying to come up with interesting scores and just the right placement of leaves. Before you know it, an hour has passed.
Moonlights borrows the grid-building physics from another popular Indie game. If you wouldn’t know it, on first sight Moonlights looks and feels just like World of Goo, and that alone is no mean feat. Visit the Moonlights forum thread.
Checkmates Chess (iPad) is as gorgeous and elegant as chess can be. You can play against another human or the computer (well, against the iPad to be precise). Making use of the full size of the iPad, you can now leave your pieces at home. Visit the Checkmates Chess forum thread.
Regardless, this may be the answer. Or as close to it as any publicly shared link list not hosted on link aggregator sites could ever be. I’m talking about Amit Patel’s Game Programming Information pages. There’s something for everyone, but specifically a lot of articles about pathfinding, AI and tile-based games including procedural world generation.
Chapter 15 - The Final Chapter
This is it. The last one. I don’t know what’s going to be in it. It’s supposed to give the reader a “where to go next” kind of outlook. I hope that one of the places will be here, but obviously there’s tons of places to go and tons of things for cocos2d developers to learn.
If you have a particular idea what should be included in the greater cocos2d developer outlook kind of sense, please let me know!
Summary of working on Chapter 14 - Game Center
Amazing! Simply amazing. I think I fell in love with Game Center in the process, I haven’t worked with a networking API that’s so smooth, straightforward and easy to comprehend. No thanks to Apple’s already excellent step-by-step documentation. Still, there were a couple pitfalls and things that one could forget, and I did, that I’ve obviously included in the chapter.
On the other side, with almost a week late for this chapter, I realized how time consuming network programming is. There’s a lot of testing going on, and especially if you’re testing on two devices the process is incredibly inefficient compared to a simple single-player game. You always have to deploy to two devices for every test, and every time the delay between request and response adds to the time spent on testing. Add to that common network errors such as a drop in connection or something blocking the line with a download, and you’re up for a fun ride.
But that alone didn’t account for the one week delay. In the past two weeks I’ve been helping to renovate someone’s apartment, I got a cold, I held a presentation at the Macoun Mac OS X conference (about cocos2d obviously) while still recovering from the cold. Then our pet cat Yoshi had to see the vet and almost died during anesthesia because of a pulmonary edema. On the brighter side I’ve also attended a wedding and wrote a GameKitHelper class for this chapter which contains more stuff than I could describe in the book, including storing achievements which failed transmission, as is recommended but not implemented by Apple’s Game Center Programming Guide.
That’s also why I haven’t been answering emails timely recently. Please be patient, I’ll get to yours soon!
What’s left?
Now that I’m almost finished writing the book, what’s left? Obviously I have to review technical and other edits done by Apress. Current chapter 13 is in technical review while chapter 6 is in editorial review, after which it’s ready for production. So I’ll still be busy reviewing and making changes and additions to chapters during October and probably even November.
Then there’s the issue of the example projects having used three different versions of cocos2d, starting with 0.99.3. That was actually an oversight on my part because at the time I had 0.99.4 available. Luckily those changes are really insignificant for the first few projects. The DoodleDrop game already uses 0.99.4 and so does most of the book’s code. But for the Game Center chapter, I had to migrate the Tilemap project from 0.99.5 beta 1 to beta 3 and that was a huge step. It was easier to simply create a new project from the latest cocos2d template, then re-adding all game source code and resources to the new project. Still, that’s doable.
The bigger issue I have here is the fact that I can’t change anything in the book anymore, so the code should reflect what’s in the book. If the book mentions CCLabel then the code should use CCLabel and not CCLabelTTF. What I think is probably going to be a good compromise is to update the important (final) versions of each chapter’s example projects to cocos2d v1.0 once that is released. Obviously the code supplied with the book will remain as it is described in the book, so the upgraded code would be for reference only and a separate download. Whether I wait for v1.0 depends on how progress towards v1.0 is coming along around the book’s release date some time in December 2010.
In hindsight, I really wished I had used my Xcode template project and used that throughout the book. Back then I decided against it because it was important for me to write the code like almost all cocos2d developers would do. Now I regret the decision because I could have changed the way cocos2d developers start new cocos2d projects for the better. The whole updating process for cocos2d is a major PITA and then some, so I think I need to bring this issue to the table more frequently, more actively. At least until the cocos2d template installation procedure is changed to not copy all of the source code into each new project and then leaving it up to the developer to deal with upgrades.
I’m back from Macoun, and it was nice meeting you all! Well, actually since that conference was just a 90 minute ride away, so I wasn’t really gone, except mentally. I spent a lot of time last week to prepare my presentation (in german), and fighting a cold. The subject was a game component system that I wrote on top of cocos2d, to encapsulate most of the cocos2d CCNode stuff and allowing me to focus on writing re-usable gameplay components. The system works but it’s not production tested. Still it’s proven very promising from my initial tests and opens some interesting opportunities, for example the re-use of components is a huge timesaver, and you can totally get rid of any class hierarchy and remain flexible throughout development. Due to writing the book and other things I hadn’t had the time to develop it as much as I wanted to. I’ll release it eventually but for the moment, I have a different focus.
For one, I’m late with the Game Center chapter due to the Macoun conference preparations, an upcoming wedding and an apartment renovation of the soon-to-be-wed as their wedding gift. So I’ll try to cram writing both the Game Center chapter and the final chapter in this week, before turning my attention to updating the Line-Drawing Starterkit and Xcode project. I did not intend to support non-beta versions of cocos2d, but given how long the recent betas last and how many developers actually use the latest beta (probably due to HD support) and how significant the breaking changes are this time, I’m going to update the starterkit and Xcode project with HD support while keeping the old project for those who would rather use the stable 0.99.4 version of cocos2d. Once that’s done, it’ll be mid of October and another project, only partly concerning cocos2d, kicks in full speed. No time to lose.
Speaking of the Starterkit, September went by and I made 10 sales, without advertising it or anything, so those numbers are at the lower end of the “potential sales” spectrum. That’s a sum (over $1,500) that I can live with. Well, actually, that’s a sum that I can live off of. On a related matter, I recently found a page detailling the traffic stats of the cocos2d-iphone.org website. If those stats are correct, the unique visits are over ten times that of my site. Now, frankly speaking, every time I get those little facts and stats from here and there over the past couple months, and then added up the numbers, compared them with mine, applied reasonably pessimistic estimations and caution, I do wonder: why the hell isn’t cocos2d run like a business?
If you ask me, with those traffic stats and a reasonable conversion rate of 0.1% per unique visitor (mine is over 0.2%), one could easily pay 3 people to develop cocos2d, test it, write documentation, moderate the forum, and in general adding more business value. Which in turn grows the business, speeds up the development of the engine, tools and by-products and will make everyone benefit from that. I don’t get it. Because at this point, it’s either going to be that, or a slow decline to a niche product over the next couple years due to the increasingly strong competition from other iOS engines. Especially those that offer cross-platform support, since that’s what contractors are asking for, or even demanding, more and more.
Anyhow, for my part, I decided that now would be a good time to start doing the Indie thing full-time, still accepting contract work but I’m able to be a lot pickier about it. I have a goal set out for myself, and it’s not a simple one. I’ve always enjoyed most to help my colleagues, to fix their problems, to support them and in general, to help them achieve excellence. I know, that sounds like something you’d find in EA’s job matrix - and in fact, you do. Helping others achieve excellence, throughout my professional career, that’s what I’ve been doing and enjoying the most. Now I find myself doing that for cocos2d developers, enjoying it and being able to support myself in the process. Well, I think I’ll have to thank you, my dear readers, for that.
As a thank you back, I’ve started working on a bigger project about 3 months ago that will be useful and helpful to many indie game developers, regardless of the engine you may be using. Hence it deserves its own website and a cool name (darn, that is hard!). I’m looking forward to really getting into high gear with it after I’ve submitted the remaining book chapters. Stay tuned.