Iphone Cocos2d Game Day 5 – Adding an Attack for the Player

It’s now Day 5 of my Iphone game development experience. On day 4 I decided I would get rid of Box2d  from my game. It was getting a little too complex for a beginner like myself. So I spent most of the time since the last video re-writing my code without Box2d. Once I did that I added a new feature for an Attack motion the player will use to kill enemies.

In order to re-write my previous code into Cocos2d alone, I needed to solve the player motion, which I liked from Box2d. I ended up getting a really nice and smooth movement for the player. I actually like it much better then what I was able to do with Box2d. I utilized two of the great features of Cocos2d – MoveTo and actions. With these features the joypad works amazing and the player floats around like he was using a jetpack (which my game will use).

I will be creating detailed Tutorials in the future once I have a better understanding on how to use all of features for my game. So I apologize if I don’t go into much detail at this time. And the videos are not long enough to go into much detail.

Well it is the end of the work week and I am going to take the weekend off from coding so no video next few days. Next week I want to spend a lot of time figuring out the proper way to setup my Tilemap background, so I will not make a video until I get that working. I know that the tilemap is something that people want to know how to do so once I have it I will try and explain how to do it in a clear way.

Here is the Day 5 Video:

5 Responses to Iphone Cocos2d Game Day 5 – Adding an Attack for the Player

  1. SpaceAce says:

    Hi there,

    I know you are a beginner (you stress that often enough) but you then probably should not do “tutorials”. A tutorial is supposed to teach others.

    First you are very slow (therefore some tutorials take 1.5 hours although it could have bee explained properly in half the time.

    Aside from that your tutorials would mainly teach the audience in how NOT to write a program:

    – Your style is chaotic, defining variables as you go, sometimes in .h, sometimes in the middle of the code

    – Your style is poor or copied together from various code snippets (look at your bracket and colon placement as it’s never identical…

    – You make far too many errors and then let the compiler spot them instead of trying to write proper error free code in the first place. Then it takes you literally minutes to spot a typo or a missed change from your copy&paste orgies.

    – You make logical errors you don’t even spot (like setting up actions: action1 action2 action3 action1reverse action2reverse action3reverse while it should go a1 a2 a3 a3rev a2rev a1rev)

    – You write dozens of methods doing the same thing (like addBaddie, addFlyBaddie) instead of writing 1 method addBaddie and pass in the type of the baddie as a parameter)

    – Most importantly: You don’t know what you are doing! You create methods and pass arguments to them without ever using the parameter passed (instead you use some ivars or globals instead). Or you add (id)sender to methods obviously without knowing why and what it is.

    Sorry for the harsh criticism but you should know something from the topic you are writing a “tutorial” about…

  2. JacobPaulWarren says:

    Hey SpaceAce, go pleasure yourself!

  3. shovan says:

    okay! I agree with you there SpaceAce but lets not forget something that he is actually helping others to understand cocos2d . It may not be professional but he is not charging any money to teach it and everyone has their own ways of doing things . But I would like to point out few missing piece of puzzles. I would say professional people would take 10 hours to prepare a nice 20 mins tutorial because they wanna look professional and they have got time to do it and on the other hand paul doesn’t fix the video , he just finishes it as it is ! , If someone doesn’t like it, they could just leave this site !. I think paul knows everything u have said up there but he does it anyway cuz it helps people and him too .If you are a critic , why not leave a url to your website or tutorial site ! let me see how professional you are lol! what I am trying to say is , You should appreciate the free contents first, then point out what you don’t like about it ! but u sounded like a cocky brat who had a hard time understanding coco2d and stumbled upon this site! paul didn’t not ask you to criticize your work and you are fortunate that your harsh criticism even shows up on his site.

    Keep up the good work man 😀

    English isn’t my native language but still I hope SpaceAce did understand me otherwise it would be pointless, right?

  4. Cam DeBuck says:

    I’ve been programming for twenty plus years. I appreciate the time he has taken to do this and the information I was looking for was there and couldn’t ben found else where. Keep up the good work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: