Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Pac Man Clone in 60 Lines of Code

Discussion in 'Made With Unity' started by duhprey, Jul 31, 2010.

  1. duhprey

    duhprey

    Joined:
    Nov 13, 2009
    Posts:
    165
    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: http://www.tosos.com/PacManClone.html

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

    Attached Files:

  2. duhprey

    duhprey

    Joined:
    Nov 13, 2009
    Posts:
    165
    Btw, secret "cheat": PacMan is using the FPSWalker script with no modification. So think about what that means... :)
     
  3. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    529
    it is lacking much of the functionality of pacman - and something tells me its using more draw calls too :p

    not horrible for 60 lines of code (minus the overhead of an FPS Walker :p)
     
  4. duhprey

    duhprey

    Joined:
    Nov 13, 2009
    Posts:
    165
    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 :) 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...)
     
  5. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,998
    Yah, PacMan can jump!
     
  6. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    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 ):
     
  7. charlie cats

    charlie cats

    Joined:
    Sep 29, 2011
    Posts:
    1
    I like flash pacman versions like this one. :p
    It has a realistic map and high score table. :D
    Do you think you can get it to the point where it plays like the real game? or close?
     
  8. silvio_mee

    silvio_mee

    Joined:
    Oct 14, 2011
    Posts:
    1
    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.
     
  9. DaneC020

    DaneC020

    Joined:
    Mar 19, 2010
    Posts:
    191
    Ignore. I misread and didn't see the "Just kidding" part.

    -Dane
     
    Last edited: Oct 14, 2011
  10. TheCasual

    TheCasual

    Joined:
    Sep 30, 2010
    Posts:
    1,289
    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.
     
  11. lucasdavid

    lucasdavid

    Joined:
    Oct 30, 2013
    Posts:
    1
    Thank you! Just needed something like that to help me with my project! :)
     
  12. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
unityunity