Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

I don't like the camera

onpon4
2012-03-05
2012-12-08
  • quanta
    quanta
    2012-10-25

    Adjustable camera. This solution has been around since Super Mario World. However in this game user is able to save multiple camera settings that can be used later, complete with preview of individual settings.

    Don't normally move the camera while moving, but if you've moved a certain amount in one direction, move the camera in the same direction as you're moving so you can see more of what's in front of you. When you stop, center the camera. (Pretty complicated, but ideal if done right)

    I am not certain how does moving the camera in the same direction as player's ship is moving will allow seeing more items ahead. On the other hand, moving player's ship's location away from screen centre in direction opposite of the ship's momentum relative to the map does. For example, moving left will place the ship at the right side of the screen.

    Anyway, the idea of look-ahead camera will come in several parameters:
    1. initial shift delay. This determines how much the ship moves in relative to the map before shifting ship's relative to screen location.
    2. maximum on-screen shift. This determines the maximum distance the ship moves away from the centre of screen.
    3. Upshift rate. This determines how much the ship sprite moves away from the centre of screen as the ship accelerates in a given direction.
    4. Downshift rate. This determines how much the ship sprite moves back to the centre of screen as the ship decelerates in a given direction.

    A copy of all above parameters is available per axis, so a 2-D game will have 2 sets of parameters. Each camera profile includes all axes parameters needed to fully configure a camera view. In the case of fixed camera, the maximum on-screen shift becomes 0 for all axes.

     
    • Guus Sliepen
      Guus Sliepen
      2012-12-08

      I don't think we need to make all these parameters configurable,
      a switch between look-ahead or look-behind behaviour should be enough.

      It seems MODmurky's version has a different approach: add markers on the edge of the screen which indicate where enemies are. I can port that feature.