reasonml-community / repacman

22 stars 2 forks source link

Add Ghosts #4

Open emmenko opened 6 years ago

emmenko commented 6 years ago

Acceptance criteria

feychou commented 6 years ago

I'd like to give this a try, will report if failure ensues :robot: :ghost:

emmenko commented 6 years ago

Awesome ❤️

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

ncthbrt commented 6 years ago

@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 commented 6 years ago

@ncthbrt I know

ncthbrt commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

The acceptance criteria should probably reflect that too.

emmenko commented 6 years ago

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

feychou commented 6 years ago

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:

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

Makes sense 👌

emmenko commented 6 years ago

Would you like to give this a shot?

feychou commented 6 years ago

Yup!

feychou commented 6 years ago

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

error-repacman

emmenko commented 6 years ago

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

bsansouci commented 6 years ago

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