Search code examples
gmlgame-maker-studio-2game-maker-language

Delayed inputs racing game


i have never used game-maker before, but it seemed pretty easy to use for my school project. I want to make a small racing game, but the car has varying degrees of delay in the controls. The project is for exploring latency. so the delay in the controls could be like .05 seconds or .5 seconds, but it has to save the inputs and output in that order. Do you know how i can do this? i don't really know any commands in the language so any help would be greatly appreciated.

Also id like to add a survey sheet at the end that save the data to like an excel file, is this possible with gml?


Solution

  • A common way to simulate latency would be to create one or more ds_queue that you add new inputs in and pull inputs for the current frame from. The queue's initial size will determine the latency in frames.

    For data export, the easiest is to produce a CSV/TSV, which is but a text file with comma or tab separators and can be imported into a wide variety of sheet-editing software.