> I see. Well, you have two options here: you can either have a
> background map, which you draw from your tiles and keep around for
> whenever you need to erase; or you can erase by simply drawing the
> tiles to the appropriate areas. But that can be a bit tricky.
> Keeping a background map is a fine solution, but you're still just
> double-buffering (the background map doesn't count, in my book
> anyway).
Ahh.. I think that's what I'm doing. I guess I should call Buffer2
"BackgroundMap" or something like that. It's working(or seems to be)
and wasn't to difficult. So I'll go with it.
> >Humm well I basically say , hey Map give me the TileID at this
> >location in layer 3. Then if its a tile that is a bush, wall, etc..
> >I shouldn't go past it.
>
> I see that your code is accounting for a player being larger than a
> single pixel, too (i.e. checking y-6 when moving up, and y+32 when
> moving down). This seems OK to me. The devil must be in the
> details -- for example, if your character is 32 pixels high, then when
> moving down you should probably be checking y+32+6 rather than just
y+32.
I really don't know any other way of checking. I thought it
has something to do with the player's width and height.
Ah, when moving up I had to add -6 because using just .y the player
would walk
up to a wall, bush(object) what ever and I wouldn't be able to turn left
or right.
I had to backdown a bit then I could turn left or right. Adding -6 lets
me
get close to an "object" and still be able to move left or right.
I did try -32 but the player would stop too far away from an "object".
Now moving down I added the +6 but the player stops a bit too soon
from an "object". +32 seems about right, though I could be wrong.
I still have the problem with the player being able to walk through
the middle of an object, in some cases. This only seems to happen
when the player is gong left or right, in certain spots.
________________________________________________________________
Juno Platinum $9.95. Juno SpeedBand $14.95.
Sign up for Juno Today at http://www.juno.com!
Look for special offers at Best Buy stores.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|