tile-based collisions

Blitz3D Forums/Blitz3D Programming/tile-based collisions

K(Posted 2012) [#1]
This is going to be the underlying basis for a complicated project.
Typed up in about twenty minutes, so, not well commented, just curious if a few could run the code and maybe provide insights on why diagonal moving fails...

(CONTROLS:
LEFT/RIGHT... Turn.
UP ARROW... Move forward.
)



Last edited 2012


K(Posted 2012) [#2]
Nevermind I fiexed it. Completely logical.


Kryzon(Posted 2012) [#3]
Good job!


K(Posted 2012) [#4]
Thanks.For anyone interested, the fix...
Issue was a procedural error in UpdatePlayer() func, namely
p\XX=MOVEHX()
p\YY=MOVEHY()
seems logical except that MOVEHY takes p\XX
as a param, which had bean changed by MOVEHX(). Pretty
dumb of me. Oh, well...


(Added shoot with spacebar)


Last edited 2012