hellochar / ggj2016

roguelike that uses web technologies and free web assets as much as possible
https://5-71942994-gh.circle-artifacts.com/0/home/ubuntu/ggj2016/build/index.html
MIT License
2 stars 0 forks source link

restrict Entities to one per tile #31

Open hellochar opened 7 years ago

hellochar commented 7 years ago

Proposal -- Each Tile has a maximum of one entity. Each grid-space will contain a Tile and optionally an Entity.

Considerations:

a. Spawning New Entities - New entities will be spawned in a "location" but will then get moved to the nearest location that is "permissible".

b. Movement and Movement Restrictions - Actors may move. Movement is often restricted - e.g. normal User can't walk into a wall. At each actor's turn, there is the "set of permissible tiles" that that actor can inhabit. The change we're proposing is that the set of permissible tiles always remove tiles with entities already on them.

c. Tile Change - Tiles may change over time - e.g. water spreads, grass turns into fire, rocks get mined. When they do, things like visibility have to get updated. Tile changes may be either instigated by an action (e.g. entity lights grass on fire), or by themselves (e.g. water spreads by itself). Lets just say that tiles, by default, simulate once per 1s turn. So basically, the environment has a turn in the turn order.

d. How tile change works with tile movement restrictions - (b) and (c) mean that a user can e.g. be standing on a tile that then gets turned into a non-permissible tile. Processing the user's turn should include this case and act accordingly (e.g. a fish outside of water should splash around, a fire elemental in water should take damage). Actually, permissible tiles and movement should be a separate thing entirely that handles going into "bad" tiles separately.

e. Items - Items are currently entities. This means you could e.g. block the path of an enemy by dropping a bunch of items. This also means you can't walk over items and pick them up. Is this good? Alternative approaches: