User Tools

Site Tools


inputdelayqueue

Component: Input Delay Queue

Summary

The generally recommended procedure for handling input is to read directly from the keyboard and immediately apply a function. I propose adding a layer of abstraction to store the inputs before processing them.

  1. Enumerate all possible inputs.
  2. Define an object that contains information about an input, such as the the type of input and the time the input was received.
  3. When an input is received, save an object in the queue.
  4. The game loop will process the input queues for each actor and apply the matching function.

Applications

Artificial intelligence

An input description model can be used to make AI's action choices equal to those of the player. Delays can be used to simulate confusion and hesitation.

If certain AI instructions are derived from the input description object, the queue could be used to pass the AI instructions such as to wait a while before running an observation function.

Stoner jokes

Delayed queued input can be used in the stoner-joke games CallOfDoobie and WeedRacer where the player character is stoned to varying degrees throughout the game and responds variably to player input.

Metadata

{“TOPICINFO”:{“author”:“DeltaTango”,”date”:“1373338690”,”format”:“1.1”,”reprev”:“1.1”,”version”:“1.1”},”TOPICPARENT”:{“name”:“WebHome”},”GameAboutFormTemplate”:{“GameGenre”:“Unspecified”,”Inspirations”:false,”GamePerspective”:“Unspecified”,”ProjectLegality”:“Unspecified”,”ProjectDifficulty”:“Unspecified”,”TargetPlatform”:“Unspecified”,”TargetERSB”:”???”,”YearOfIdea”:false,”DesignVersion”:false,”DesignCompletion”:“Utterly Vague”,”CodeVersion”:false,”CodeCompletion”:“No code”}}

inputdelayqueue.txt · Last modified: 2013/11/29 18:15 (external edit)