Mouse print recorder

Sc2gears inculdes a Mouse print recorder which is both a tool and a service-feature.

The mouse print is the track of mouse movements. Sc2gears can save both the binary data of the mouse print or the image of it drawn onto a canvas.

The mouse print can be customized on the "Mouse print" tab in the Miscellaneous settings dialog. You can select different image output formats (PNG, JPG, GIF), you can customize the mouse print color and the background color, enable/disable anti-aliasing, set the time limit to pour ink when mouse is idle, set the ink flow rate, set the compression algorithm to use to save mouse print binary data. The output folder to save mouse prints can be set on the Folders tab of the Misc settings dialog.

You can setup Sc2gears to save all your mouse prints from the games. It can be enabled on the Mouse print tab in the Misc settings dialog: "Save mouse prints of all games".

Note: MAC users cannot use the Mouse print auto-saver only the manual mouse print recording, because the game status detection only works on Windows.

Google Ads

Mouse print recorder

The Mouse print recorder is available from the Tools menu: Mouse print recorder. This tool can be used to check the current image of the mouse print.

Beside the image it also shows you various useful information like the total distance your mouse moved (in pixels, foots, meters), the average mouse speed (in pixel/sec, inch/sec, cm/sec) etc.

It can also be used to manually start and stop mouse print recording. Note that this window does not need to be opened: once you start the recording you can safely close it. When you reopen it, you will see the mouse print that was recorded (or is being recorded).

The tool is also able to load previously loaded binary mouse prints, so you can reproduce the mouse print image with new settings (so basically you only need to save binary mouse print data to also have the mouse print images...).

Binary mouse print data is saved in an SMPD file. It stands for: Sc2gears Mouse Print data. The following section describes the format of the SMPD files.

SMPD (Sc2gears Mouse Print Data) file format specification

The following information is intended for developers.

Specification version:

Date:

Author:

1.1

2013-03-21

András Belicza

SMPD files are binary files due to the large amount of data it stores.

Note: Specification 1.0 was dated 2011-01-14.

Encoded number format: EN

The specification uses a number representation referenced to as EN (Encoded Number). It's a non-fixed-length representation. It can be any number of bytes depending on the value of the number.

The value is read and written byte by byte. The leftmost bit of the byte tells if there are more bytes. If the leftmost bit is 1 => there are more bytes, 0 => no more bytes. The rightmost bit of the first byte is the signum: 1 => the number is negative, 0 => positive. The first byte therefore gives us the 6 lower bits of the number. If there are more bytes, they will give the next 7 higher bits etc.

To sum it up: the number will be stored in bytes. The lowest 6 bits of the absolute value are in the 1st byte, the next 7 bits are in the 2nd byte, the next 7 bits are in the 3rd bytes etc. The highest bits of bytes tells if there are more bytes. The signum bit is the lowest bit of the first byte. Leading zero bits of the number to be encoded does not have to be written out (and it is advised not to in order for a smaller, shorter representation).

Examples:

0 ( 00000000) in EN: 00000000

6 ( 00000110) in EN: 00001100

32 ( 00100000) in EN: 01000000

-6 (-00000110) in EN: 00001101

-32 (-00100000) in EN: 01000001

67 ( 01000011) in EN: 10000110 00000001

-67 (-01000011) in EN: 10000111 00000001

9000 ( 00100011 00101000) in EN: 11010000 10001100 00000001

-9000 (-00100011 00101000) in EN: 11010001 10001100 00000001

File structure

Normal numbers (not EN numbers) with multiple bytes that appear in the file are written from high bytes to low.

The content of the SMPD files:

The mouse samples consists of EN values therefore their length is variable.

Structure and meaning of the first sample:

    • delta time since the Recording start time in milliseconds (most likely 0 or close to it) (EN value)

    • x pixel coordinate of the mouse (EN value)

    • y pixel coordinate of the mouse (EN value)

Structure and meaning of the following samples:

    • delta time since the previous sample in milliseconds (EN value)

    • delta x coordinate since the previous sample (EN value)

    • delta y coordinate since the previous sample (EN value)

Notes

    1. The Header length field might contain a bigger value than the size of the standard fields listed above. This allows the creator of the SMPD file to embed custom data. Sc2gears omits these when reading/loading SMPD files. In these cases the Mouse samples start at a different offset of course (shifted by the number of extra bytes embedded in the header).

    2. The time and delta time values provide millisecond precision but the accuracy might be bigger than 1 millisecond depending on the system clock accuracy; but it is ensured that the sum of delta times will also have the same accuracy (and not worse), delta times are calculated in a way that the error of accuracy is not accumulated.

    3. x and y coordinates might be outside of the screen area on multi-screen systems (can also be negative values).

    4. The delta time of the samples (the time between samples ) will most likely be greater than the mouse sampling time.

    5. Since the samples store only the delta (difference) values, continues mouse movement should result in 3-byte-length samples (1 byte for delta time, 1 for dx, 1 for dy) but if mouse stops for long, the delta time will be probably 3-4 bytes (increasing the size of the sample to about 6 bytes - but at the same time the sample will cover a lot bigger time period)