Hi mates,
I got a question regarding collision. I don't know if you guys know the old Tunneler game (http://www.youtube.com/watch?v=7J3q9nC69g0)? What I need is piece of code that does the collision for me, between the tank and the sand.
What I tried is making blocks which go down when you run forwards to them, it worked but I only could make like a hundred objects but wanted to make like 10,000 objects.
counter = 1000
for x = 0 to 10
for z = 0 to 10
make object box counter,blokbreed,100,bloklang
position object counter,blokbreed * x,0,bloklang * z
texture object counter,3
counter = counter + 1
NEXT
NEXT
Second thing I tried is working with the bitmap. I'll copied the bitmap to the screen and I'll pasted the sprite over it when I stumbled on a camera issue that I couldn't solve.
paste sprite 1,0,0
do
set current bitmap 0
rem print RGBR(POINT(SPRITE X(2),SPRITE Y(2)))
if RGBR(POINT(SPRITE X(2),SPRITE Y(2))) < 0
paste sprite 2,SPRITE X(2),SPRITE Y(2)
endif
if keystate(17) = 1
move sprite 2,1
ENDIF
if keystate(30) = 1
rotate sprite 2,-90
move sprite 2,1
rotate sprite 2,0
ENDIF
if keystate(31) = 1
rotate sprite 2,-180
move sprite 2,1
rotate sprite 2,0
ENDIF
if keystate(32) = 1
rotate sprite 2,-270
move sprite 2,1
rotate sprite 2,0
ENDIf
create bitmap 1,1,1
sync
LOOP
So, in a nutshell, I need a solution for the removing of the sand when the tank hits the sand. I hope my explaining was clear.
Hope to hear from anybody!