Tags : :
Well, I got curious about how demo data is generated and after an hour and half or so, I came up with this:
Demo data is generated by putting the previous frame's data through an equation to obtain the new frame's data. Every 7 frames the data is seperated with a | and the equation resets.
Example:
6:2236962
7:35791394|0
8:35791394|2
So here are the formulas:
Variables
a-1 to 7. Goes up one every frame. After it reaches 7, next frame it resets to 1.
b-The data of the previous frame.
Formulas
Neutral: Nothing happens to data, just adds 1 to the frame count.
Left: 16^(a-1)+b
Right: 2*16^(a-1)+b
Left Jump: 16(b-8)+13
Right Jump: 16(b-8)+14
Here's an eaxmple: If someone presses left, left, left, left jump, right, right, right, right jump, neutral, neutral, it would look like this:
1:1
2:17
3:273
4:53521
5:184593
6:2281745
7:35836177|0
8:35836177|14
9:35836177|14
10:35836177|14
Hope this is useful and please let me know if any of this is wrong.
Demo data is generated by putting the previous frame's data through an equation to obtain the new frame's data. Every 7 frames the data is seperated with a | and the equation resets.
Example:
6:2236962
7:35791394|0
8:35791394|2
So here are the formulas:
Variables
a-1 to 7. Goes up one every frame. After it reaches 7, next frame it resets to 1.
b-The data of the previous frame.
Formulas
Neutral: Nothing happens to data, just adds 1 to the frame count.
Left: 16^(a-1)+b
Right: 2*16^(a-1)+b
Left Jump: 16(b-8)+13
Right Jump: 16(b-8)+14
Here's an eaxmple: If someone presses left, left, left, left jump, right, right, right, right jump, neutral, neutral, it would look like this:
1:1
2:17
3:273
4:53521
5:184593
6:2281745
7:35836177|0
8:35836177|14
9:35836177|14
10:35836177|14
Hope this is useful and please let me know if any of this is wrong.
