Work in Progress



Tinycloud778 2019-12-07 22:02

I have a little trouble with collisions but it’s a game where you dodge bullets for a long time

Block-Beat.nx | Open in app
2019-12-07 22:02

was8bit 2019-12-08 05:48 (Edited)

Fixed your collision issues...

1) be sure to update position FIRST, then show on screen SECOND... you were showing your player first, then updated, and then checking.... this means it was NOT checking what you are currently seeing, but the secret updated position.... ;)

2) lowres can be funny about decimal values when placing things, it might place it rounded up or rounded down... and also when comparing decimal values they will NEVER quite be equal... i did a shorthand fix, rather than wrapping each value with INT(value) i did value\1 which does the same thing without extra typing...

Keeping the decimals is important as you adjust the values, but add \1 on each value when displaying them or checking for collisions :)

Tinycloud778 2019-12-08 17:24

Ok thanks

was8bit 2019-12-08 18:05


Timo 2019-12-08 18:12

But INT(x) has better performance than x\1... and it’s more readable for other programmers.

was8bit 2019-12-08 18:44 (Edited)

Ah... thanks for the technical tip :)

was8bit 2019-12-08 18:46

@tinycloud, i came up with a pacman version ;)

Tinycloud778 2019-12-08 20:11


was8bit 2019-12-09 00:02

Feel free to use it if I like... or if not I can post as a remix of yours :)

Log in to reply.