Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pacman larger wall collision
#1
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)?
Reply
#2
*runs in*
*stabs IS*
*runs out*
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
???
Reply
#4
making a tile x tile pac-man is gonna be ghey, and you should use pixel collision, check the color of the wall - if it's blue you stop, if it's black you move, if it's yellow you eat, and pink/red/etc you die.
ammit potato!
Reply
#5
tile-based collision would be fine if you used p*p movement. another thing you could do is have sub-tile collision, have a mask for each tile with only black and white, testing by color only in the tile pac's on.

Tile by tile movement is fine if that's what you can pull off. We advance in steps, or soemthing like that.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)