Y axis scrolling (when to start?)

Hello JGO, I do not know where to ask this but it seemes to go here.

If you 2d platform games, you know that the y axis is not always scrolling. But when you ascend or descend it DOES scroll. Is there any “standard” place on the screen that is usuallaly where the scrolling begins. I always hit a roadblock when i try to figure it out. :-\

I plan to implement this in my game : The Island

Usually there is no explicit scrolling, instead everything is rendered at an offset to keep the player in the center of the screen (at least wrt the y-axis). The offset is simply computed each frame from the player’s position, thus the ‘scrolling’ happens automatically.

I don’t believe that’s quite what the OP is trying to get at. In a platformer, your character, and the base platform, may lie near the bottom the screen, not the centre, and that may have to change as your character starts moving vertically.

I don’t have any experience designing a system like this, and there’s certainly no one answer, but these are some things I’d probably keep in mind:

  • Make sure the view of the camera does not go outside the bounds of where you want the player to see. This provides a solid edge for your camera to clamp to. e.g. clamp bottom of camera to base platform when at the bottom. I’d probably unclamp it once the player moves half way back across the view.

  • Consider the current vector of the players movement. If a player is falling, they will need more view space at the bottom of the screen so they can react to oncoming objects. This is the same for every direction, and possibly proportional with speed.

  • If your player is not at any edges of the playable area, then I’d probably keep him centered, as this gives the player equal visibility in every direction.

  • You could use the camera to guide the player. e.g. if in your level, you have a big vertical hole in the ground that the player must jump in to, you could move the camera so the player is at the top of the screen, and the hole takes up the rest of the screen. This indicates to the player that it’s the only way to go.

Camera damping is something you could do that you may or may not want. Ultimately it’s all about the experience you want to provide in your game. I would guess that players want to see as much as they can in the direction they want to go, so perhaps do your best to cater for that.

Well, if not exactly center, then clamped within a centered range, yes. “Camera on a leash” so to speak.

Short answer: nope.

It’ll be a little (or a lot) different depending on the game. Try it out and play with different settings.

I’m making a verry open ended game so I think I’ll just let the player go where they chose.