How does the physics engine get tested for MakeCode Arcade?
I was writing some demo code and realised I can test it to some extent with the win/lose mechanism acting as a pass/fail. If the MakeCode Arcade simulator has a “headless mode” then that could be used for testing?
That’s the from beta beta (
0.14.4 5.17.29). The PyGamer and Meowbit both pass too and seem to vary less the simulator does.
The production beta (
0.12.17 5.17.29) is both weird and amusing in its behaviour but still passes. Dropping the countdown from
5.55 seconds makes this fail which seems deserved to me.
The code (this has in it a workaround for the double event mentioned in Wall collisions and sprite vy - that workaround could be disabled to test a fix):
That test can also be run with some different
vx starting values to generate tests which are expected to fail.