Open ElectreAAS opened 2 months ago
Intended behaviour (with boxes drawn from 0 to 9 in sdl)
The same code in js
Not pictured is the 0 to 10 behaviour in js as it is the same as the first one, it works like intended.
Lastly, 0 to 10 behaviour in sdl with overlaps:
I could pass off the grid lines in the ghost blocks as stylistic choices, but you can also notice a weird overlap between the J block (dark blue) and the yellow square on the right (not the ghost one)
Plz fix
I think this is related to the fact that JS uses float, and sdl ints. As gamelle made the choice of using floats, we should modify our sdl overlay to fit the JS behaviour and not the opposite.
In native mode (or sdl if I understand correctly),
Box.fill .. (Box.v (Size.v 0.0 0.0) (Size.v 10.0 10.0))
will draw a box spanning pixels 0 to 10 included. If you do not want overlap between boxes, you then replace the 10s with 9s. However, in js mode, the code with 9s will leave blank pixels in between each box. See pictures for clarification.