Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming Technology Entertainment Games

Crash Course in Game Programming? 142

Lullabye_Muse asks: "I want to write a game program for an independent research class I am taking at my High School. I have until June to deliver a final product or a good demo. I'm somewhat new to programming and will be doing work at home, and at school (Linux and Windows, so cross platform OSS is best). What is the best language to learn to code games in, and do you have suggestions for any useful sites, on game programming?"
This discussion has been archived. No new comments can be posted.

Crash Course in Game Programming?

Comments Filter:
  • New To Games? (Score:5, Insightful)

    by johnkoer ( 163434 ) <johnkoer&yahoo,com> on Friday January 28, 2005 @01:16PM (#11504836) Homepage Journal
    Since you said you are new to programming, you might want to consider taking on an OSS game that is already out there and modifying it to suit your purpose. It will help you learn a lot of the basics of programming, but it will also give a great starting point.

    If you are dead set on writing an entire game yourself, best of luck to you. Even for an experienced programmer, throwing together a game (or even a demo) in three - four months is a feat.
  • by Anonymous Coward on Friday January 28, 2005 @01:18PM (#11504862)
    to code a game in is the one you already know. Don't bother trying to learn some new fancy languange if you know BASIC right now. Concentrate on the results. You can create a good looking, fun game with BASIC. It just won't be powerful enough to make the next Doom or Half Life.
  • by Grygonos ( 848602 ) on Friday January 28, 2005 @01:20PM (#11504895)
    If you're new to programming, and actually want to code this yourself, it's going to need to be a simply game with little to no graphics. Implementing a OpenGL game is NO trivial task. A game I did in Java was the simple squares game where the object is to arrange the pieces like so .. 1 2 3 4 5 6 7 8 * So I wrote a Java app that would mix up the squares like so 4 7 2 * 1 8 6 5 3 and allow you to move the pieces around via the *blank* square. This still wasn't trivial, especially for someone new to Java, much less programming in general. Not trying to disparrage your efforts, but being new to coding is probably your biggest disadvantage.
  • Game Blender (Score:2, Insightful)

    by manjunaths ( 83313 ) on Friday January 28, 2005 @01:55PM (#11505349)
    If you are new to programming then don't program, as simple as that. Or in this case program as little as possible. So use Game blender http://www.blender.org/ [blender.org] download the blender game demos, and check them out. You can get up to speed in days, also the logic is scripted in python, which is easy to learn. You can get lots of help on the web, on IRC, irc.freenode.net, #gameblender and finally you can get lots of premade scripts/blender files for things like fps (first person shooter) motion etc.,
    Keep it simple, it should be one level or two atmost.
    Even things like shooting arrows at moving targets are fun, the arc of the arrow etc., teach you physics and for the player it takes time to learn, so they get hooked.
    Have a goal, the user at the end needs to do something like rescue a princess or find treasure.
    No OpenGL, SDL and C++. Period. That is simply impractical. You'll end up coding the engine and won't have time for art or game play planning.
    If you really want to do something like that look at CrystalCore http://crystal.sourceforge.net/tikiwiki/tiki-index .php?page=Crystal+Core [sourceforge.net] (#CrystalSpace on irc.freenode.net) or nebula device. But good luck on that.
  • Re:New To Games? (Score:4, Insightful)

    by _pruegel_ ( 581143 ) on Friday January 28, 2005 @02:28PM (#11505819)
    I disagree. I believe modifying most OSS games out there requires more knowledge and most importantly more time and effort than writing a simple game from ground up. Those games might have huge code bases and usually there is little documentation especially for starters.
    The author of this "Ask Slashdot" did not mention "First Person Shooter" or even 3D at all. And there are games which are very simple but still fun. Games like Pong, Mine Sweeper, Snake and many more can each be done in a couple of hours. There are even programming languages made for simple game development although I would prefer a "real" language like Java or Python. I once wrote a small game to learn Tcl/Tk and that was fun and I did it in less then a day.
  • by entropiccanuck ( 854472 ) on Saturday January 29, 2005 @02:09PM (#11514347)
    As a high school programming teacher, I'd highly recommend you first work on a trial program. For someone new to programming, a 3-4 month project is complex. Write a smaller, non-trivial program first, allowing yourself to get a feel for the language, structures, techniques, etc. (note: this post presupposes "somewhat new to programming" + "high school" = "start from the beginning." If you're more experienced, good job with the modesty and no offense intended.)

    Some of my kids want to jump right in with a GTA clone or Zelda or something ... take a look that the closing credits for those games, it's not something you're going to be doing by June 2006, let alone 2005.

    Yaztromo, in a helpful comment somewhere above, mentioned starting with Blackjack, with some suggestions for going about that. An ASCII single-player version is relatively simple. Other possible intro projects would include some other card games, Mastermind, Simple Simon, Yahtzee, etc. Keep it simple to start-- graphics, sound, languages, even the computer are secondary here. Test as you go: in the blackjack example, get a card deck implemented first, then add draw/hold, then double, then split. Get something down on paper that a mindless automaton can follow and successfully complete it's task. Then substituting a computer for the dummy is simple, and programming is just translating your instructions efficiently. Once you have a project like this completed, you'll better understand game complexity, allowing yourself realistic goals.

    Your final project could be something entirely different, or you could extend your intro project to include multi-player (hotseat and/or online), graphics (very extendable), or AI, which is also very extendable. And there's always optimization, which is infinitely extendable. The nice thing about this path is you know you'll have something to be proud of come June ... if you finish ahead of schedule, add features! (practical note: keep version backups!) If you head in a different direction, classic arcade games can provide a wealth of inspiration, ie., Tetris (my pick in this category,) Galaga, Asteroids, Breakout, etc. Note that these are real-time games, which are typically significantly harder, and use more math/physics.

    On the language issue, I teach with Python. It's clean, powerful, and easy to learn, and my kids seem to like it. Use Pygame as well if you go this route. I introduce some of my more advanced students to Java later in the year (last quarter) if they're interested, which some like, some don't. I hesitate to recommend it if you don't have any previous programming experience, especially given your timeframe. However, if you are really interested in Java, consider trying this: the first Java assignment I give is the re-implementation of a previous Python project, typically something like one of the games mentioned above. This would give you a feel for both languages, though as a caveat it would take more time from your final project.

    For resources, the Learning Python and Programming Python (O'reilly) books are pretty good ... check your library or ebay if your school can't get them for you. On the free side, there's many great Python tutorials and examples online (python.org, pygame.org), though some code examples are non-optimal. Check out pygame.org's link page, and www.lupinegames.com. Since you mentioned "independent study," I'm guessing there's no programming teacher, so I'd recommend joining a mailing list or web community that can fill some of that role.

    Make something you can be proud of. Good luck, and keep it fun.

    Michael
  • by Anonymous Coward on Sunday January 30, 2005 @11:05AM (#11519848)
    Make your game as a mod for an existing game. Unreal has a language that is based on C++. Neverwinter Nights has a scripting language also similar to C++. They both also have rich GUI tools and a large developer community.

    Why try to invent the wheel in a semester? These tools are made to make games. This is how the real world works except everyone uses professional grade middleware like Renderware, another engine like Doom3/Source/Unreal, or proprietary middleware developed in house like Sega and Nintendo.

    Game developers spend as little time messing with the engine as possible. Unless you want to do something that's just never been done before or needs to run in a restictive environment (Palm, GBA), DO NOT DEVELOP AN ENGINE.

It's a naive, domestic operating system without any breeding, but I think you'll be amused by its presumption.

Working...