DemoRec: input recording and playback

Alv

Member
Today 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 is very useful to me: because I often changed part of the graphics of my games, I had the necessity to redo the screenshots. Instead of recording the gameplay again, I was able to use the previously recorded gameplays with the new graphics. It’s a way to decouple the graphics from the gameplay. 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 centers continuously 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

http://alv90.altervista.org/downl.php?name=demorec
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Hello! Could you please add a link to the asset on the YoYoGames Marketplace? This forum is exclusively for assets on the official store, and while this looks great, I'd have to remove the topic or move it to another forum if there isn't an MP link attached (you can maintain the current link too if you want).
 

Alv

Member
Sorry! No problem, just move in another forum, thanks. The extension is not published on Marketplace.
 
Top