By
iPhone Game Tutor | Published on
September 23, 2010 in
Cocos2d, Intermediate and Slide Image.
Tags: ccaction, CCDirector, ccmoveto, CCSpriteFrame, cocos2d, code, Download, Example, game, iphone, slide image, source code, sprites, tile based games, tiles, tutorial, Tutorials.
It’s been a week since our last tutorial and in this new tutorial, we’re going to actually tackle a game – A slider game… You know the type of game I’m talking about, the players job is to put a game that is jumbled up, back together again. The great thing about games of this type is that we can use this as our first foray into the world of tile based games.
So what do we need to create this wonderful type of game? Below are a list of steps to make your own tile based slider game:
- Create a “Tile” class that has a sprite, a position and a value
- Create a manager type class that will create all the tiles and keep track of them
- Add touch components that will allow the user to swap tile locations
- Add additional image randomizations so there is more variety in the game
That’s it… Sounds simple when written out, huh? Well, we’re going to go through it and show you that it can be simple.
Source Code after the break!
Continue reading ‘Building a Slide Image Game’
By
iPhone Game Tutor | Published on
September 14, 2010 in
Beginner, Cocos2d and Getting Started.
Tags: addChild, animate, ccaction, CCAnimate, CCDirector, ccmoveto, CCSpriteFrame, CCSpriteFrameCache, CCSpriteSheet, Example, game, information, iphone, PlayLayer, runaction, SceneManager, source, source code, sprites, spriteSheetWithTexture, spriteWithFile, stopaction, Terrain, Tutorials.
So in Part 2 we introduced an animated dragon that had 8 directions of movement and was completely controllable via touching the screen. Isn’t cocos2d awesome! Well today we’re going to do a little more, today we’re going to create some villagers – tons of them in fact. We’ll use the information we’ve gotten so far including loading sprites from a sprite sheet and setting up animations.
Source Code after the break!
Continue reading ‘Cocos2d Sprite Tutorial Part 3′
So unless you’ve lived in a bubble you’ve heard that Apple has not only partially changed its policy on flash, but also posted its guidelines for getting into the app store. Obviously if the wall street journal is right then Apple wants to make more developers happy… Just don’t get too excited just yet.
Continue reading ‘Apple’s App Store Review New Guidelines’
By
iPhone Game Tutor | Published on
September 10, 2010 in
Beginner, Cocos2d and Getting Started.
Tags: ccaction, ccmoveto, cctouchbegan, cctouchended, cgpoint, class, cocos2d, code, converttonodespace, coordinatesdegrees, distance, dragon, iphone, istouchenabled, objective-c, radians, runaction, stopaction, touchlocation, tutorial, uievent, uitouch, vector, view.
So last we left, we left our dragon in the middle of a field hovering above the landscape… However, 90% of the animations we worked so hard to put in weren’t even being used and that is just a shame! Well, that changes now! We’ll now add in additional touch controls for the first time to handle user input and have the dragon fly all over the screen and picking a new animation based on the direction and terrorizing the country with your own flying dragon.
Source code after the break!
Continue reading ‘Cocos2d Sprite Tutorial Part 2′
By
iPhone Game Tutor | Published on
September 3, 2010 in
Beginner, Cocos2d and Getting Started.
Tags: Build, class, Cocos, cocos2d, code, Download, Example, game, iPad, iphone, Mac OS, objective-c, OpenGL, programming, sample, source, sprites, template, tutorial, vector, view, wiki.
Cocos2D for iPhone is a great open source framework that makes it easy to make some very impressive 2d games with much less effort than having to know OpenGL directly or rely on a third party system that might have performance issues or be unnecessarily bloated. From the official cocos2d for iphone website:
Cocos2D for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on the cocos2d design: it uses the same concepts, but instead of using python it uses Objective-C.”
Many of the most complex features are done for you, but like any open source software you can make changes as required. I however, doubt you will need to do many modifications on your own given that it’s very easy to subclass and handle drawing yourself as you become more experienced. Using Cocos2d is really one of the best ways to get your feet wet with OpenGL programming and learning Objective-C. HOWEVER, it is a programming language and that means you will need to understand the fundamental concepts of programming.
Continue reading ‘Getting Started with Cocos2d’
By
iPhone Game Tutor | Published on
September 3, 2010 in
Beginner, Getting Started, Tutorials and iPhone SDK.
Tags: code, developer, Download, game, information, iphone, iTouch, sdk.
The current SDK version as of this writing is 4.0 and Apple is looking to only support up to 3.2 of the operating system, but it’s always good to have fall backs for devices with older operating systems (I still have an iTouch with 3.1.3). An older computer of mine had only version 10.5.8 so I was initially prevented from developing iPhone games because I was missing snow leopard. Apple still allows you to download older versions of XCode though, so pick the version that your operating system supports.
Continue reading ‘iPhone SDK Getting Started’
Recent Comments