Starting in on game programming - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Design (/forum-5.html)
+--- Thread: Starting in on game programming (/thread-1046.html)
Pages: 1 2
Starting in on game programming - Flintlock - Jul 7, 2009 06:18 PM
Hi, I've been lurking here for the last few weeks, and I've decided to try getting into making games on my Mac.
My goal is to make (or at least start) a sort of simple action/adventure style game to introduce me to game programming. My more immediate goal is to just get a sprite loaded on a map and give him some simple movement through keyboard input. I can later build on that with attack animations, enemies, a story, etc.
Before I state my ideas on how to achieve this, I'll give a little background on my computer abilities. I started by playing/modding Civilization IV about two years ago (15). I became a pro at using XML and I wrote a couple of simple Python scripts. The programming part was very light, but I really got into learning how to create some nice low-poly units and buildings and editing the other existing models. I belong to a great forum, civfanatics.com, which has a strong modding community. I first got interested in programming applications when I saw all of the cool little applications that Windows modders could use, but I couldn't. I started working through Aaron Hillegass' book on Cocoa Programming, and I got through a few chapters before I decided I'd like to make my own game, so here I am.
I've looked at about a billion different languages, engines, libraries, etc. and what I've come up with is either C or Objective-C for the code and Quartz2d or OpenGL/GLUT for drawing. I was just wondering what you guys though of these options, and if you could offer some good tutorials/books for learning. I understand very basic Objective C, with even more rudimentary knowledge of C. What I've been stuck on with my own little experiments is understanding how to use OpenGL/GLUT. I got through OSC's GLUT tutorial, but I still don't understand it very well. I think Quartz might be easier, but I haven't tried it out yet. Eventually I will want to learn OpenGL, but for now I just want some simple 2d graphics.
Okay, enough rambling, what do you guys think about my choices, and where are some good places to learn for someone new to game programming?
Starting in on game programming - AnotherJake - Jul 7, 2009 08:48 PM
There are other alternatives to C/C++/Objective-C/OpenGL/Cocoa for programming games on the Mac. I don't have any good suggestions off the top of my head right now, but I'm sure someone will come along with some.
Quartz really isn't going to be easier than OpenGL in the end, so OpenGL is probably best if you stick to the C/C++/Obj-C route, IMHO. It's a steep learning curve, but it's doable.
Be sure to consider other options like Unity.
There are many opinions on this topic around here, so I'm sure you'll get an eyeful soon.
Starting in on game programming - Oddity007 - Jul 8, 2009 04:26 AM
You could try using Python with Blender or Nu with Cocoa, I don't know how fast Nu is, but for basic games it should be fine. Of course you should know ObjC anyway.
Nu=Lisp+ObjC+Ruby for those who don't know
Starting in on game programming - Flintlock - Jul 8, 2009 08:57 PM
Thanks for the input, guys.
Okay, so Quartz is out. I'm leaning towards Objective C I think, since I've had some (limited) exposure to it. I know I want to learn C sometime, but I guess its not necessary right now. I'm wondering if anyone knows of any good 2d OpenGL tutorials. The Red Book seems rather 3D oriented, but I just want 2D. As for Unity, I'm not exactly looking to spend $200 for a game engine. I'll go for a programming book, but there are plenty of free things available that would work fine.
I think I want to be learning more programming than just a level editor and scripting, but I'm a bit overwhelmed by OpenGL. I've been looking at Pyglet, which seems like an interesting option, at least to get introduced with. What are you guys' opinion on that? It seems interesting, but how in the hell do you compile .py files? It's built so much as a scripting language that it seems difficult to package anything you make. (I've Googled this a bit, but I couldn't come up with much.)
Just looking at Oddity's post..
I've played around with the Blender Game Engine a bit, but it's too 3D oriented and only has some Python scripting abilities (although I know you can still do some powerful stuff with it.)
Nu seems interesting, but I'm on Tiger.
Please keep the ideas coming, as I'm sure for every answer I'll have many more questions.
Starting in on game programming - FlamingHairball - Jul 9, 2009 10:19 AM
I believe it is generally recommended to learn C before Objective-C, but I don't see any reason you can't learn Objective-C first as long as you understand the basics.
Regarding Pyglet, diordna would be the guy to talk too - he made gw0rp using Pyglet(I think).
Starting in on game programming - filfil96 - Jul 9, 2009 09:07 PM
I would recommend C++ for a bigger, more advanced game that you could build off later but C is alot quicker than C++ and easier to learn so you might want to start with C and learn C++ later. Regarding OpenGL and GLUT I'd recommend you to go with SDL instead of GLUT because SDL is able to:
-Make a window (a bit harder that GLUT though)
-Do all the game specific things (Receive user input, draw graphics, play sound, etc.)
-Combine itself with OpenGL
and overall it's a great API to start with and then later move on to OpenGL since OpenGL is harder than SDL and it can do most of the things that SDL can and it's graphics are ALOT better than SDL's.
But you know, that's just my opinion, I've recently started SDL and i've had a little taste of OpenGL. But you should really just go with whatever suits you best anyway.
Good luck on making your game, but i'm telling you now it WILL be hard!
Starting in on game programming - AnotherJake - Jul 9, 2009 09:58 PM
If you are determined to do things the hard way (i.e. you don't want to choose more sensible paths like Unity), my standard recommendation is to learn C first and get into OpenGL using GLUT. That way it's easier to move up to SDL/C++/Objective-C later on. Starting off with SDL is not a terrible idea though, but I would personally prefer to stick with GLUT first since there is less to have to learn. C and OpenGL are a huge pile on the plate as-is.
A few quick points to clear up any bits of mis-information in this thread:
- Yes, to learn Objective-C you'll need to know C first anyway since Obj-C is a strict superset of C.
- C++ can also be learned first, but I *strongly* recommend against taking that path first (as some may well know by my other posts on the subject), since you'll need to learn C along with it as well, plus it is a very complicated language -- powerful but complicated, and very dangerous for beginners IMNSHO.
- C++ is not slower than C in any practical sense. Slower to learn, but certainly not slower performance-wise.
- GLUT is portable too.
All that said, I would still recommend looking into alternative paths like processing, Python, basic, etc... But I don't know much about those for game programming, so I can't offer specifics. All I know is that C/C++/Objective-C/OpenGL/Cocoa/SDL are pretty steep in terms of learning curve.
Starting in on game programming - filfil96 - Jul 10, 2009 01:16 AM
AnotherJake I wasn't saying that SDL is better than GLUT or anything like that I was just telling FlintLock my Opinion and listing some of the good things about SDL. All I was saying is that learning SDL and then learning OpenGL instead of learning GLUT and then learning OpenGL will be more helpful and useful since SDL was made by game programmers for programming games, so it's really game-specific. Also learning C++ before learning C is not that hard, I, myself learnt C++ first and then tried learning C with not much success . I just couldn't get used to typing %d before outputting a number, IT WAS SOOO FRUSTRATING !!
But I'm really just going to encourage whatever FlintLock goes for since it's not THAT big of a difference and besides that's just what I recommend anyway.
[EDIT] Also sorry about the whole "C is alot quicker than C++" thing I meant that incorrectly, good thing you understood what I meant though [/EDIT]
Starting in on game programming - Flintlock - Jul 10, 2009 07:13 AM
I think I'm going to try out Pyglet for a while, and then move up to C/GLUT when I feel ready for it.
What I'm really interested in is what are some tutorials or books you guys would recommend so that I could learn C? (I know about K&R, but it seems more like a reference vs. a learning book.)
Starting in on game programming - AnotherJake - Jul 10, 2009 08:02 AM
Flintlock Wrote:I think I'm going to try out Pyglet for a while, and then move up to C/GLUT when I feel ready for it.Good call!
Flintlock Wrote:What I'm really interested in is what are some tutorials or books you guys would recommend so that I could learn C? (I know about K&R, but it seems more like a reference vs. a learning book.)Besides K&R, my favorite is Learn C on the Mac. It's a digestible introduction to C for beginners. You can even start that right away to get your feet wet while you're messing with Pyglet.
Starting in on game programming - Flintlock - Jul 10, 2009 03:00 PM
Yea I actually went to B&N to pick that up one time, but they were out so I got Objective-C on the Mac instead.
Oh well, I maybe can try again or pick it up online.
Thanks for the help guys, and more info (esp. on Pyglet) would be great!
Starting in on game programming - stevejohnson - Jul 10, 2009 04:49 PM
More info on pyglet? I'm writing a book on it. I'll PM you a link to my current example code and manuscript.
The pyglet mailing list is extremely helpful. Feel free to email me if you have any specific questions. (firstname.lastname@example.org)
Starting in on game programming - Flintlock - Jul 10, 2009 08:03 PM
Thanks for the link, I'll check it out in depth when I get back from my basketball tourney this weekend. I know I'll have plenty of questions for you. (esp. how to compile .py files.) One more question though, how long do 'I have to wait until I can PM people? Its really annoying not being able to...
Starting in on game programming - AnotherJake - Jul 10, 2009 11:13 PM
Flintlock Wrote:One more question though, how long do 'I have to wait until I can PM people? Its really annoying not being able to...Unfortunately it's turned off for everyone except moderators. The forum owner, Carlos, says it's to stop some sort of spam. Most (all?) of us think having it off does more harm than good, but it's not our joint
Email is off too, last I checked...
Starting in on game programming - filfil96 - Jul 13, 2009 05:02 AM
AnotherJake Wrote:Unfortunately it's turned off for everyone except moderators. The forum owner, Carlos, says it's to stop some sort of spam. Most (all?) of us think having it off does more harm than good, but it's not our joint
Heh, I didn't know that!
But anyway, I didn't know you could PM people .