nsmryan / RustRoguelike

This Rust Roguelike is a Roguelike written in Rust.
17 stars 3 forks source link

Hardcoding of Player Information #14

Open nsmryan opened 5 years ago

nsmryan commented 5 years ago

Early on, we discussed the idea of not hardcoding the player into the AI and other code, but having a system that worked regardless of the actors involved.

I started thinking about this, but the design seems to need a couple of use-cases to inform how we would go about it.

We should talk about why we would do this and what it would accomplish, so we can see if its something we want to pursue.

MicroChasm commented 5 years ago

One use-case could be an item that acts like the scape goat in isaac, where monsters try to attack it for a few turns. Or maybe a companion golem that fights the monsters, and itself has monster-behavior, but just targeting the closet monster instead of the player.

nsmryan commented 5 years ago

Those particular use-cases seem very approachable- we would just have to replace any code the describes the player with code that uses a generic object. There might be a small increase in complexity, but I don't think it would be too much. I see the main problem being that with the player, you can assume a lot of things that you can't assume in general. The player will have certain attributes, there will always be one player, the player will continue to be in the game between turns- things like that.

MicroChasm commented 5 years ago

maybe there are magic bits that you can hold and throw that do different things. One could turn a piece of terrain into a golem, could make for interesting interactions.

nsmryan commented 3 years ago

There are still player specific things, such as whether an entity wants to attack another entity. I've held off on making this more general as there is currently only one situation- the player and the golems.

If we had a gameplay element that required less player-hardcoding we could make progress towards this.