Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Add Ghosts #4

Open
emmenko opened this issue May 14, 2018 · 17 comments
Open

Add Ghosts #4

emmenko opened this issue May 14, 2018 · 17 comments
Assignees

Comments

@emmenko
Copy link
Contributor

emmenko commented May 14, 2018

Acceptance criteria

  • Ghosts move like Pacman
  • Ghosts are controlled by the game system and move in a semi-random fashion (e.g. if they are close to you they tend to follow your movements)
  • Encountering a ghost will make you loose a life
  • Player starts with 3 life, then it's game over
@feychou feychou self-assigned this May 15, 2018
@feychou
Copy link
Contributor

feychou commented May 15, 2018

I'd like to give this a try, will report if failure ensues 🤖 👻

@emmenko
Copy link
Contributor Author

emmenko commented May 15, 2018

Awesome ❤️

So good to see so many people interested in a post-hackathon project! 🙌

@ncthbrt
Copy link
Member

ncthbrt commented May 16, 2018

@feychou Would recommend checking out a write up of ghost behaviour. It is more deterministic than you'd think. The different ghosts also have different "personalities"

@feychou
Copy link
Contributor

feychou commented May 16, 2018

@ncthbrt I know

@ncthbrt
Copy link
Member

ncthbrt commented May 16, 2018

Fair enough :)
Sorry if I'm being prescriptive. Just remember this stuff from our game dev module. Pac Man was one of our projects

@feychou
Copy link
Contributor

feychou commented May 16, 2018

No worries; I just thought of it as a given, to model the ghost behaviours according to the ones in the original game.

That's the reason why it could be wise to introduce one ghost at once, but that depends on how much the algorithm differs - which I am not sure about yet.

@feychou
Copy link
Contributor

feychou commented May 16, 2018

The acceptance criteria should probably reflect that too.

@emmenko
Copy link
Contributor Author

emmenko commented May 16, 2018

Feel free to update the AC however you like, I just put there some points that I could think of.

@feychou
Copy link
Contributor

feychou commented May 20, 2018

Read up on the ghosts behaviour mostly here and I will summarize the takeaways.

There are three modes in the game that effect all ghosts more or less equally:

  • scatter, when the ghosts are reaching for their own corner on the board (each of them has a designed one);
  • chase, when ghosts try to catch Pacman;
  • frightened, when the ghosts turn blue after an energising pill.

The algorithms by which the ghosts try to catch Pacman are very different; for instance Akabei just takes the next tile that will bring it closer to Pacman, but Aosuke takes into account also Akabei position to determine its next tile.

The ghosts all start from the same position, in an area of the game where just the inactive ghosts can be held - basically their house.
Also in the original game the maze is strictly defined, which means the ghosts have to make decisions just at the intersections. Also important to notice, every small white dot slows Pacman down a bit and makes the ghosts faster in comparison.

This bears the question, do we want to make a clone of Pacman or something similar that kind of works?
In any case, I think this issue can be broken down in smaller ones considering its complexity.

Implementing a ghost house that is not crossable by active agents could be one.
Chase/Akabei combo implementation could be another and so forth.

@emmenko
Copy link
Contributor Author

emmenko commented May 22, 2018

Thanks a lot for the write up Fede!

While it would be obviously nice to have a game resembling the original version as much as possible, given the complexity of those different pieces it would make sense to start with something more tangible to achieve.

So let‘s try to build the simplest behavior and improve upon it.

How would you like to proceed here? Do you want to break this down into smaller and more concrete tasks?

@feychou
Copy link
Contributor

feychou commented May 22, 2018

@emmenko Ok, then I'd propose we could first have one single ghost that starts in the middle of the boad and no ghost house. The ghost would always be in chase mode and behave like Akabei, that is, its target tile (coordinates) is always Pacman.

I would avoid having 4 ghosts behaving the same way at any point in time because that could make the game very stressful ^^

@emmenko
Copy link
Contributor Author

emmenko commented May 22, 2018

Makes sense 👌

@emmenko
Copy link
Contributor Author

emmenko commented May 22, 2018

Would you like to give this a shot?

@feychou
Copy link
Contributor

feychou commented May 22, 2018

Yup!

@feychou
Copy link
Contributor

feychou commented May 22, 2018

On Ubuntu 17, been trying to work around this problem on yarn build without success 😞

error-repacman

@emmenko
Copy link
Contributor Author

emmenko commented May 22, 2018

Hmm, is this happening on latest master? You did manage to run it before right? Did something change recently that is causing this? 🤔

@bsansouci
Copy link

@feychou This was just fixed in a reprocessing dep. Try nuking any lock file and installing again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants