Jump to content
  • Advertisement
  • entries
  • comments
  • views

Multiplayer Pac-man Challenge - Part 6 - Completed







Hello everyone! Part 6 will be my final entry regarding the GameDev.net Challenge to complete a Pac-Man style game with a multiplayer component. Above you will see some screen shots, and a video of the game in action. I will also attach a copy for you to play.

The requirements to complete this challenge are as follows:


Game Requirements

  • 2+ player board - Choose one or more games modes - local multiplayer, networked multiplayer, and/or AI players
  • Team play? Vs play? Both? You decide.
  • The game must have:
    • Start screen
    • Player selection
    • Score system for appropriate mode (winner in Vs mode or team total in Team mode)
    • Sound effects
    • Graphics representative and capturing the spirit of a Pac-man clone
    • One or more levels
  • Gameplay mechanics and mazes in the spirit of Pac-man - the game does not need to be an exact clone in graphics or gameplay, but it should demonstrate inspiration from Pac-man. The idea is to create multiplayer Pac-man gameplay.

Art Requirements

  • The game may be in 2D or 3D
  • Players must be clearly identified


February 2, 2018 to March 31, 2018 (expires when all world timezones are April 1)


Background on what went into the creation of the game:

I created a solo play feature to use as the foundation in order to easily transition into a multiplayer version. The two player split screen is a slightly modified version of the solo play mode, but with two split views, and independent sprites and movement for each robot. I also added shared lives, and the aliens will split up to chase you.

The start screen has the two play modes - Solo, and Two Player. The score system is based on power orbs collected, and in Two Player mode all power orbs collected are collective for scoring. You will win the game by removing all power orbs from the map. You will lose if your lives hit 0. Solo play has 3 max lives, and Two Player has 4 shared lives. For the sound effects, I just added music which you can toggle, and a basic sound effect for power orb collection. The graphics are a bit different, but the Robot is the replacement of Pac-Man, the Aliens are the Ghosts, and the Power Orbs are the Pac-Dots, ect... There is only one level in this game to meet the requirement.

On the programming side I had to setup a gliding based movement system that has a queue for smoother movement (same system as Pac-Man). How this works is that you will move in the direction you've pressed until you hit a wall. The queue works like so: If you're moving right and you will have a bottom opening coming up, you can just press down once and release, then your Robot will auto move down and continue moving in the downward direction. This allows smoother movement because you would have to always be holding the keys to get smooth movement prior to directional change unless you're 100% accurate on input due to movement bounding box at 96x96, and all tiles are at 96x96 giving the maze like feel. I did a bit of an edit for the sprite bounding boxes as I'm not using 96x96, but the pixel size of the graphic less the transparency. The 96x96 is just used to direct movement through the maze evenly.

I also added in path finding for the aliens which is very optimized to reduce unnecessary checks.

For the Ice Block, I just programmed a quick class to handle animations by loading in frames with a set time per frame.

Beyond that, everything else is fairly standard for this 2D based maze game.

The game itself was programmed in C++ using SFML, and openAL for audio. I had to program interpolation to smooth out the graphics as I use fixed time step with variable rendering. I created all the graphics in 3D then converted to 2D, and slightly touched them up.

What I didn't get a chance to do, and would like to improve on:

Sadly one of the biggest problems when working on this game was the lack of time I could commit. I missed the deadline for the prior GameDev.net challenge and really had to push myself to commit this project to completion.

If I had more time I would improve on the graphics more, add in full animations to everything including directional movement. More sound and music. More levels. AI player mode. I also would have considered full 3D for this game.

I really need to start these much earlier. :) 

What struggles did I have?

The biggest struggle I had beyond time restrictions was a stupid issue with my openal32.dll file. I was including an older version, and not the one in the bin folder for the latest SFML release, so I had massive performance issues due to the wrong file. Took me a bit to figure out what was going on which all the threads exiting like wild fire, so I replaced the .dll file and problem solved.

Final notes:

Regardless of the all the issues I had, and changes I wanted to make, I really enjoyed making all the graphics, and programming the Pac-Man themed game. Even a simple looking game like this takes a lot of work, easy or not. I find it extremely rewarding just to complete the task itself as we all know making games isn't easy, and sticking to the game until the end is even more of a challenge. I recommend everyone take advantage of the GameDev.net challenges if possible.

Game Download - Windows (32-bit) - Built on Windows 10 (Should work on Windows 7 - 10)



If you've missed any of the earlier parts, check below for the links:


Recommended Comments

Looking good, A little "sizing" optimization would be cool, The camera looks way too close aswell in my opinion. But that might just be one of the difficulties of the game. Anyways looking good. Helps inspiring me.

Share this comment

Link to comment
On 4/7/2018 at 5:34 AM, Kilapse said:

Looking good, A little "sizing" optimization would be cool, The camera looks way too close aswell in my opinion. But that might just be one of the difficulties of the game. Anyways looking good. Helps inspiring me.

Thank you for your feedback @Kilapse :) 

I ran into a few challenges with this project. It was a time challenge as per the GameDev.Net Challenge requirements, and as usual I'm at the party 2 months too late. ;) So I had 30 days to get this done with out much free time. :D 

I'm not a 2D Artist by any means, in fact I can barely do sprite art for games beyond GUIs. Since I'm working in 3D, I made the mistake in texturing the assets with finer detail, which means when I scale them down more and render them out for 2D, the graphics turn out very poor. If I had enough time I most likely would've made this in 3D! :) 

The other challenge I found was that when I did do a scale down test, it was simply too easy to predict movement of the aliens because you could see more. Having a closer camera view would allow the aliens to split up, and you wouldn't realize it until the last moment. :D 

In future I just need to remember to texture the models with the idea they're going to convert into 2D, which means less fine details because the quality loss is too great with a smaller size sprite. :) It wasn't so much of a problem with the robot, but the aliens would loose quality as seen here below:

Normal around 96x96 : image.png.181bd844aa71b94340ab8fc4f39a82c4.png image.png.d1191b87b96bbb8fe672a94b1595f8ac.png

Scaled Down to around 36x36 : image.png.62bf8b9932fea4cd9d6f425d8d1f2b5e.png 

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!