You can learn anything on Udemy. Start today with one of our 10,000+ online courses

Creating iOS games for beginners

Marin Todorov teaches you how to create an iPhone game easily and simply using Cocos2d
11 reviews
WHAT'S INSIDE
  • Lifetime access to 18 lectures
  • 6+ hours of high quality content
  • A community of 3800+ students learning together!
  • 50+ discussions
TAUGHT BY
  • Marin Todorov Independent iOS dev and publisher

    Marin Todorov is an independent iOS developer and publisher with 10 fun and innovative titles released on the App Store. He's got experience in developing software on many different platforms- on the desktop, in the cloud and at present the iPhone. Marin was a university teacher for several years and also wrote a textbook on programming related to his course. He has published numerous technical articles in print and online media; his last larger contribution were a couple of articles on security and bundled databases to a book from Adobe and O'Reilly.

    Marin is also very active in the iOS developer community - he's regularly writing in his blog about iPhone development and the App Store in general: www.touch-code-magazine.com ; he also sometimes writes guest posts and tutorials on other popular websites.

SHARE

Creating iOS games for beginners

Marin Todorov teaches you how to create an iPhone game easily and simply using Cocos2d
11 reviews

Where would we be without the games? Angry Birds, Cut The Rope, Peggle? Each one is as unique as they come, but they're tied together to one simple principle: Cocos2d can make them. Cocos2d is the leading, open-source, royalty-free smartphone game engine. It's easy to use, community-supported, reliable, mature, and over 1500 mobile iOS games have been published using it!

Why is Cocos2D so easy to use? Because you can play a sound effect, animate a flipping sprite, flash some rad custom font, all with just a couple lines of simple, pure Objective C code. No knowledge of OpenGL is required! Rotating, mirroring, parallaxing, scaling, tinting, sliding, jumping, and a Halloween-sackful of other effects are quickly at your fingertips.

In his course, Marin Todorov takes a hands-on approach and walks you step-by-step through the process of building a complete game! After building this game, you'll have all the coding knowledge you need to create the next gaming hit in the App Store!

    • You will be expected to have beginner/medium understanding of Objective-C
    • You will need to work on a Mac computer with installed XCode 4.x+
    • You will need to be connected to the Internet
    • Over 18 lectures and 7 hours of content!
    • Install and include Cocos2d for iPhone in your projects
    • Understand scene workflow in Cocos2d
    • Work with scene transitions
    • Put image sprites on the screen and manipulate their properties
    • Run animations and actions on your sprites
    • Chain and run simultaneously different actions
    • Build menus in Cocos2d
    • Plan and design a simple game
    • Develop simple games
    • and much more..
    • Developers with beginner to medium or higher understanding of Xcode, Objective-C and iPhone programming, who would like to know more about the steps towards creating games with the Cocos2d framework.

CURRICULUM

  • SECTION 1:
    Introduction to the course
  • 1
    Introduction to the Cocos2d 101 course
    03:39

    In this short video you will learn about:

    - Marin Todorov - the course author

    - the material the course will cover

    - the complete game project you will have developed by the end of the course

    Have a look at the video for more information on the course and Cocos2d! Hope you will decide to take the course!

  • SECTION 2:
    Installing and understanding Cocos2d
  • 2
    Installing Cocos2d and using the XCode project templates
    39:20

    Let's start!

    I will talk about what Cocos2d is and will provide you a bit of background about it. We'll go trough the installation process and how Cocos2d integrates directly inside your Xcode installation.

    To some the lesson might feel a bit too detailed, but for me is important everyone manages to finish the installation and understand well how to use the Cocos2d installation.

    ~~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - downloading and installing Cocos2d framework

    - creating Cocos2d powered projects in XCode

    - what comes in the different Cocos2d project templates

  • 3
    Cocos2d Hierarchy, Scenes, Layers, Nodes
    42:47

    Let's talk about scenes workflow - how the different screens in a game relate, how to navigate between screens. How to create new screens inside your game and how to use fancy transitions to interchange them. 

    You're going to learn about the Cocos2d hierarchy and who stays on the top

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - understanding cocos2d hierarchy

    - learning about scenes and layers

    - using transitions to switch between scenes

  • 4
    Introduction to Sprites and Menus
    27:42

    I'll talk about some oddities about Cocos2d, namely the coordinate system and the ability to set the sprites' anchor point.

    We're going to start loading images from the game project and showing them on the screen and change their appearance. We're take a step further and build menus, so we can have the game reacting to the user tapping the screen of the device:

    ~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - Cocos2d coordinate system and positioning objects on the screen

    - loading images and showing sprites on the screen

    - creating a menu with different buttons reacting to user taps

  • 5
    Run actions on your sprites and first steps in frame animation
    34:27

    We're going to make our sprites move around the screen, rotate and blink! This will already feel much more like game development. We're going to move from simple actions like rotation and movement towards complicated chain actions and running simultaneous actions.

    In the end we're going to load frame animation and run it on a sprite of the screen. 

    ~~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - make your sprites move, rotate & blink with actions

    - run several simultaneous or chained actions 

    - run animations on your sprites and combine them with other actions

  • 6
    Project demo - Sprites and Actions
    925.52 KB

    This is an XCode project you can download - it contains the source code from the previous lesson - but instead of chickens you have monkeys :)

    Download it and unarchive it as we're going to use it as a starting point for the next lesson.

    You are encouraged to play with the code and experiment yourself, you already know what is what and who is who, so start playing! 

    Here's some ideas: 

    1) Have you already tried all the CCSprite's properties for yourself, have you seen the effect of changing them? There's plenty to start with:

    - position
    - zOrder - you can order your sprites on the Z axis
    - skewX, skewY - skew your images
    - rotation - rotation of your image in degrees
    - scale - scale of the image
    - scaleX, scaleY - stretch your image on the x and y axis
    - visible - yes or no
    - anchorPoint - CGPoint with coords from 0 to 1 (check the lesson again about it)
    - flipX, flipY - flips the image
    - opacity - from 0 to 255, 0 means invisible

    2) give all CCAction classes a try! make this monkey go wild :) Btw - here's a task for you - make the monkey do the moon walk.

    And here's a list of the actions you can give a try to:

    - CCMoveBy, CCMoveTo - move your images around
    - CCJumpBy, CCJumpTo - make your sprites jump
    - CCBezierBy, CCBezierTo - make sprites move on bezier paths
    - CCScaleBy, CCScaleTo - scale actions
    - CCRotateBy, CCRotateTo - rotate sprites
    - CCBlink - blink blink
    - CCFadeIn, CCFadeOut, CCFadeTo - different fade actions
    - CCTintBy, CCTintTo - you can change the tint of your sprites
    - CCSpawn - run simultaneous actions
    - CCSequence - run a chain of actions one after each other
    - CCDelayTime - wait a given amount of seconds
    - CCRepeat, CCRepeatForever - repeat the given action
    - CCCallFunc - execute given method (obsolete now, just so you know)
    - CCCallBlock -  execute the code in the provided code block
    - CCAnimate - gets a frame animation and runs it on the given sprite

    For more information on actions and example you can head to : http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:index

  • SECTION 3:
    Your first game - "Monkey Trampoline"
  • 7
    Creating your first game - Monkey Trampoline
    29:56

    Building on the chicken example from Lesson 5 we're going to replace the chicken with a sweet monkey. We're going to talk about planning a game, defining the game goals and how to approach coding the game logic.

    By the end of this lesson you will have developed your first game!

    ~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - planning a simple game

    - bringing it all together - buttons, animations and logic

    - running a simple game

  • 8
    Monkey Trampoline source code
    912.37 KB

    Here you can download the source code of the game Monkey Trampoline.

    Exercise to try:

    - add a "You loose" screen and make it appear when the player reaches -3 points (negative 3 points)

    - add buttons to re-start the game from the win and loose screens

    - make the new monkeys fall from the sky into their starting position

  • SECTION 4:
    Deeper into Cocos2d with the "Numbers Match" game
  • 9
    Numbers Match project assets
    3.48 MB

    This is an archive containing all the images and sounds we are going to use to build our big project - Numbers Match. Do download this file on your computer before heading to Lesson 10 where we'll start designing and coding the game

  • 10
    Starting with the Numbers Match project
    43:07

    We're going to go over the Numbers match game project - the scenes flow and the basic layout of the gameplay screen. I'm going to showcase the assets prepared for the project and after some house-cleaning inside the default Cocos2d template we're going to start coding.

    Generally throughout the Numbers match project I'm going to go a bit faster trough the code - usually pasting in methods and then explaining what's going on inside the code. This will allow me to keep the length of the tutorial to a sane length - once you finish the course you are welcome to re-watch these videos while you tingle with the code of the complete project. 

    ~~~~~~~~~~~~~~~~~~

    In this lesson:

    - planning the Numbers Match game

    - setting up the project and importing assets

    - beginning the TileSprite class which will take care of a single tile in the game

  • 11
    Creating the tile set and adding about screen
    44:22

    We're going to implement the game controller - the MatchManager class, which by using the nearly ready TileSprite class will by the end of the lesson be able to show the tile set on the screen.

    To keep momentum we're going to alternate the workflow with adding the about screen.

    ~~~~~~~~~~~~~~~~~~

    In this lesson:

    - creating a super-flexible game controller which can be used in many different tile matching games

    - showing the tile set on the screen

    - adding a second scene to the game, which is pushed over the gameplay scene instead of replacing it

  • 12
    Implementing the game logic
    43:22

    We're going to create our custom action to flip around the tiles and touch shortly on the CCAction mechanics; we're going to accept touches from from the player and via the match manager pass them to the tapped tiles. We're going to implement the logic behind marking the matching tiles and finally show the winning sequence - animation, sound + the option to restart the game.

    ~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - using the orbit camera action for 3d flip effect and writing a custom Cocos2d action

    - implementing the logic dispatching touches to tiles and the complete game 
    logic 

    - coding the animation and effects to reward the player when he/she opens all matching tiles

  • 13
    Completing the Numbers match project!
    25:35

    In this lesson you'll go trough the last remaining tasks to really polish the game. The game will be complete and running by the half of the lesson. 

    In the second half I'll take you trough some tricks I'm using when developing games, namely: producing hi-res and low-res graphics for your game in half the time, preparing your audio for use on the iPhone and cocos2d, showcase a couple of web sites where you can find free art and free music to use in your games.

    Thanks a lot for taking the course! Leave comments and feedback, so I can take them in account when producing my next course.

    To get in touch with me visit my blog: www.touch-code-magazine.com

    Best wishes, Marin Todorov

    ~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    - implementing the hints logic and finish the Numbers Match game

    - going over how to import audio in your game and how to bulk produce retina and non-retina graphics

    - showcasing few web resources you might find useful when you create your own games

  • 14
    Numbers Match complete project source code
    4.06 MB

    Here you can download the complete source code and the project assets of the Numbers Match project.

    I wish you lots of fun time with the game and lots of luck and success on the App Store.

  • SECTION 5:
    Bonus game - "Bubble Pop"
  • 15
    Bubble Pop Assets
    1.85 MB

    In this chapter we're going to create a new fun game called "Bubble Pop".

    Please before proceeding to the video lesson - download and unarchive the "BubblePopAssets.zip" file and have it at hand for the next lesson.

  • 16
    Creating the Bubble Pop game
    31:32

    I tell you about the game we're about to create, we import the game assets (download the zip from Lesson 15, do that before starting with this video) and dive into coding the game layout and implementing a game timer.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    1. plan the game and import the game assets
    2. implement the game timer
    3. create a cusom CCMenuItemImage class for our bubbles
  • 17
    Bubble Pop - part 2
    41:46

    I continue on the Bubble Pop project by implenting the bubbles logic, finishing the complete game with loose and win scenarious, and in the end add audio effects and in-game music.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In this lesson:

    1. dynamically add menu items - our custom baloon buttons
    2. manage cocos2d node's children
    3. add in-game music
  • 18
    Bubble Pop Project Source Code
    2.6 MB

    And here is the complete Bubble Pop game XCode project, which you can download and play around with.

    Thanks for attending Cocos2d101 and let me know if you would like to see anything in particular added to the course, I might be adding some new stuff in the future again.

RATING

  • 5
  • 3
  • 1
  • 0
  • 2
AVERAGE RATING
NUMBER OF RATINGS
11

REVIEWS

  • Pablo Rosero
    I want a refund.

    I found this course to be terrible, sorry. It's not straight to the point. One thing is to explain the basics, another is to use 2 of the first hours to talk about unnecessary stuff. He talks unclear, full of "umm"s and "so on"s. He also cofs a couple of times, I mean, couldn't the audio have been edited? I want a refund.

  • Mario Fernandes
    best cocos2d course

    this is a great course to learn make games with cocos2d.

  • Rune Kjeldsen
    Great introduction to Cocos2d

    The course walks you through how to make three very different games, in terms of gameplay and code. The lessons are quite long, but Marin explains everything he does and what the code does very well. If you have looked at Cocos2d and wondered where to go after the first Tutorial, this is a great next step.

  • Manoel
    I'm sorry but I didnt like the course. Can I get a refund?

    I'm sorry but I didnt like the course. Can I get a refund?

  • Phil Vinson
    Great

    This is very helpful. A little over my head since I'm not a programmer, but I'm learning. Good stuff.

  • 30 day money back guarantee!
  • Lifetime Access. No Limits!
  • Mobile Accessibility
  • Certificate of Completion