Maxdamantus / recplay

Elasto Mania level/replay interpreter/renderer in JS/canvas; used on https://elma.online/
https://maxdamantus.github.io/recplay/
8 stars 4 forks source link

problem reading corrupt rec #2

Open RobinManoli opened 4 years ago

RobinManoli commented 4 years ago

The rec works although weird in elma:

https://elma.online/r/pgwpxoo7gk

Uncaught Error: out of range: 1609604747 at Object.seek (index.js:385) at M (index.js:3405) at M (index.js:3479) at M (index.js:3479) at b.a (index.js:3396) at index.js:3126 at XMLHttpRequest.p.onreadystatechange (index.js:3496)

RobinManoli commented 4 years ago

skintToday at 9:26 PM Invalid event type value=111 at event offset=16 export enum EventType { Touch = 0, Ground = 1, Apple = 4, Turn = 5, VoltRight = 6, VoltLeft = 7, } so litel weird suddenly get 111 there

Maxdamantus commented 4 years ago

Was only able to look at this for a few minutes before leaving for work, but it looks like the bike/leftwheel/rightwheel positions are sensible but other things are crazy, so maybe there are some bytes added/removed in the parts of the rec that come between the rightwheel and turn segments.

Anyway, I guess I can add some basic error handling so it at least plays what is readable. At the moment it fails because it keeps thinking there are more replays at the end of the file. Haven't played it in Elma to see if it's an actual multi or not.

RobinManoli commented 4 years ago

okay, it seems to play normally when reading through elmadev python, but looks crazy indeed in elma