DemoRec: input recording and playback

I wish to show you a new Game Maker extension I made to record the gameplay. The extension can record mouse and keyboard input and reproduce them accurately during playback.

This extension can be very useful to decouple the graphics of the games from the gameplay: for example, if you want to change some graphic assets, you can use the same old recordings to take new screenshots. With appropriate modifications, this extension could be used in different ways.

In order to simulate mouse down and mouse up, I created a simple DLL “RecHelper.dll”, which is included in the gmez.

How to use it

  • Import all the content in your game.
  • Place the persistent object sub_record in the first room of your game.
  • To activate the object at runtime, you need to enter a secret keyword (the default is “phoborec”).
  • A messagebox says that the object has been activated.
  • Press F11 to start / stop recording, F12 to start / stop playback.
  • A recording file “sub_record.txt” is saved in the %localappdata%\<Game Name> folder.

Mouse lock

DemoRec can also manage the mouse lock, used for example in FPS games.

The extension includes the object sub_mouselock. Place it in the first room of your game if you want to use it. Use the User Defined 0 event to activate it, User Defined 1 to disable it.

When the object is active, it continuously centers the mouse and computes the delta. This one is stored in the two variables dx and dy, which can be used for example to rotate the view.

In order to tell sub_record that there is a sub_mouselock object, you need to assign the id of the lock object to the variable sub_record.mlock_obj.

Download link

 Download demorec