NOOB :( How do you program a game...

Discussion in 'Public Game Developers Forum' started by gabacus, Mar 18, 2009.

  1. gabacus

    gabacus Member

    Mar 17, 2009
    12
    0
    0
    hello all,

    i am new to game programming... very new... i know any game programmers and i have never looked into how it all works before... im sorry for this total noob question...

    i am trying to figure out how a game is actually created. what i have come up with at the most basic level is this... you have some code and you have some animations... you use the code to play the animations in a sequence that relies on user input...

    is this how it all works?

    for example, if i had a character in a game that can stand, walk or run depending on what the user wants them to do i would have 3 animation, one of the character just standing there, one walking and one running. the user then selects a motion and the character performs it...

    so does this mean that can create the animations in a program like toon boom studio 4 and then save each animation in the resources file and then call on it to play on the screen based on user commands? does this question even make sense?

    sorry for the noob question... if you have pitty for me, please answer...
     
  2. NickFalk

    NickFalk Well-Known Member

    Well you do have the gist of it, yes.
    In practical terms however it is not as easy as it sounds. You have to hook up the code to the interface, learn Objective-C + the Cocoa framework etc.

    I'd say that iPhone is not the best platform to start programming on.
     
  3. Eli

    Eli ᕕ┌◕ᗜ◕┐ᕗ
    Staff Member Patreon Silver Patreon Gold

  4. Well, that would be one aspect of game programming in a nutshell I suppose -- specifically, getting something to move and animate on the screen. There's a lot more to actual game programming than that, but you've more or less touched on the tip of the iceberg.

    Without getting technical, game prorgamming is a very, very in-depth subject that can cover a great deal of ground depending on what sort of game you want to write, and for the solo programmer there are a number of disciplines that all come into play when designing it. Much of it you can farm out if you don't have the talent -- graphics, sound effects, music, that sort of thing -- but those are the easiest parts anyway. Coding is the longest and most difficult part.

    To get a thumbnail sketch you can read this Wikipedia article on game programming to get a rough idea of the typical steps involved game design and programming logic. If you're at all comfortable with that you can move on to learning how to program your own game through books, online tutorials and such. The iPhone also has a fantastic dev community who are often willing to help out with programming questions and issues as well, though don't expect them to hand you everything on a platter. You have to do your part, but if you're stuck there are many developers more than willing to lend a hand when you need it.
     
  5. Mew2468

    Mew2468 Well-Known Member

    Oct 20, 2008
    1,652
    5
    0
    Vancouver, BC
    #5 Mew2468, Mar 18, 2009
    Last edited: Mar 18, 2009
    Then you have to program enemy collision, what happens when certain characters pick up item, program the AI, respawn locations, where the character dies, HP, the landscape...a lot harder than most people think.

    +1.
     
  6. allenp

    allenp Member

    Mar 8, 2009
    17
    0
    0
    Information Architecture
    Hanover, NH
    I'm going to second the notion that programming in Cocoa/Obj-C is not the easiest place to start. If you really want to make games you should start with flash, you will be able to make progress right away, there are tons and tons of examples out there that will also teach you the basics of how games are put together, and that is knowledge that you can translate directly into iPhone programming when you are ready to make that leap. Google a guy named Emanuele Feronato to read his blog and learn some basics of making games in flash.
     
  7. Hippieman

    Hippieman Well-Known Member

    Nov 6, 2008
    433
    0
    0
    Senior Producer, Designer
    San Francisco
    But before that you need to be able to load in the 3D character and textures. So you have to pick a 3D format that works with your 3D package, and an animation system that also works with it.
     
  8. gabacus

    gabacus Member

    Mar 17, 2009
    12
    0
    0
    hello all,

    thank you all for you input.

    i understand that programming a game is not a simple task, and i didnt mean to imply that it was. what i was trying to figure out is whether it was just animation controlled by the user, so all the things like background movement and collisions and that are all predefined animations that are displayed depending on what happens in the game. i realise that this is an extremely basic question, but i am not trying to say that doing this is extremely easy.

    the reason i am asking the question (aside from the fact that i want to create a game) is that i have a graphic designer who is doing the art for me and he insisted that the characters are drawn in the code. I can see how this would work in a 3D game but for a 2D scrolling game i dont think that would be necessary.

    oh, and i am not new to programming, just new to gaming. i am familar with objective C and Hodapp, i am familiar with google search :)
     
  9. Your artist should stick to artisting. Graphics are only drawn in the code if you're creating special algorithmically-generated visual effects -- explosions, glow effects, blurring, depth of field, etc. Characters, ships -- anything in the foreground is almost always going to be straight up bitmaps. Even many effects, such as glow, light maps, and such, can be done with transparency overlays and light maps. You could create the sprites in real time if you really wanted to, but why would you waste all of that CPU time on such a thing when the same thing is achieved in a single blit with a bitmap image?

    The majority of the time the character animations and most background animations are done with bitmap images, one image for each frame of animation. That's the simplest and most basic method. Multiple parts of a single character that can have independent animations can be done with individual bitmap images for each segment of the character that is to be animated independently. (Pocket God uses this method, for example.) Background animations are usually the same because it's the most memory-efficient method; you wouldn't do whole-screen animations because you'd be using up gobs of memory. Instead you create a background from a set of tiles, animating the ones that call for animation. You can sometimes get away with large single-bitmap backgrounds but it eats memory like a pig. There's a game I'm beta testing now that uses this method because the developer wants nice detailed levels, but he's probably going to have to convert it all over to tile-based to save memory, 'cos he's hitting pretty close to the magic 20 as it is.
     
  10. gabacus

    gabacus Member

    Mar 17, 2009
    12
    0
    0
    haha... artist should stick to artisting... thats pretty much what i told him! (although not as elegantly...) he kept saying "i dont want to learn how to code" and all that and i kept telling him that all he has to do is create the characters and animate them. he insisted that he was told that all the animation is done in the code and it made me question myself for a while there...

    so, in terms of lingo... the animations are called sprites?
     
  11. Anyone who tells you he doesn't want to learn how to code and then goes on to explain how something works in code should be deemed to have a larynx in his sphincter. Just tell him to draw you some frames of animated things and stop flapping his glutes.

    Depends on who you ask. I'm old school, so I still call them sprites. (I could really betray my age and original platform of choice and call them player/missiles, but I won't.) I don't even know if that term is still in use, but the concept is familiar I think to most programmers. You can call them bitmaps or tiles or whatever you want, really.
     
  12. MrBlue

    MrBlue Well-Known Member

    Sep 3, 2008
    320
    1
    0
    iPhone Developer
    The term sprite is still very much alive and in use.
     
  13. gabacus

    gabacus Member

    Mar 17, 2009
    12
    0
    0
    thanks again guys. i think i have my head in the right place now and am ready to start looking at some code.

    im going to have a look at the cocos2d-iPhone framework. there seems to be a lot of information available on this, as well as some example games.

    by the way, love the "larynx in his sphincter" line... im gonna use that...
     

Share This Page