somethings wrong with sprcoll

Previous topic - Next topic

WAAAAAA

spr coll is not accurate a bullet is going straight thru my enemy but hits right next to it.... and its a pain in the ass trying to make it look right...

mikiex

Are you very sure that your bullets are not just moving too fast?
Good idea to post a code snippet of it failing

BumbleBee

Hello WAAAAAA

Do you really need pixelcollision for your shooter game?
Use boxcollision (BOXCOLL). It's not so accurate but much faster than pixelcollision.
If you don't make a slow motion shooter.:) you don't need pixelcollision.
Cause you can't see collisions between bullet and enimies. It's just too fast.


Cheers
The day will come...

CPU Intel(R) Core(TM) i5-3570k, 3.4GHz, AMD Radeon 7800 , 8 GB RAM, Windows 10 Home 64Bit

WAAAAAA

boxcolli is boxcoli.... i want pixel based damnit :P
bah i made it look half decent....

bigsofty

Is your code...

move sprites
check collisions
screen swap

if it is then whats colliding on the screen will allways be a frame behind whats actually on the screen

check collisions
move sprites
screen swap

to fix.

Ian
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

WAAAAAA

my sprites dont set off spr colli like your sample program in the help mine are going off over to the left to far why is that?

Kitty Hello

Hard to tell from distance. Please post some code that compiles or send me the whole thing as email. We should get an attachment mod for this forum...