09-18-2003, 07:01 PM
I'm doing a pacman game now. i'm design the map by string chars
like lv(1)="0000011100"
lv(2)="0000010000"
number 1 is the wall and number 0 is empty blank where I can move pacman...since I did the game by graphics (from strings to graphics [line/put]) I had a problam.. block size is 30*30
and pacman size is also 30*30.. so moving steps is X=X+30
and using mid$(lv(X),Y,1)="1" is detect the the wall and that works fine.. but I want is X=X+5 steps (means lower steps) so the wall collision will still work correctlly.. how to do that.. what is the formula for lower steps using strings acording to graphics with wall collision in my case (I seen there is some DIVISION/MOD options or something like that.. or maybe there is something else)?
like lv(1)="0000011100"
lv(2)="0000010000"
number 1 is the wall and number 0 is empty blank where I can move pacman...since I did the game by graphics (from strings to graphics [line/put]) I had a problam.. block size is 30*30
and pacman size is also 30*30.. so moving steps is X=X+30
and using mid$(lv(X),Y,1)="1" is detect the the wall and that works fine.. but I want is X=X+5 steps (means lower steps) so the wall collision will still work correctlly.. how to do that.. what is the formula for lower steps using strings acording to graphics with wall collision in my case (I seen there is some DIVISION/MOD options or something like that.. or maybe there is something else)?