Thread: Canvas Problem
View Single Post
Old 12-05-2012, 11:16 PM   PM User | #49
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Quote:
Originally Posted by pdiddles03 View Post
So ok, let's say I have my map all written out and generated.

Next, i put my character on top, how would I go about clearing just the character when I move him, and not the map?
Well, the obvious answer is to *NOT* change the map, *AT ALL*.

Instead, just make your character *SEPARATE* from the map, with a z-index higher than the map, so he ends up appearing in front of the map.

But what is the big deal about swapping the character image for one of the map images and then, when he moves, swapping the map image back in???

That's trivial, though it won't look as good as having the character as a separate image (a ".png" or ".gif" image, with transparencey!) that moves smoothly from one square to the next instead of having the ugly double replacement.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote