RPG Battle in cocos2d part two.

This post is a continuation of RPG Battle in cocos2d part one. We are going to add a random attack strength with in a given range, a critical attack and an animation for the attacks. Continue reading

Posted in cocos2d | 12 Comments

error: There is no SDK with the name or path ‘iphoneos4.0′

This post will show you how to fix this error.
Continue reading

Posted in cocos2d, Errors | 1 Comment

Why oh why do I have a memory leek.

This post will not tell you how to find and fix your memory leek but I intend to show you the most common cause of a memory leek. Continue reading

Posted in cocos2d | 5 Comments

Adding a pause menu 2 in cocos2d

I found a bug in the pause menu. If you let the iphone or ipod touch rest so that you have to unlock it the game will resume but the pause screen will still be up. This will show you how to fix that. Continue reading

Posted in cocos2d | 5 Comments

Labels in cocos2d

This tutorial will show you how to initialize a Label, change its position, change its color, and change what is displayed in the label. Continue reading

Posted in cocos2d | 1 Comment

Random numbers

To create a random number you use this line of code.

int Number= (arc4random() % ModNumber)+Firstnumber;

so this is relatively simple, arc4ramdom() will create a random int -2147483648 to 2147483647. Then we mod, when we mod an integer it gives us the remainder. If we where to mod 5%2 we would get 1, because 2 goes into 5, 2 times and we are then left with the remainder of 1. So for the Mod Number you will replace it with how many numbers you want to get out of the random number. If you wanted a dice to roll you would want 6 numbers, so your code would look like following.

int Number= (arc4random() % 6);

The only problem with the code is it creates a random number 0-5. We fix it by adding a one to the end.

int Number= (arc4random() % 6)+1;

Now the code generates a number 1-6. The number you add to the end is the first num you want in the range of random numbers, and the ModNumber is how many numbers you want in the range.

Copy right Britney Lee Johnson August 2010.

Posted in cocos2d | Leave a comment

RPG Battle in cocos2d part one.

We will be creating a battle scene that could be used in an rpg game.

Continue reading

Posted in cocos2d | 8 Comments

What you need to create an iphone game.

What you need to create an iphone game.

An original idea,

Game play,

Sound,

Graphics,

Story,

An original idea

Everything about your game does not have to be original, but the main theme of your game should be. One game I love for the computer is mushroom farm revolution, it is a tower defense game, like so many others, but you can play as mushrooms.

All you have to do is have one original Idea to make an ok game. Note that your game must also be playable. The more originality you put in your game the better.

Game play

Game play must be a balance between simple and complex. You must make your game so that anyone can pick up and play it, but it must be complex enough that users can play it for hours.

Sound

Sound is one of the most overlooked aspects of a game. When I play a game I turn the sound off, but everyone I have talked to about creating Iphone games always talks about angry birds. Their favorite part about angry birds is the sound effects. The pigs laugh at you when you loose and that fuels something inside the people that play it to beat that level. Try to make something original if you make something in garage band that is not bad but a music lover will know the difference between original and garage band.

Graphics

If you don’t have an artistic talent like me, find someone else to do your graphics. You can look for artists on http://www.deviantart.com/ a lot of artiest will do commissions. The art of your game is your advertising. If you do well in the art aspect, apple just might put you on their new and note worthy.

Story

If you are going to have a story in your game make it great. If you don’t know how to make a story and you really want one you have two options. One hire a good writer, or learn how to write. The best way to learn how to write is to read fiction, read writing books, and study the stories of other video games.

If you do end up hiring someone to help you understand that each of these elements is important. Never think that your part is the only element that matters. You can choose what you pay people but for my games I split everything evenly. Each game is different and each section will vary in its importance but don’t leave out anything but the story. What ever you do don’t steal art or music! You would never want anyone to steal your code you worked hard to make it and so did everyone else who has ever created something. The most important thing is to have fun. Good luck and I hope to see your games soon.

Copy right Britney Lee Johnson August 2010.

Posted in cocos2d | 2 Comments

Making it rain in Cocos2d

Read this tutorial to learn how to make it rain using particles in cocos2d. Continue reading

Posted in cocos2d | 7 Comments

Explosions with Cocos2d

With this tutorial you will learn how to create a function that will play an animation like an explosion at a point you give it. In this example the explosion will be played at a touched location.

Continue reading

Posted in cocos2d | 2 Comments