views:

389

answers:

6

I am immediately placing this as a community wiki thing. I don't want to ask for help in programming yet or have even a specific question about programming, but rather the process and the resources needed to make such a game.

To put it simply: My college friend and I decided to give ourselves a really big challenge to further our skills in programming. In six months time we want to show ourselves a Pac-Man game. Pac-Man will be AI-controlled like the Ghosts and whichever Pac-Man lives the longest after a set of tries wins.

This isn't like anything we've done so far. The goal here, for me, isn't to create a perfect game, but to try and complete it, learn a whole bunch in the process. Even if I don't finish in the time, which is a good possibility, I would want to have at least tried this.

So my question is this: How should I start preparing myself? I already have started vector math, matrices, all that fun stuff. My desired platform would be DirectX 9.0c; is that advisable? Keep in mind that this is not a preference just for this project, but I wish to have some kind of future in graphics development, so I want to pick a platform that is future-safe.

As for the game development in general, what should I take into consideration? I have never done a real game before, so any and all advise to development of mid-scale projects( if this would be a mid-scale project ) is greatly appreciated.

My main concerns are the pit-falls and demotivators.

Sorry if the question is so vague. If it doesn't belong here, then I will remove it. Otherwise, any and all advise regarding making larger projects is greatly appreciated.

+2  A: 

Personally, here's what I would do:

  • study open source games to see what they do
  • buy a book about game programming (actually, I have a book about game programming already, but you probably want something more recent than that)
  • pick a toolset/game development library (Sourceforge, Google Code)
  • work through the tutorials that come with that library, possibly change to a different library if the API is too weird
  • come up with a requirements document
  • draw up a first pass design ("plan to throw one away"), try to have somebody review it
  • decide on a test plan
  • write up a schedule, not because I want to stay on schedule but because I want to break things down into easily-defined tasks
  • write the smallest complete game I could (eg., a Pac Man sprite that I can control inside a window: no maze, ghosts, score, lives, ability to die, etc.)
  • add features to that game until I've implemented the whole thing
Max Lybbert
Those are some pretty solid ideas. Just one question, what would you define as a "weird" API?
SoulBeaver
Before I did any of the above I would install a version control system and familiarise myself with its use.
anon
Put it on my list, thanks! Any in particular that you can recommend, or rather a "experiment and see for yourself" kinda thing?
SoulBeaver
@SoulBeaver As there are two of you, and you probably don't want to run a centralised server, a DVCS like Mercurial would seem to be the best bet. There are LOTS of questions asking "which DVCS?" here - please don't start a new one!
anon
You get to define weird. Some APIs come from the MFC school of thought (mainly "derive from our classes before you do anything else, and let us handle main()") others simply provide a thin wrapper over OpenGL. Others have different underlying philosophies. You will probably find some APIs easier for you to work with than others, but you want to find out if an API doesn't work for you early enough you can change to something else without much pain. I would want an API that handles things like collision detection. You want to think in terms of sprites not graphics primitives.
Max Lybbert
+1  A: 

Sounds like a good idea for a learning project! The 2 general things I recommend for your approach are

  1. work in iterations
  2. read a bunch about C++ and DirectX along the way

Start small -- write some code that does nothing more than draw Pac-Man on the screen. Then build on that by implementing movement across the screen. Then build the map boundaries and the inability to travel through them. And continue in this fashion, prioritizing the next task you need to complete, and then doing whatever it takes to complete it. Try not to make the tasks too big.

In order to figure out how to complete the tasks, you'll need to read. Books, web sites and existing code are all very helpful in figuring out how to do what you want. It's worth looking at several different ways to complete the same task, because some ways are better than other, or might better fit your project.

Kaleb Brasee
+7  A: 

Given you've not tried this sort of thing before here's a few things I'd recommend.

Start with something other than DirectX (and presumably C++)

DirectX and C++ expose you to a lot of low-level stuff you can learn later. Keep things simple and perhaps try XNA and C# which is close enough you can port it later but will let you skip a lot of things like memory management and pointers for now.

Start with 2D instead of 3D

The original Pacman is 2D so you won't be needed vector math for now.

So where does that leave you?

Well, a few things to think about are the game loop, keeping things in sync, updating the screen and responding to user input.

These are great principles and will let you gwt something up and running a lot sooner. Do not underestimate how important it is to keep seeing progress - this is hard if you set the technical bar too high initially.

I'd go down this route (ordered to keep things fun and interesting)

  1. Get a screen displaying - this is highly visual
  2. Get a Pacman responding to user input
  3. Get Pacman constrained to within the walls
  4. Get a ghost responding to user input - so you can chase each other :D
  5. Figure out some collision detection
  6. Get the dots and power pills rendering so you can score and eat ghost
  7. Render some more ghosts and figure out AI
  8. Work out the code for finding when the level is complete
  9. Make the map change and state reset when on a new level

Once you've got this working and running you can then decide if you want to play with better AI, 3D math or switch over to C++.

DamienG
Hi! Thanks for the comment, but to clarify: I'm not a complete beginner in games programming. I've made a tower defense in ActionScript before and have already done programming with XNA C# so I'm well aware of the game loop and *some* processes- albeit not too many. The reason I want to do it with C++ is that it's a real programming languages used for most games and as well the primary language that the college courses teach. I appreciate the comment though, and I will take your comments to heart ^^ Especially about 2D- doh! Should have realized vectors might not come into play there.
SoulBeaver
That's great! I'd still stick with a sequence similar to that described above if you don't want to loose heart. Trying to write things like AI before you can visually see it in action is a painful process ;)
DamienG
@DamienG: Yeah, thats why i model my path finding algorithms in excel, you can see exactly whats happening (and you get the reputation of being that crazy excel guy within the company)
Grant Peters
+2  A: 

Play pacman! This is the first task for your project!

Christian Harms
Due to recent events: http://www.google.com/pacman/
tur1ng
+2  A: 

I had to write a pacman game in Java for an OO class. I found it to be very straightforward, possibly with the exception of figuring out the best way to map walls. After a bit of research, I came across this: http://javaboutique.internet.com/PacMan/source.html which uses bit-shifting to determine walls. It looks like complexity overkill, but I found it to be pretty elegant after I played around with the math a little. Other than that, pacman is a very array-friendly concept, so use an array for the board, some basic sprites, tinker with the speed and refresh, keep track of game data, and toss it in a loop. As for the AI with the ghosts, there are articles written about them. Each ghost has a specific "strategy". Or you could roll your own..you could program them to be as easy as always heading towards pacman (or his general location/quadrant), or as complex (shortest-path) as you'd like.

prelic
+1  A: 

Good stuff! I am glad that Pacman motivates and inspires you.

Things to get started.

1) Decide on the development environment.

a) Are you building a standalone game or a networked game. 

b) Which language are you targetting at to improve? 

2) How well versed with AI?

3) How well versed with the programming algorithms techniques - like A * (A star) path finding, Dijkstra algorith, collision detection, hit testing or even recursive programming?

4) Are any of you talented in graphical design?

Good luck.

P/S FYI, if I were to write a Pacman game, I would do it in C# and Silverlight 4.0 (I can write C++ comfortably but my priority is to jump on the Silverlight bandwagon).

Syd