1 decade ago by GlergHendershmidt
Hello,
I'm a JavaScript developer, but new to Impact and to game dev in general. I'm trying to make a top down game where a tank drives around a map. The tank should stay in the center of the screen and the map should scroll. I've looked through the forums and found similar questions, but most seem concerned with a more advanced effect -- allowing the player to move to some degree until it gets near the edge. I've seen the examples that show how to use the camera class, etc. along these lines...
But my question is more basic for me to get started. What is the best way to make a large map and have it scroll while the player is stationary in the center? Do I make a layer in Welmeister that has larger dimensions? If so, how do I get it so that it starts in the middle of the map as opposed to having the top left corner at 0,0. How should I place the player entity? What is the best way to scroll the map? Are there different common approaches and if so what are the pros and cons? If I put collision boxes on the map, will it prevent scrolling of the map when they hit the player in the same way that a moving player would be stopped if it hit a stationary collision box?
Thanks!
Glerg
I'm a JavaScript developer, but new to Impact and to game dev in general. I'm trying to make a top down game where a tank drives around a map. The tank should stay in the center of the screen and the map should scroll. I've looked through the forums and found similar questions, but most seem concerned with a more advanced effect -- allowing the player to move to some degree until it gets near the edge. I've seen the examples that show how to use the camera class, etc. along these lines...
But my question is more basic for me to get started. What is the best way to make a large map and have it scroll while the player is stationary in the center? Do I make a layer in Welmeister that has larger dimensions? If so, how do I get it so that it starts in the middle of the map as opposed to having the top left corner at 0,0. How should I place the player entity? What is the best way to scroll the map? Are there different common approaches and if so what are the pros and cons? If I put collision boxes on the map, will it prevent scrolling of the map when they hit the player in the same way that a moving player would be stopped if it hit a stationary collision box?
Thanks!
Glerg