Binding Event Sequences

edited 2009 Nov 13 in Developers
<i>This post was originally made by <b>danij</b> on the dengDevs blog. It was posted under the categories: Engine, Games, Version 2.0.</i>

Currently I'm in the process of fixing the problems with <a href="http://sourceforge.net/tracker/?func=detail&aid=2638826&group_id=74815&atid=542099">the chat widget vs the cheat code responder</a>.

It occurred to me that the cheat code entry could be generalized to the concept of an "event sequence" that could be handled by the engine's event binding system. Cheats are conceptually similar to the existing "double forward equals "use"" symbolic event binding.

The existing event binding system and the bind context stack could be utilized for the entry of cheats. This would allow for the current mechanisms used for cheats which exist game-side to be removed entirely and in the process fix the aforementioned issues.

This would require further generalization of the symbolic event stuff so that they can be created by the games at runtime and the conversion of cheats to console commands.

In a private branch I have already commonized the game-side cheat mechanisms but won't take this any further for now.

Comments

  • I think it's a very neat idea to incorporate the cheats as sequences in the engine's binding system. In effect, you're binding a series of events instead of a single event.

    Why would it require any more symbolic events, though? I would imagine that the regular events are enough, e.g.:

    <tt>bindeventseq game:key-i game:key-d game:key-d game:key-q game:key-d "god"</tt>

    We can return to this post-6.8.
  • What I meant with the symbolic event for double click is that it could be replaced with an event sequence binding.

    Regarding the syntax example above; there should be no need to repeatedly state the bind context for every key/button. After all, its the binding that has the context not the events.

    Glad you like the idea. It will be a nice engine feature that will help to eliminate more of the old event responder chain.

    Yes the implementation should wait until after beta6.8 I just wanted to make the suggestion now in case you had planned to make any further changes to the bindings for this release.
  • Oh I see.

    <blockquote>Yes the implementation should wait until after beta6.8 I just wanted to make the suggestion now in case you had planned to make any further changes to the bindings for this release.</blockquote> At the moment I have no further bindings-related changes in mind for 6.8.
Sign In or Register to comment.