kristos
05-01-2009, 04:16 PM
I'm making a game with a hero walking up, down, left and right. When I move the hero, the gamemap moves, and the hero is centered to the gamemap, so he always stays in the middle of the stage. Around the gamemap, I have a Rectangle, that should define the borders of the area where the hero can move. For some reason, when the hero starts moving upwards, at some point he gets thrown back into the beginning, so that it's impossible to reach the end of the gamemap. When you start moving the hero back up and go back to where this happened, you'll find another copy of the hero, and also this time it's possible to walk all the way to the top of the gamemap. I'm guessing this is maybe something to do with the positioning of the Rectangle containing the gamemap. How should it be positioned in relation to game area and its registration point?
I don't seem to be able to figure this out by myself, so I'm looking very much forward to your reply.
I don't seem to be able to figure this out by myself, so I'm looking very much forward to your reply.