• Advertisement

Multiplayer Pac-man Challenge

Recommended Posts

Multiplayer Pac-man Challenge

Your challenge is to create a multiplayer Pac-man clone. See the Requirements for more information.

The 2-month challenge seems to be a reasonable time to allow more people to participate, so we're going to stick with that duration.

Create an exact replica with multiplayer gameplay or add your own modifications and improvements!

pacman.png

From Wikipedia:

Quote

The player navigates Pac-Man through a maze containing various dots, known as Pac-Dots, and four multi-colored ghosts: Blinky, Pinky, Inky, and Clyde. The goal of the game is to accumulate points by eating all the Pac-Dots in the maze, completing that 'stage' of the game and starting the next stage and maze of Pac-dots. 

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

Duration

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

Submission

Post your entries on this thread:

  • Link to the executable (specify the platform)
  • Project
    • Create a GameDev.net Project page through your Developer Dashboard (Profile menu -> My Project Dashboard).
    • Post the link here to embed in your post.
  • Screenshots
    • Create a GameDev.net Gallery Album for your Project and upload your screenshots there - or use the Projects interface to do the same.
    • Post the link in the thread and your screenshots will be automatically linked and embedded into the post.
    • Same with YouTube or Vimeo trailers.
  • A small post-mortem in a GameDev.net Blog, with a link posted in this thread, is encouraged, where you can share what went right, what went wrong, or just share a nifty trick
  • Source-code link is encouraged for educational purposes. GitHub or downloadable source code through your GameDev.net Project page.

Award

Pac-man_(Official_Image).png

Developers who complete the challenge in the specified time frame will receive the Multiplayer Pac-Man Challenge medal, which will be visible in their profiles.

Share this post


Link to post
Share on other sites
Advertisement

WTF... I had this idea last week. You stole it from my brain!! ;) jk

I might take up this challenge so I can learn some game dev in the process.

Share this post


Link to post
Share on other sites
24 minutes ago, Endurion said:

Regarding the 2 player part, all three options or does one suffice?

Just minimum one of those options. I'll try to make that more clear.

Share this post


Link to post
Share on other sites
5 minutes ago, swiftcoder said:

Man, I want to find the time to build "PacMMO". Thousands of simultaneous players in an infinite procedural world...

On a related note, any idea what the legal situation is around PacMan clones? :)

http://www.escapistmagazine.com/forums/read/7.223121-Namco-Shuts-Down-Students-Pac-Man-Project

https://answers.yahoo.com/question/index?qid=20120325083116AAK47pv

I wont be using any "copyrighted images", just making my own to avoid copyright infringement. Not sure how it works for educational use, but I'll make enough changes to colors and a bit of the design.

I had a problem last year making a "clone" for fun and received a letter for using copyrighted images.

Share this post


Link to post
Share on other sites
Just now, swiftcoder said:

Hmm. Those both pre-date this article, which seems to imply the opposite.

Anyway, not to derail the thread :)

I just had 1 bad run in for doing this, and sadly I did infringe under law (which doesn't matter if a person knows they've infringed or not, or had any intent to cause the infringement regardless of any financial gain) so it's not worth going back to a potential legal case for me. :D Some companies just send C&Ds, others will exercise their rights to make an example. I would need an official notice from them to do so otherwise.

I did a quick look, and it does look like they've opened up rights to use, but on approval only.

"But before they can use those IPs, individuals and companies will have to register to Bandai-Namco before beginning development."

Share this post


Link to post
Share on other sites

Just to clarify, images/music/sound are off limits.  Direct character use is off limits(making Mario be your character even if you make your own graphics of Mario), unless its parody and can be proven as such.  But, gameplay is FAR from off limits.  Platformers abound, so do other clones, and there are no issues with this.

 

All that being said...I think I'll make this project happen, especially since a 2 months were given.  I'll likely use Gamemaker Studio 2, and I'm thinking local multiplayer, 2, 3, or 4 possibly.  I'm also thinking at the least a vs mode, but I kind of like a coop as well.  I also think my graphics(just because I can and like it) will 3d pre-rendered sprites, done with normal-mapping in the game.  In fact, lighting should be a nice thing here since it is easy enough to do if you have the code ready ahead of time.

Share this post


Link to post
Share on other sites

Question...

Graphics representative and capturing the spirit of a Pac-man clone

This means I couldn't do something space themed, like a spaceship running from aliens while collecting energy capsules?  I saw in the specific section pertaining to art, it doesn't say the art has actually resemble pac-man, but this quote is kinda unclear.

Share this post


Link to post
Share on other sites

I would like to know too because I'm making the game with a similar idea, just not using copyrighted/restricted assets. I hope it will still be accepted as a valid submission.

Just a thought, but maybe for future challenges we should stick to making games with certain ideas and concepts with requirements, not clones as this touches on that whole IP and Copyright issue.

Share this post


Link to post
Share on other sites

That's what I'm unclear on...I know it isn't supposed to be a clone, as the rules mention "capture the spirit" but the graphics part is my question.  I'm sure a spaceship tractoring in energy capsules played in a top-down fashion, running from aliens is close enough to "capture the spirit" if it is done in a similar grid, with similar movement as Pac-Man.

Share this post


Link to post
Share on other sites

If you're concerned about IP/copyright with Namco, then capturing the spirit simply means capturing the gameplay mechanics of Pac-man. The point of the challenge is the gameplay, not the graphics.

I've reworded the challenge to make this more clear. Hopefully that helps.

And shame on Namco for attacking educational development.

Share this post


Link to post
Share on other sites

I'm not officially participating because I'm likely to get stucked somewhere along the way, probably when dealing with sound xD

Anyway I've got this so far:

Spoiler

8RUlPj7.png

The green cells are the "rules" which I still need to input in my massive switch statement to get all the corner looking right, kind of tedious x_x

I have a question regarding it: considering my code below, is this the usual way to match the correct tiles frames? Or I'm just doing it the dumbest way possible? (basically brute-forcing it one line at a time) xD

Spoiler

SDL_Rect PlayState::calculateTileFrame(int row, int column, const vector<string> &inputMap)
{
    SDL_Rect source{0, 0, 32, 32};
    if (inputMap[row][column] != '#')
    {
        return source;
    }

    //Purpose: given the cell passed as input to this function, we know it can be surrounded by 8 cells.
    //The loop below shall set the 8 bits of a char with a 1 if a surrounding cell has a wall, 0 otherwise.
    //This bit pattern will determine which tileset frame is used for the given cell.
    /*
    8 7 6
    5 X 4
    3 2 1
    */
    int shiftValue = 7;
    unsigned char byte{};
    for (int i = -1; i < 2; i++)
    {
        for (int j = -1; j < 2; j++)
        {
            bool isWall = true;
            if (i == 0 && j == 0) //skip self
                continue;

            int x = j + column;
            int y = i + row;

            //index boundary check
            if ((x >= 0 && x < inputMap[0].size()) && (y >= 0 && y < inputMap.size()))
            {
                isWall = (inputMap[y][x] == '#');
            }
            byte += isWall << shiftValue;
            shiftValue--;
        }
    }

    //match bit pattern
    // 8 7 6
    // 5 X 4
    // 3 2 1
    row = 0;
    column = 0;
    switch (byte)
    {
    //top U semi-circle
    case 0b00000010:
    case 0b00000110:
    case 0b00000011:
    case 0b00000111:
    {
        row = 4;
        column = 1;
    }
    break;
    //right U semi-circle
    case 0b00001000:
    case 0b00101000:
    case 0b00001001:
    case 0b00101001:
    {
        row = 3;
        column = 1;
    }
    break;
    //bottom U semi-circle
    case 0b01000000:
    case 0b11000000:
    case 0b01100000:
    case 0b11100000:
    {
        row = 3;
    }
    break;
    //left U semi-circle
    case 0b00010000:
    case 0b10010000:
    case 0b00010100:
    case 0b10010100:
    {
        row = 4;
    }
    break;
    //all side surrounded
    case 0b11111111:
    {
        row = 1;
        column = 3;
    }
    break;
    //top wall
    case 0b00011111:
    {
        column = 3;
    }
    break;
    //right wall
    case 0b11010110:
    case 0b11010111:
    case 0b11110110:
    {
        row = 1;
        column = 4;
    }
    break;
    //bottom wall
    case 0b11111000:
    case 0b11111100:
    case 0b11111001:
    {
        row = 2;
        column = 3;
    }
    break;
    //left wall
    case 0b01101011:
    {
        row = 1;
        column = 2;
    }
    break;
    //top wall + innerCorner SE
    case 0b00011110:
    {
        row = 2;
        column = 5;
    }
    break;
    //top wall + innerCorner SW
    case 0b00011011:
    {
        column = 6;
    }
    break;
    //outward NW corner
    case 0b00001011:
    {
        column = 2;
    }
    break;
    //outward NE corner
    case 0b00010110:
    {
        column = 4;
    }
    break;
        //outward SE corner
    case 0b11010000:
    {
        row = 2;
        column = 4;
    }
    break;
        //outward SW corner
    case 0b01101000:
    {
        row = 2;
        column = 2;
    }
    break;
    default:
    {
        row = 4;
        column = 5;
    }
    }

    source = {column * 32, row * 32, 32, 32};
    return source;
}

 

 

Share this post


Link to post
Share on other sites

When we're programming we're problem solving by creating solutions, as long as the problem is solved who cares? Some people go way overboard and complicate the process, other people find a quick and workable approach.

