Best graphics framework for gaming newbie?

Discussion in 'Public Game Developers Forum' started by whooley, Jul 7, 2009.

  1. whooley

    whooley Well-Known Member

    Aug 12, 2008
    55
    0
    0
    #1 whooley, Jul 7, 2009
    Last edited: Jul 9, 2009
    Long time coder, first time game-developer.. I have the bare-bones of my game running on the iPhone. The only problem is.. I'm using CoreGraphics (simply because I was already familiar with it) but I'm worried as I add more sprites/effects performance will bog down.

    Should I bite the bullet and learn OpenGL? Is the performance gain worth it? It seems to have a steeper learning curve than CoreGraphics.. Would CoreAnimation be easier? AFAIK, that is hardware accelerated.

    FYI, the game requires a mostly static background & overlay, about 100 "sprite" blocks (actually static images, only a small number will move at a time) and about a dozen moving and animating character sprites. In the unlikely event there's any horsepower left, I'd like to add explosions/smoke etc. but I'm not counting on it!! :p
     
  2. Anders

    Anders Well-Known Member

    Feb 3, 2009
    1,634
    0
    0
    Co-owner and CTO at Color Monkey
    Sweden
    If you are just going for 2D, OpenGL isn't that hard to learn. We more or less only use OpenGL due to a) we know OpenGL already b) we don't like ObjC c) it's very fast and d) we have total freedom and can easily mix 2D and 3D whenever wherever we want.

    There are by far more books and tutorials about OpenGL too. In the long run, OpenGL is better since it works just the same on other platforms.

    With that said, it is more likely you will be struggling with OpenGL rather than creating your game, at least in the beginning.
     
  3. IMBA

    IMBA Well-Known Member

    Feb 27, 2009
    101
    0
    0
    Learn OpenGL, it will be much better in the long run and your games will perform much better.
     
  4. monteboyd

    monteboyd Well-Known Member

    I haven't used it myself but I've heard good things about Cocos2D if you want to give that a look.
     
  5. whooley

    whooley Well-Known Member

    Aug 12, 2008
    55
    0
    0
    Cheers for the replies!

    OpenGL it is. I guess my initial mistake was trying to "learn OpenGL", rather than just focusing on the 2D basics I needed to get the game done. Free codes for you guys*.

    (* in about a year, when I finally get it finished!) :p
     
  6. whooley

    whooley Well-Known Member

    Aug 12, 2008
    55
    0
    0
    #6 whooley, Jul 8, 2009
    Last edited: Jul 9, 2009
    Interesting, thanks. I don't think I can get around learning OpenGL (even cocos2d is OpenGL based), but that looks interesting. Having the in-built physics engine is handy too, even if my game's requirements are quite basic.
     
  7. lazrhog

    lazrhog Well-Known Member

    Oct 1, 2008
    290
    1
    18
    Software
    UK
    Not sure what objC and opengl have anything to do with each other in your comment above. For the record, objC really is awesome and way easier to use in gaming than c. For example, in my new game I just have a particle object that I just create a new instance of whenever I need an explosion and then just run an update on all instances within the object. Easy.

    My advice, use objC and opengl. Both are very easy to pick up....
     
  8. Anders

    Anders Well-Known Member

    Feb 3, 2009
    1,634
    0
    0
    Co-owner and CTO at Color Monkey
    Sweden
    CoreGraphics (and the other Apple APIs) require ObjC. OpenGL can be used in C/C++/ObjC.

    Choice of programming language is a matter of personal taste. I simply prefer C/C++ (mostly the latter).
     
  9. cool mr croc

    cool mr croc Active Member

    May 27, 2009
    41
    0
    0
    doesnt open gl use polygons, vertices and textures? if i had someone doing 2d graphics and they were supplying me with .png files, would open gl be able to use them?
     
  10. Anders

    Anders Well-Known Member

    Feb 3, 2009
    1,634
    0
    0
    Co-owner and CTO at Color Monkey
    Sweden
    Polygons consist of triangles, which consist of vertices, yes, and they can be textured with images, i.e. textures.

    OpenGL renders stuff for you, it doesn't help you with loading images, you will have to do that yourself. If you can load a file and decode it, OpenGL can use it as a texture, whether it may be a PNG file, a JPEG file, a PVRTC file etc.
     
  11. cool mr croc

    cool mr croc Active Member

    May 27, 2009
    41
    0
    0
    so for example if i have a picture of a person, i can specify vertices to wrap my image as a texture to fit it perfectly, and presumably set a colour that displays as transparent so its not just a coloured block with a picture person inside it?
     
  12. Anders

    Anders Well-Known Member

    Feb 3, 2009
    1,634
    0
    0
    Co-owner and CTO at Color Monkey
    Sweden
    Not really sure what you mean, but I guess so (although it's probably not as easy as you think).
     
  13. Adams Immersive

    Adams Immersive Well-Known Member
    Patreon Bronze

    Dec 5, 2008
    1,718
    5
    38
    Freelance interactive design and programming
    Ohio
    Maybe consider Unity as well. It's dedicated to 3D, but has been used for 2D games too and is evolving fast.
     
  14. whooley

    whooley Well-Known Member

    Aug 12, 2008
    55
    0
    0
    Just had a look, thanks. Looks impressive, probably overkill for my first 'baby' project, but something I'd love to play around with.

    Looking at that page, I just remembered I previously bought GarageGames game engine for the Mac, and they do have a iTGB 2D game engine for the iPhone. But the indie license is $750. Bit steep..

    Problem is, I don't really have the skillset yet to compare the game engines, or to compare Chipmunk to Box2D physics engines etc.. Pity TouchArcade doesn't do developer engine comparisons (hint..hint.. ;) )
     
  15. jshmrsn

    jshmrsn Well-Known Member

    Oct 29, 2008
    251
    4
    0
    Mobile Game Developer
    Agoura Hills, CA
    I'm working on 3D games, but I have a little 2D engine pet-project that I use to teach people how to program. If you would like to use it, I'd be happy to send it to you for free.

    It's nothing amazing, but it will definitely allow you to make the project you stated above^ (including the explosions :p )

    As for 2D functionality, it includes a simple "draw2D" function that just takes in a texture ID (image), location and size. That should help get you started at least.

    Let me know if you would like to use it.

    Edit: It's all C++ based by the way. Are you experienced with C++?
     
  16. Adams Immersive

    Adams Immersive Well-Known Member
    Patreon Bronze

    Dec 5, 2008
    1,718
    5
    38
    Freelance interactive design and programming
    Ohio
    This site I used to use has user reviews of a gazillion game engines. It's not iPhone-specific I'm afraid, but it does mention iPhone. The reviews look to be out of date, and these things change fast, but for what it's worth:

    http://www.devmaster.net/engines
     
  17. Mal

    Mal Member

    Jun 26, 2009
    18
    0
    0
    > But the indie license is $750. Bit steep..

    Maybe have a look at Shiva ( www.stonetrip.com )?
    Mal
     
  18. whooley

    whooley Well-Known Member

    Aug 12, 2008
    55
    0
    0
    Thanks all again for the suggestions! For a young platform, there's no shortage of options!

    I'm leaning towards cocos2D as it seems quite easy to get up and running, but I'd love to take a look at your project, if you'd like to pass it on!

    Yup, I'm familiar with C++. (And C, Obj-C, Object Pascal, J2ME, Actionscript, Applescript, VBScript, SQL, assembly... it seems I'm doing everything BUT games development, the one area I really want to get into! :) )
     
  19. jshmrsn

    jshmrsn Well-Known Member

    Oct 29, 2008
    251
    4
    0
    Mobile Game Developer
    Agoura Hills, CA
    Well, I doubt that my project will compare against cocos2d in terms of completeness or anything, but in terms of simplicity I really doubt there's anything better :) As I mentioned, I created it specifically as a tool to introduce people to game programming.

    Anyway, here's the link: http://jshmrsn.com/sc/TwoD.zip

    Of course, all this talk of simplicity comes with the assumption that it compiles without a glitch :D XCode loves to give fits about random stuff some times. Let me know if this happens.
     
  20. Houli

    Houli Member

    Jul 2, 2009
    14
    0
    0
    I don't know what you're talking about with regard to CoreGraphics. It is an entirely C API. It would have been nice if you looked at it before making a comment about the need to use Objective-C.
     

Share This Page