Second Milestone (EN)



Second milestone has come. This time, having a deeper understanding of the architecture that lays beneath (tweaking it a little in our favor), and adding a bit of design, we’ve made a quick progress and with very visible results. Also, our artist has made it count giving us our first original textures. Let’s talk about these progresses.


Talking about the architecture, we have made some low-level changes. As some examples, we have optimized the message system and made a system to determine the frequency each component has to be updated at. Another important change is the implementation of an archetypes system to instantiate entities; since our game lacks premade maps (they are procedurally generated). Instead of that, what we need is to store configurable values of the entities in an archetypes map, and instantiate the entities cloning those values. To accomplish this, we also needed to create an automatic name generator for entities. In the graphic part we have made use of the static geometry system Ogre offers, adding static entities (floor, wall, ceiling and stair) to a unique mesh for performance purposes.


Regarding the logic of the game we bring some advances too. First of them is a brand-new dynamic turn system that replaces the one we had before. This system is mainly an ordered list that depends on the delay of the previous action and the speed of the entity. These two determine when the next turn of the entity will take place.

Another improvement is a method to store tiles information. Each tile can have one unique “actor” (enemy or player), a set of properties (can see through it and if is passable or not) and a list of entities non-actors.

With these properties we’ve created a logic collision system, so actors can’t move to non-passable tiles.

Finally, the player can interact with doors (toggling them from passable to non-passable and back) and also can attack enemies and be attacked by them.

Speaking of the AI, we now have an A+ algorithm adapted to a tiled map. It calculates a path to a given point and it will be travelled by the enemy, taking into account that turning and walking have different costs. Nothing more from the AI team for now.

About the player controller, we’ve added the actions “wait”, “interact”, and “attack”. There is now an “up&down” movement added to the camera when the player moves to make it more realistic. The look around action now also applies to the y axis so we are not constrained to look only left and right anymore. If our moves happens to be invalid (to a non-passable tile), we don’t lose turn and a “bounce” effect will be applied to the camera to make us know that the action didn’t committed successfully.

Another thing to have in mind is that every actor (player and enemies) use the same controller, and the only difference is who is giving orders to them (keyboard&mouse vs. AI).

Some new commands were added to the command console and they are finally useful for debugging: 
  • freebird command: Activates/Deactivates the free cam, useful for map exploring
  • spawn command: Instantiates entities during gameplay (combat tests) 
  • grid command: Shows/hides a grid that makes tiles easier to see/count.
  • spawncube/destroycube command: Creates/destroys a cube in a chosen tile to mark an important position.
Following this you may see the second milestone video:


No hay comentarios:

Publicar un comentario

Share