I'm not sure if we're supposed to provide guidance in challenges so I apologize beforehand. If you're just dealing with tile maps, you can pick any way that works for you. I normally use custom map editors I've made, but for this challenge I'm just hard coding the map by using a 2D array which holds int values, and each int represents a visual graphic tile. Then in my draw loop I just use two for loops and cycle through taking account of the tile size and how it fits into the screen.

Without the "screen and tile size part" it's just this: (You would need an if statement to draw a tile based on the value of myMap[y][x])

int myMap[5][5] = {
		{ 1, 2, 1, 2, 0 },
		{ 1, 2, 1, 2, 0 },
	    { 1, 2, 1, 2, 0 },
	    { 1, 2, 1, 2, 0 },
	    { 1, 2, 1, 2, 0 }
};

for (int y = 0; y < 5; y++) {

  for (int x = 0; x < 5; x++) {

    std::cout << myMap[y][x] << " ";
  }

  std::cout << std::endl;
}

You have 2 months, I'm sure you can find out how to implement sound. :) Doing these challenges is how you can push yourself to learn new things in game programming.

Share this post


Link to post
Share on other sites
6 hours ago, Rutin said:

I'm not sure if we're supposed to provide guidance 

I'm the first one who worries about it because wouldn't be nearly as good to succed just by copy pasting other people stuff :D And that's why I've asked only after I got it working, I don't plan to re-implementing it no matter the answers, my question was only aimed to compare to the way other people do it to gauge the benefits of each methods and learn more out of it  :)

I've had briefly thought of hardcoding the specific tyle type into the map as you did, I didn't went that route only because I though would have been kind of painful to change stuff around watching at a table of symbols (since I don't have any visual map editor xD). This is how the map input look:

Spoiler

vector<string> inputMap = {
        {"############################"},
        {"#            ##            #"},
        {"# #### ##### ## ##### #### #"},
        {"# #### ##### ## ##### #### #"},
        {"# #### ##### ## ##### #### #"},
        {"#                          #"},
        {"# #### ## ######## ## #### #"},
        {"# #### ## ######## ## #### #"},
        {"#      ##    ##    ##      #"},
        {"###### ##### ## ##### ######"},
        {"###### ##### ## ##### ######"},
        {"                            "},
        {"###### ## ###  ### ## ######"},
        {"###### ## ##    ## ## ######"},
        {"###### ## ##    ## ## ######"},
        {"###### ## ##    ## ## ######"},
        {"###### ## ######## ## ######"},
        {"#            ##            #"},
        {"# #### ##### ## ##### #### #"},
        {"# #### ##### ## ##### #### #"},
        {"#   ##                ##   #"},
        {"### ## ## ######## ## ## ###"},
        {"### ## ## ######## ## ## ###"},
        {"#      ##    ##    ##      #"},
        {"# ########## ## ########## #"},
        {"# ########## ## ########## #"},
        {"#                          #"},
        {"############################"}};

 

 

Share this post


Link to post
Share on other sites

Hi,

Sir I have an inquiry : "Create an exact replica with multiplayer gameplay or add your own modifications and improvements!"

"Exact replica" of the original ? but we can "MODIFY" it ?

Thanks ^ _^ y

Share this post


Link to post
Share on other sites
2 hours ago, DexterZ101 said:

Hi,

Sir I have an inquiry : "Create an exact replica with multiplayer gameplay or add your own modifications and improvements!"

"Exact replica" of the original ? but we can "MODIFY" it ?

Thanks ^ _^ y

The requirement means you can make 100% the same game, or make the same game "plus" modifications and improvements. It's your choice.

Share this post


Link to post
Share on other sites

Got the sprite class implemented (image below), next timer & input

How's yours coming guys? Also is ok to post here? Or are we supposed to open a separate topic?

Spoiler

8qgSNTy.gif

 

Edited by MarcusAseth

Share this post


Link to post
Share on other sites
1 hour ago, MarcusAseth said:

Got the sprite class implemented (image below), next timer & input

How's yours coming guys? Also is ok to post here? Or are we supposed to open a separate topic?

  Reveal hidden contents

8qgSNTy.gif

 

I would recommend making a blog https://www.gamedev.net/blogs that keeps track on your progress. Once you're done, submit as per post 1, and post your link and screen shot here. :) 

Share this post


Link to post
Share on other sites

I appreciate the suggestion but blogs are really not my thing :P 

Unless is a discussion with others and group learning experience kind of thing, there is no point for me in keeping a blog, I'm not the type who watch back on previously done stuff nor expect anyone else going to take their time to watch stuff made by a begginner, and I find sad even just thinking to the possibility of me writing on a blog that noones watch, so I'll pass on this one :P 

Edited by MarcusAseth

Share this post


Link to post
Share on other sites

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