chrome bugfix


i fixed the weird chrome issue so now the same seed should generate the exact same shape in all browsers!

i still don't know exactly what the issue was, but my suspicion is that chrome either had less or more precise javascript number code, which meant that under certain circumstances different segments would get different hits, even though they're all symmetrical and the hits should be identical in all cases. the fix was to slightly loosen some of the corner detection code and also to only do a single segment's collision and then just copy the collisions to all the other segments to ensure that all the hits are always symmetrical.

for those of you interested in the nightmare of numerical code in javascript, this is a neat post made by somebody else that digs into how difficult handling "is this point to the left or right of this line" is in javascript

Files

star.zip Play in browser
Nov 08, 2019

Leave a comment

Log in with itch.io to leave a comment.