Pac Man Clone in 60 Lines of Code

I thought it would be fun to see how quickly I could throw together a pacman clone in Unity. And came up with this:

And it’s only USD$50 to get a license to make your own pacman clone!!

Just kidding.

You can download the project here: http://www.tosos.com/PacManClone.zip or play around with it here: Unity Web Player - PacManClone

Please note, I was intentionally making the AI bad so I could make a comparison of good AI sometime later.

357887--12434--$screen_shot_2010_07_31_at_75312_am_377.png

Btw, secret “cheat”: PacMan is using the FPSWalker script with no modification. So think about what that means… :slight_smile:

it is lacking much of the functionality of pacman - and something tells me its using more draw calls too :stuck_out_tongue:

not horrible for 60 lines of code (minus the overhead of an FPS Walker :P)

Hehe good point. I shouldn’t claim it’s a complete clone. Maybe I will have to see if I can do the whole thing and still under 100.

Also yes, it’s 850 draw calls :slight_smile: The boundary is all under a mesh combiner, but I didn’t put the Dots under because they disappear and I assumed that wouldn’t work with the combiner (although I should test that…)

Yah, PacMan can jump!

LOL @ this… all the DCs went to all 200 of the tiny spheres in the game, the controls are totally wrong (play a real old school pac man game, pac man keeps running straight til you turn) the power up thing doesnt do anything at all, heck… the ghosts dont even kill you! the ai doesnt even follow you, you can jump O_O… shall i go on… the map itself does not fit the pac man game with the real controls (it must be a single unit across and diagonally thru out the map)… wheres the spawning strawberries and bananas and other fruits!? wheres the music!?

Im disappointed ):

I like flash pacman versions like this one. :stuck_out_tongue:
It has a realistic map and high score table. :smile:
Do you think you can get it to the point where it plays like the real game? or close?

Hi, it’s great.

I can’t run this pacman on android emulator. When build i see many errors.
Is any way run this game on android? Help me please.

Ignore. I misread and didn’t see the “Just kidding” part.

-Dane

I dont believe anywhere he claims to be selling it , all the links are to free project source, and a free player.

The AI (if it can be called that) is really rediculous though, doesnt seem remotely smart at all , more like its spheres with rigidbodies that just kinda bounce alot, with maybe a little force added here and there.

Thank you! Just needed something like that to help me with my project! :slight_smile:

Someone has already done this. Check out FPS Packman: Discover and Play Free Online Games on Kongregate!