Getting started with my iPhone Game

Apprentice
Posts: 16
Joined: 2010.01
Post: #1
I am desperate for some help. I am very new at programming in general and have been studying Objective-C 2.0 books for weeks now and have watched a ton of videos and tutorials on how to program for the iPhone. I am signed up with Apple and have downloaded all the necessary SDK tools that I need and am trying to build a game. I want to start out easy—in the game I want to be able to fire a missile or a bullet at something just by touching it on the screen, like when an enemy appears I can touch it, which then fires at it. I just need some idea of code to get me off on the right track.

PLEASE HELP ME!

Any code samples or ideas would be a huge help.
I also need to know what I should use for some basic animation.—Core Animation, OpenGL, Quartz, or what do you think would be a good starting point for me?

PLEASE HELP ME!

Thank you very much!
Quote this message in a reply
Member
Posts: 65
Joined: 2009.03
Post: #2
You could check out http://www.71squared.com which hosts video tutorials on starting game development on the iPhone.

Mike

iPhone Game Development Blog - 71Squared
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.01
Post: #3
Is this the "Mike" from 71Squared? THANK YOU FOR RESPONDING! I have been watching a bunch of those tutorials from http://www.71squared.com. My problem is that since I am new at this my thought was to start out easy just to get the concept of how some things work. OpenGL might be a bit much for me right now. Do you have any example code I could see on implementing the touch event I described earlier?

Any help is greatly appreciated!

Please be patient with me.
Quote this message in a reply
Member
Posts: 65
Joined: 2009.03
Post: #4
Yes, that's me :o)

If you check out Tutorial 11, it shows you how to implement a simple joypad to control your ship or character. That tutorial does not use OpenGL at all just UIImage etc so it should be really simple to follow and get you started on some basics. I am planning to do some more tutorials that don't use OpenGL later, its just finding the time.

Mike

iPhone Game Development Blog - 71Squared
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.01
Post: #5
I watched Tutorial 11 and some of the others as well. I think maybe the idea of what I'm trying to do with my game is a little too complex for me right now.

Do you have a good suggestion for a game that might be a little easier for me to work on?
Quote this message in a reply
Member
Posts: 110
Joined: 2009.07
Post: #6
JermGuy Wrote:I watched Tutorial 11 and some of the others as well. I think maybe the idea of what I'm trying to do with my game is a little too complex for me right now.

Do you have a good suggestion for a game that might be a little easier for me to work on?

Apologies if this mail comes across as patronising, but I'm assuming from your mail that you have no coding background at all.

I wrote my first program back in 1982 at the age of 12 in a language called BASIC. It took me months to figure out the simple stuff. I used other people's code listings to begin with and built from there. Personally, I'd suggest NOT starting out with objective C while learning and try something like Java (via Processing), or Python. The principles and ideas will be near identical. If you want help, you can PM me and I'll get you started.

- Python's good because it's a really simple language, and free.
- Processing's good because it's a nice graphics programming environment designed for non-coders, and free.

Be warned: coding is hard. Writing games is harder still. Writing real-time games with graphics is even harder. Then there's sound, save-games, openGL... it's all hard, and it'll take time to learn.

You'll only learn by doing small, dull things to start with. Learn about data types and container classes, strings, arrays, dictionaries, pointers, memory, event loops, conditional branching and iteration. Learn about objects/classes and structs. Do something with every single one of them. You'll only learn by doing, screwing up, and seeing the results, and then doing again, but better next time.

Again, it sounds dull, but without a firm knowledge of how they work, and the ability to decide when to, for example, make something an NSMutableArray rather than a straight NSArray, you'll really struggle.

If you want to make your first game try something incredibly simple, like the 'Higher-Lower' game. Show a random number and ask the player if the next one will be higher or lower. If they get it right, their score goes up. Get 10 in a row right and give a bonus score. If they get one wrong they lose and you show a game over screen.

You can make that game in any language.

Once you've done that, you're making headway.

Once you're confident in your basic coding skills I'd work through a 'Programming on iPhone' book, take the example code and then think how you can expand on the ideas presented.

All this is IMHO, of course. :-)

http://www.fluttermind.com
Fluttermind - Games for Everyone
Quote this message in a reply
Nibbie
Posts: 3
Joined: 2010.01
Post: #7
Programming the iPhone is pretty daunting, mostly due to a lack of clear and definite documentation! If your determined to continue with objective-c (its what you need to use to get the most out of the iPhone really) then you might want to take a look at cocos2d for the iPhone. We used it for our new game which just got into the store - dunno how it will do, it's only a small spot the difference game.

You could also try looking at higher level "engines", Corona is a lua based one that tries to emulate actionscript and seems to be coming on ok or something like plasmacore which works across multiple platforms (including iPhone) and has it's own scripting language. Theres lots of inbetween engines, some that have their own language, or use C++ or objective C and all the commercial ones. I guess it depends how deep you want to go, you can create a lot of reasonable games with a half decent engine - even if your fps is a little lower Smile

Good Luck!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  2d gaming on the iphone [need help getting started] MR_UNOwen 13 6,384 Aug 8, 2009 04:37 PM
Last Post: iamtheone
  Please help me get started. makinggames 5 2,984 Jun 20, 2009 09:54 PM
Last Post: Achithyn
  Getting Started Achithyn 4 3,044 May 13, 2009 01:27 PM
Last Post: Achithyn
  Where to go after "Getting Started"? XxtraLarGe 4 3,078 Oct 17, 2008 10:14 AM
Last Post: XxtraLarGe