tonarino / bomberman-of-the-hill

13 stars 5 forks source link

Player action logic #13

Closed PabloMansanet closed 3 years ago

PabloMansanet commented 3 years ago

Business logic for the effects that player actions have on the world, as well as designing the Action enum itself.

Movement

Movement action should, well, move the character, but it may have non-obvious edge cases:

Placing bombs

strohel commented 3 years ago

Where is the bomb placed? In most bomberman games, the bomb is placed exactly under you, which causes a bit of an exceptional state as it's the only "normal" way you can share position with a bomb. As soon as you move away from the bomb, you are unable to occupy the same tile again. I don't see a reason we can't do that ourselves

If that simplifies things I think I'd be completely okay to make bombs "passable" for everyone. (or in general to tweak the rules if that makes implementation/logic simpler)

Alternative would be to place the bombs in front of bombermans, but that would require adding "rotate me" actions and likely more corner-cases.

PabloMansanet commented 3 years ago

Yeah, I think the simplest thing will be to assume that bombermen and bombs can share a space. If we build around that assumption, then the decision of whether it's possible or not to walk into a bomb becomes a simple tweak :)

skywhale commented 3 years ago

I'll assign this to myself to implement a basic logic for bomb placement, with https://github.com/tonarino/bomberman-of-the-hill/issues/7.

PabloMansanet commented 3 years ago

Seems like bombs are working pretty well for now so I'll close this, and bring up another issue for improvements.