Trapped in the bureaucratic spiral

The last week there have been no news because we were involved in bureaucratic issues and we are attending an intensive course in management and business administration that will finalize the next week.

This has prevented us from making great advances in recent days, despite of that, we have been making some small internal changes and we have been testing some of our latest features added.

Improved layer system

MindShake has improved its layer system.

Until now the layers were little else that an object container, but now you can: 

  • Set the layer position, affecting all the objects inside.
  • Modify layer render order.
  • Scale independently each layer, horizontaly or vertically.
  • Set its pivot, to move each layer snugly and make nice transitions.
  • Modify the layer alpha channel or colorize (tint) it, to make some cool effects.

And, of course, you can still enable camera transformation to leave the system to adjust the layers relative position and scale to do automatic parallax scrolling.

All these changes affect the contents of the layer and you can make some effects more easilly now.

Unified Layers

At beginning we mistakenly thought that was better to separate objects per kind because we thought that this way would be simpler for the users and we wanted to promote the use of layers because we think that is is a powerfull feature.

But now we think that is better, and easiest, allow the user decide how he/she wants to distribute the objects across layers.
In this way we unified SpriteLayer, TextLayer and 3DModelLayer (not available) into ObjectLayer. Thus, the only different layer at this point is TileLayer that is in fact wholly different from other layers.

Notes about new event StateChange

Note that if you reach a state for the first time the order of the events will be:

  1. ExitState (last state)
  2. StateChange
  3. Begin (for which behaviors associated with current state that have not been yet initialized)
  4. EnterState

For this reason we are able to make some configuration changes in this event, because it will be before than Begin

New event for behaviors

We added a new event ‘StateChange’ to allow behaviors to detect when the state will be changed. This event will be sent after ‘ExitState’ and before ‘EnterState’ to all kind of behaviors, with & without state.

Inside this event you can check the prior state and the current state, using behavior manager, to make per state changes or configuration.

IBC: Inter Behavior Communication

MindShakes proporciona una forma fácil de comunicación entre los diferentes comportamientos a través de mensajes.

Cuando se va a dividir la lógica entre los comportamientos diferentes, no tiene que preocuparse acerca de cómo estos comportamientos se encargará de su visibilidad. Si necesita que varios comportamientos comunicarse, puede utilizar el sistema IBC.

Todos los comportamientos tienen un método virtual que se utilizará para recibir mensajes del administrador de la conducta. El nombre de este método es “Notificación”. Un comportamiento sólo puede recibir notificaciones de los mensajes para los que ha sido registrada. Para ello debe utilizar el método “RegisterNotification”, desde el administrador de la conducta, donde se debe especificar el ID de la notificación y el comportamiento de la instancia que va a recibir la notificación. Luego, cuando el método “SendNotification”, desde el administrador de la conducta, se invoca la “Notificación” método, para cada comportamiento que se ha suscrito a este mensaje de identificación, será invocado.

Tenga en cuenta que debe sobrescribir la “Notificación” método en su conducta, si usted quiere manejar cualquier notificación.