You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Collision grid should have support for detecting collisions with non-static entities.
Right now it only registers static entities in the collisiongrid.
Should probably have an additionl grid-layout with non-static entities that are specified by entity-id to generate different results based on the entities colliding.
E.g. if a bullet collides with an enemy in the new grid - this should trigger a -health on the given entity and whatever follows from that (death, hurt etc..)
Should probably rename the current grid-array in collisiongrid to reflect this
Not sure if best to combine the two grids, or have separate (might be easier with separate so I might start with this)
The text was updated successfully, but these errors were encountered:
Entities now all belong to a faction FRIENDLY or HOSTILE (default
HOSTILE).
Collisions between entities with same faction is ignored for now
(logged).
Results in:
Monsters can now be hit by e.g. a player weapon and be disposed - but
player can not attack himself. Next step is to implement health and
more advanced hit-triggers (take damage etc.. HIT its own category?).
This is the first iteration of this and I think it can be improved - but
for now it works! Height is not considered (but should be checked y pos
vs entity-height if it is actually a hit!)
Entities are now placed on the tiled-map and spawend in the correct
position like anything else! Need to also add the entities from the map
instead of having to be manually defined as legal entities for the
factory to be able to spawn them.
Entity factory returns a new entity based on the type and params given
(defined in constants and from the map (e.g. position)
Fixes#3#4#5
The Collision grid should have support for detecting collisions with non-static entities.
Right now it only registers static entities in the collisiongrid.
Should probably have an additionl grid-layout with non-static entities that are specified by entity-id to generate different results based on the entities colliding.
E.g. if a bullet collides with an enemy in the new grid - this should trigger a -health on the given entity and whatever follows from that (death, hurt etc..)
Should probably rename the current grid-array in collisiongrid to reflect this
The text was updated successfully, but these errors were encountered: