Game Programming is Too Hard!

Game Programming is Too Hard! Puck Fighter is a little game where you move balls around, they crash into each other, and you swing ropes around. And it’s like 1,200 lines of code!

What does Perl say again? “The Easy things should be Easy, and the Hard things should be Possible.” This thing is Easy as all hell, and it’s as Hard as Possible! Perhaps my Programming Purpose in life is to make game programming easy. This entry shall serve as an initial brainstorm for how to do just that.

What’s hard about game programming?

First off, there’s too much setup involved. I wanted to try a little physics experiment tonight, but then I just stopped because it’s too much of a pain to write the code getting the OpenGL window up and the timing set up.

Namaste and I were talking about getting the sticky thing on the end of the rope to move freely around a body (get your mind out of the gutter! :-), rather than sticking to one place. This turned out to be much harder than you’d think. An idea came up to attach a thin layer around the puck that would rotate freely. The rope would then attach to this. Implementing this caused endless complications.

What’s easy about text processing?

Perl has text processing down to a sci– down to an art. It’s not just easy to parse stuff with Perl, it’s even fun to write. Not like the grudging detail-work of game programming at all.

So what makes it fun? I’m pretty sure it’s not just Perl; I can envisage writing a game in Perl (I might one of these days), and it would sure be nicer than writing in C++, but it wouldn’t be like writing a parser. Well, here’s one thing that makes it fun: CPAN! I use Parse::RecDescent to do my parsing. That’s working at the domain level: working with the context-free grammar directly. And making a simple change is as simple as the change itself.

Perl has built-in support for regular expressions. Want to match a pattern? Just type /some.*pattern/ or whatever. That’s also what makes it fun for text processing.

So How can we make Game Programming Fun like Perl?

Flash does a pretty good job. If only ActionScript didn’t suck so bad, and if Flash weren’t so buggy, and if Flash weren’t so slow…. In Flash you work closer to domain-level concepts, like buttons, movie clips, images. All self contained and designed with the language, unlike C++ which was designed for everything, which means it wasn’t designed for anything.

So is it possible to make a C++ game toolkit to make this fun? I don’t think so. I just don’t think C++ has that kind of flexibility. I think we need a new language. Whether that manifests itself as a new programming language or as a sophistocated Perl module, it’s a new way of thinking about game programming. And I don’t think it can easily be a Perl module, because I want an integrated graphical designer, or something. Something to help you visualize all the visual interactions your game is modeling.

More research, more thought, and more experience is in order here. I am very open to any input anyone has on the subject. I’m getting excited about it though, which is a good thing.

About these ads

7 thoughts on “Game Programming is Too Hard!

  1. you could try having a play with virtools .this is a game prototyping tool (formerly nemo) this has the visual programming interace you are after (like max/msp). as well as higher level acess via its own scripting language and after that a decent sdk for all the hardheads out there to get prescisly wht they want. Its really pretty decent

  2. hey this is a really old thread.. oops .. i was just looking for text manipulation help.. so .. umm perl eh?..

  3. How many programmers and designers does it usually take to make a RPG game in a year? What
    is Buena Vista? Do you know how to contact them?

  4. Ladell, I haven’t the slightest clue. I imagine it is possible to make an RPG in a year with anywhere between 1 and 80 developers, depending on the type and scale of the RPG. But I’ve never made a game with more than one other person, and I’ve never made an RPG, so I don’t think I’m qualified to answer your question :-).

  5. Game programming is very easy for me.

    Swooshed right through it within months, using Windows API, OpenGL and even my own self-made open sources. :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s