ok how would you

tinytim
02-25-2002, 10:54 AM
make a pac man type game and animate the objects

Teric
02-25-2002, 11:09 AM
That's a really tall order. Believe it or not PacMan is a fairly complex game graphically and logically. If this is your first attempt at making a game, I would strongly suggest you start with something a lot simpler.

You could make something like Tetris or Space Invaders; either of those would be easier to do than PacMan.

denmeister
02-25-2002, 11:13 AM
If you insist on making this your first project (despite my, and I'm sure everyone else's advice) I suggest you start with DX81 SDK. If you're comfortable already, then go to Jack Hoxley's page for some very good stuff on collision detection and the like. Good luck to you, You're going to need it.

Waxycat
02-25-2002, 03:21 PM
Uh.... No offense Teric, but unless I'm stupidly overlooking something terribly strange, I don't think Pac-Man qualifies as a relatively complex game. LOL there's no trig involved, you move in square incraments, so the collision detection is simple, and just keep a 2D array of the squares and their type, and where the enemys are, and a 2D array of booleans that represents the little road-lines. then start with all the ones false that are covered by a wall, or shouldn't be there, and the rest true. Then every time you move, set the corosponding line to false, and change the picture, then check through the array for any true lines. If none are true, the stage is over. The tough part is getting it to have any good graphix speed.

Volte
02-25-2002, 03:24 PM
There is, however, some AI. The ghosts have to find a path towards you. It may not be complex AI, but it's still quite a task for a beginner (it'd even take some research for some of the more advanced programmers to do).

denmeister
02-25-2002, 03:30 PM
A very easy path finding algorithm to implement is the Dijkstra Path Finding Algorithm. A good tutorial can be found at http://64.23.12.52//Tutorials/GeneralVB/GM_Dijkstra.asp

Squirm
02-25-2002, 04:52 PM
Using DirectX for this (and DirectX 8 at that) would be a bit overkill. Using an algorithm like Dijkstra would also be overkill.

Simple API is all you need. You need a few pictures : ghosts, in 2 colours, PACman, in 4 directions, cherries, dots, and walls. You then BitBlt the required pieces into place each time.

As far as pathfinding goes, when I wrote PACman a while back, I used a method where the ghost moves along the passageway and around corners in one direction until it meets an intersection. At this point it 'tests' each of the surrounding squares (except the previous square, the ghost never double back) to see which one puts it closest to the player. It then moves off that way.

Simple. :)

denmeister
02-25-2002, 05:20 PM
I've always been one to let the hardware do as much as possible. DX8 allows for quite a bit of hardware acceleration. It might be "over-kill" but it's also the fastest way to do it. And that's what I try to make my games do... as much as they can, and as quickly as possible.

Squirm
02-25-2002, 06:23 PM
Hardware accelerated PACman, how novel. :D
Of course, for a seasoned DX programmer we would be talking about a 3D PACman, lensflares, specular lighting and transparencies. An awesome PACman it would be.

But for simple PACman it is overkill. :rolleyes:

denmeister
02-25-2002, 06:32 PM
I'm thinking more along the lines of per-pixel lighting using pixel shaders. You got me thinking along a path, now. The only problem I see with a 3-D Pac-Man is it would be easy (too easy) to get lost in your world. Unless you made all walls transparent, but that would take more graphics power than even the best video cards could muster just to make a decent size maze. Unless of course we used Mr. LaMothte's great truth, found below. It would be a very good project, indeed. But not for the faint-of-heart. It would be neat to see though. :rolleyes:

Squirm
02-25-2002, 07:08 PM
I was thinking more of a 3D-isometric style where the game board rotates as you turn.

But this is getting offtopic now...... :-\

AcidBoot
02-25-2002, 08:30 PM
In terms of the AI, as Squirm pointed out, it is very easy to have the ghosts basically home in. Something that would be easy to add would be a system of getting the ghosts to work together.
When a ghost reaches a junction it makes a decision about which path to take, as per normal. That path then becomes invalid for the next say 3 seconds. This means that the ghosts will split up and try to trap PacMan. The tricky part is if you have 3 ghosts in a row (which shouldn't happen) then you would have to clear the invalid status, so that ghost 3 has a valid pat open to it.

You'd have to play test it a bit, as it could easily lead to no-win situations on simplistic maps, and lets face facts... its PacMan.

I don't see anything wrong with doing PacMan as a first game. It teaches most of the basic principals required, but remains at a basic level. If one were having a bit of difficulty with it they could do a turn-based version. It wouldn't be fun, but it would be sooo easy to do.

Waxycat
02-25-2002, 10:01 PM
Well I guess remaking Pac-Man for an experament is ok, but I don't think anyone will ever outdo Happyweed. For the AI just have a recursive function to find the shortest route, like a flood fill.

Kitaiko
02-26-2002, 02:50 AM
This is segas' "Pacmania" on the genisis. Just to help with ideas

Kitaiko
02-26-2002, 05:07 AM
Originally posted by denmeister
It would be a very good project, indeed. But not for the faint-of-heart.

lol extreme PROGRAMMING!

denmeister
02-26-2002, 06:30 AM
If programming isn't extreme, what's the point? If it's easy, it's already been done.

Waxycat
02-26-2002, 08:50 AM
hah, denmeister, you took the words right out of my brain!

denmeister
02-26-2002, 02:13 PM
The ghosts in the original Pac-Man often doubled back. Then again no one says your new Pac-Man has to be completely based on the original. You should feel free to make it how you want to. Don't be afraid to do something new.

Kitaiko
02-27-2002, 01:22 AM
Originally posted by denmeister
If programming isn't extreme, what's the point? If it's easy, it's already been done.

Your right. Now "extreme programmers" lets get back to discussing this never-been-done-before game Pacman.

ardman
02-27-2002, 02:06 AM
Why not check out this link:

http://www.planet-source-code.com/xq/ASP/txtCodeId.5522/lngWId.1/qx/vb/scripts/ShowCode.htm

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum