Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ghost Hunt [Multiplayer PacMan] [Networked Prototype, 2-4 Players]  (Read 5185 times)

0 Members and 1 Guest are viewing this topic.

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Ghost Hunt - Multiplayer Prototype
Download Link
Source Code (Git Repository)

Description
Written for university coursework, this is a multi-player game modeled after Pac-Man where the player and ghosts are all human players. The game is written in Scala using JSFML for graphics and audio. To run, download, unzip and launch either the ghosthunt shell script or the ghosthunt.bat batch file in the bin directory.

Controls
In-Game
- W = Move Up
- A = Move Left
- S = Move Right
- D = Move Down

In-Menu
- Mouse Click = Select a menu item (text boxes, buttons, etc.)
- Keyboard = Typing for Host and Port

Goals
The goals of the 'Hero' are to collect all the pellets and avoid the ghosts.
The goal of the ghosts are to hound and catch the player.

Known Issues
Gameplay
- It is possible for the ghosts to make victory impossible for the player by simply not moving, as this means they'll remain covering a pellet.
- It is difficult for the player to lose the ghosts when they are detected, as they have no means of repelling or escaping except for moving around the maze.
- Gameplay with only 2 players is boring.
- Players can't decide whether to be ghosts or the hero, the server automatically assigns those.
- Players can't start a game, the "Start Game" button is on the host window and must be clicked by whoever is running the host.

Technical
- If the hero disconnects, then two hero characters will be displayed on screen when the server returns to the lobby and in the next game.

Screenshots



Credits
FilenameTitleArtistLicenseSource
font.ttfSensationBernd MontagFreewarehttp://www.dafont.com/sansation.font
title.oggWingsHalcyonic Falcon Xhttp://creativecommons.org/publicdomain/zero/1.0/http://open.commonly.cc/
game.oggThose Of Us Who FightHalcyonic Falcon Xhttp://creativecommons.org/publicdomain/zero/1.0/http://open.commonly.cc/
endgame.oggThat Which We Have Lost And ForgottenHalcyonic Falcon Xhttp://creativecommons.org/publicdomain/zero/1.0/http://open.commonly.cc/
player_death.oggShot Gun Soundluminalacehttp://creativecommons.org/licenses/by/3.0/http://soundbible.com/1706-Shot-Gun.html
beep.oggbeepCHydranoshttp://creativecommons.org/publicdomain/zero/1.0/http://www.freesound.org/people/Hydranos/sounds/237706/




Hello, I figured I'd post this here. I made this casually in about a week fairly easily using Scala and JSFML, with the networking code going through Java sockets, for my coursework. Having now more-or-less graduated (still got to get the ceremony), I figured I'd share it around a little before it vanishes into the aether. I got an A for this, don't ask me how.

But I do like the core gameplay idea, so am toying with porting it over to something a bit more portable, making it less obvious a pacman clone, improving the assets (I made the graphics, the graphics suck), fixing the issues with the gameplay, implementing AI to allow for single-player or for game-play with 2 players to be enjoyable. I want to know if people think that's a good idea or not.
« Last Edit: June 26, 2014, 07:54:44 pm by MorleyDev »
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Ghost Hunt [Multiplayer PacMan] [Networked Prototype, 2-4 Players]
« Reply #1 on: July 04, 2014, 04:50:11 pm »
Looks interesting, but I can't split myself in two, so I haven't been able to play it yet.

Is it a bug or a feature that the walls are often rendered with 1 pixel off compared to others?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Re: Ghost Hunt [Multiplayer PacMan] [Networked Prototype, 2-4 Players]
« Reply #2 on: July 05, 2014, 06:13:52 pm »
Bug or feature? Well, yes :P

Okay, so the actual explanation is that it is a mistake I made in the spritesheet. The actual 'tiles' are bigger than the visible walls, but some are off by a pixel and so look too far up or down or are missing some width, resulting in the jaggedness.

I decided the end result didn't really subtract graphically enough for me to be bothered with fixing it for a small prototype/university coursework. Which is why I'm not an artist or graphics designer, I guess :)
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

 

anything