Hi,
I'm just trying to convert my prototype game to Artemis and I have some questions. Sorry for that!
I'm looking for opinions rather than solutions. It's a kind of Zelda-esque game, with a TiledMap,
a big bunch of objects (quite like entities) like blocks, bushes, enemies and stuff.
1.) Concerning collision reactions, I have a problem about blocking entities.
In my recent approach I find the new coordinates for each object, check if they collide (no problem on that),
and only move my objects, when they do not collide. In most Artemis examples I've seen so far there is one system for movement, a searate one for collisions and another one for the reaction, mostly something like reduceHealth or removeEntity without any blocking involved.
So I was wondering, what is the best way to block the entities or revert the movement of the collided entities?
Or would my recent approach be best, only to move, when they don't collide. Any cool ideas on that?
2.) I'm not sure, what should be an entity and what shouldn't. Like I said, I have a bunch of moving objects,
which could do great as entity. But what about the TiledMaps? Should they be entities as well?
Furthermore, I'm rendering different layers of the map at specific times
(i.e. first the ground, then all the objects mentioned above, then the clouds) so when my TiledMap is an Entitiy,
how should I tell the renderSystem, when to render wich layer? I thought about creating an entity for each layer,
but this seems really weird. Again, I'm looking for opinions rather than solutions.
3.) I have an XML coniguration file to tell those objects, what they should do and what not.
For each object type there is an archetype (i.e. stoneBlock has a block config, a render config, no shootable config).
Yep, it's exactly like components, I've read that cowboyprogramming article, when I startet my project.
So, my third question is about triggers, I wanted to add triggers to my archetypes like:
Code:
<component type="playSound" trigger="touchedByPlayer" value="sound1.ogg"/>
<component type="removePowerFromMyself" trigger="touchedByShot" value="valueOfTheShot"/>
Do you think, this would still make sense in an ECS or should there be a better approach?
Sorry for the long text block and my bad english!

Edit: Okay, forget about part one, I'm going to use a temporary position variable.
When I think about it, it was quite obvious!
