I need help understanding somthing

I want to make a game were the user can go back and forth between diffrent places but Im not sure how I go about doing that because If I want my character to go to one place, im not sure how to then get the character back to the same place they was.

That's a really vague question and depends entirely on what you're doing. Is the game tile/grid-based or are the coordinates just floating or double points? What framework or library are you using?

If you have it that you press D to go right, why exactly can't you simply press A to go left, back to where you were?

If it's grid based, you would simply increment the tile position when the user goes a direction, ex, if the player is at [0][0] (or just [0] if 1D array), and goes right, they'll now be at [0][1]. Then they can go left again back to [0][0].
Last edited on
Topic archived. No new replies allowed.