There are many Cocos2D + Storyboard tutorials, it’s about time to do another one that’s done right. Also, this one’s backwards: we’ll start with a Cocos2D template and then add Storyboards to it. The tutorial will work for existing Cocos2D projects to which you wish to add Storyboards, too!
I’ll show you how to add Storyboards to a Cocos2D v2.1 project, with ARC enabled of course. This approach will take a little more work, but the solution will be complete and you gain a fair understanding of how things work together. Plus two custom but reusable View and Navigation controller classes, and I’ll show you what changes you need to make to the AppDelegate.
The resulting project will work with iOS 5 and iOS 6 and autorotation. The navigation and cocos view controllers are separated, and you will be able to subclass them for code customizations as is customary in Cocoa. Cool? Cool, cool, cool!
As usual you can grab the example project (Cocos2D + Box2D + Storyboards with ARC enabled) from github. I’ll also be adding a Storyboards template project to KoboldTouch in the next update, and document what’s special about the KoboldTouch solution.
Oh, only one thing … this tutorial is part of Essential Cocos2D. Head on over and enjoy!
There are two classes of scrolling, "fake" and "real".
Altogether there are four ways to create a scrolling view in Cocos2D: with CCCamera, with CCFollow, manually moving a layer and "faking it".
I’ll discuss each approach and show their advantages and disadvantages as well as point out for which types of games they work best.
The example projects for this article can be downloaded from github.
Fake Scrolling – Creating the Illusion of Movement
Ideal for "endless scrolling" games. Typical genres include jumping or running games like Doodle Jump and Canabalt, as well as shoot’em ups.
These games mainly scroll along one axis, often scrolling only in one direction. The other axis has a limited range or is not scrolled at all. The fake scrolling approach prevents the coordinates of game objects to "explode" to similarly infinite coordinate points. This could introduce rounding errors in floating point values which may accumulate over time, causing inaccuracies at later stages of the game.
To create the illusion of scrolling, at least two background image sprites are needed. Four are needed if you also want to scroll a little along the minor scrolling axis. The background images must be repeating seamlessly, and each must be at least the size of the screen. The trick is to use the two or four images and move them in the opposite direction of where the player is supposedly heading. Continue reading »
Continue reading »
For one week only (until Tuesday, December 18th) CartoonSmart runs an exclusive offer for Learn Cocos2D readers:
The bundle also includes several Tutorial Videos plus free bonuses: the Isometric Pixel Art Tutorial for Photoshop, the royalty free Vector Art Collection and the first 120 pages of the interactive Cocos2D iOS Game Programming iBook.
The iOS App Development & Starter Kit Bundle normally sells for $100 but you can get it for $49.95 until Tuesday, December 18th.
This is an affiliate link – if you make a purchase I’ll receive a commission. It’ll help me pay off my new iMac (still working with a 2009 model).
Line-Drawing Starter Kit still 50% off
While I’m at it: my Line-Drawing Starterkit’s Xmas Sale (50% off to $49.95) still has some of the 100 coupon codes left!
I keep forgetting that if I don’t keep mentioning it, sales slow down dramatically. It’s called marketing (in my case: not doing enough of it). If you have a product that doesn’t sell as much as you expect – perhaps you need to mention it more? You would be surprised how much of a difference frequent blog posts or tweets can make.
So here you go. This new iMac is rather expensive.
It’s only a start to better explain how KoboldTouch compares with cocos2d-iphone.
I’m now working on a KoboldTouch mini-game to showcase the KoboldTouch workflow and features. It’ll be the basis for the KoboldTouch Introduction Tutorial.
I’ll post a video presentation of the project and key points once it’s done. If you’re interested you can follow KoboldTouch development via PivotalTracker.
The mini-game project is also very important to “eat my own dogfood”. Even just a simple game made several things that didn’t feel right obvious, and presents opportunities for improvement.
I’m happy that the KoboldTouch users requested this simple game tutorial.
Speaking of members: leaving aside the initial 2-day launch rush, on average two new members sign up every day.
If KoboldTouch continues to grow at this rate, it will have 100 members before Xmas! That would be a major milestone I did not expect to achieve before February/March!
You can help KoboldTouch by taking 5 minutes of your time to complete the Cocos2D Developer Survey. I’ll post the results in a week and what they mean for KoboldTouch.
Learn cocos2d 2 is hot off the press and it once again entered Apress’ weekly bestseller chart (see banner on far right).
Now with iOS 6 released it’s about time I updated my Affiliate Products page.
Because there have been some awesome new products released. In order of most recently released:
iOS 6 by Tutorials
Ray Wenderlich and his team wasted no time in releasing this massive 1,500 pages tutorial double-whopper that’s actually a 5-star iOS 6 gourmet menu!
Commander Cool Game Starter Kit
Create your own platformer game for iOS and Mac with this game kit made with Cocos2D. As always with CartoonSmart products, you get an hour-long video documentation. Jump, run and be cool!
Paralaxer: Cross-Platform Platformer Kit
Paralaxer is possibly the first commercial game kit available that uses Cocos2D-X. Ported to iOS, Android, Windows and Mac it also comes with a free ebook “How to Make a Platformer Game With Cocos2D-X” by Nat Weiss – who previously created the iPhone Action RPG engine.
It’s a worthy investment, and so far the only really good example code plus documentation resource for Cocos2D-X you can find.
KoboldTouch brings you the best 2D game development experience for Apple’s platforms!
KoboldTouch is the only Objective-C, ARC-enabled 2D game engine built on the Model-View-Controller (MVC) design pattern. Write ambitious games with greater ease!
KoboldTouch is also a continuously evolving, customer driven game development framework for iOS & Mac OS X, designed by game industry veterans to incorporate game development best practices and decades of experience.
Open the “About KoboldTouch” Page for Details
Fill out the KoboldTouch Survey. Let us know what you think of KT and how to make it better.
KoboldTouch is available as a subscription program that entitles you to updates and support.
Choose Your Support & Updates Plan
Recurring billing may be cancelled at any time. The yearly plan is non-recurring.
You will be charged $14.95 every month.
You will be charged $39.95 every 3 months.
You will be charged $119.95 once. No automatic rebills.
60-Day Money Back Guarantee
If you’re not satisfied you can request a refund within 60-days from the date of purchase, directly via Clickbank.
Right now I’m trying to freshen up what little I know of OpenGL ES 1.1 so I’m up to speed with OpenGL ES 2.0. I keep using the old ES 1.1 functions, so I thought I’d take the opportunity to re-learn OpenGL ES 2.0 from the ground up.
This OpenGL ES 2.0 Primer is helpful if you want to gain an understanding what’s different (and cool) about OpenGL ES 2.0 when compared to 1.1. It won’t teach you how to use OpenGL ES 2.0 though. The High-End 3D Graphics with OpenGL ES 2.0 PDF covers the concepts in greater detail, and quickly runs you through all important processes from initialization to compiling shaders to shutting down OpenGL ES 2.0. Again I didn’t learn how to program but it helped me understand the GL ES 2.0 concepts.
But what I really wanted was to learn how to do things with OpenGL in the context of cocos2d. Which means I just need to draw stuff, I don’t need to know how to load textures and setup the viewport and things like that. Nevertheless, Ray Wenderlich has done a great job explaining how to create a OpenGL ES 2.0 iPhone project from scratch. And Jeff LaMarche covered ES 2.0 shaders in great detail. Continue reading »
Continue reading »
Enabling ARC in a Cocos2D project isn’t as straightforward as it should be. I already explained all the necessary steps and precautions in the Enable ARC in a Cocos2D Project guide.
For this post I wanted to actually show you what’s needed to enable ARC in a cocos2d project as a video. Because it may not be as complex as you think. And because I wanted to experiment making tutorial videos. If you like the video (please let me know in the comments), there will be more video tutorials in the future!
I understand the introduction is a bit lengthy, I should have gotten to the point quicker. Feel free to skip forward to 02:20 where I begin with the instructions.