Skip to content

Viewport should support multiple bounding regions #456

Closed

Description

@parasyte

See: #349 and https://groups.google.com/forum/#!msg/melonjs/T7nOCwaI8vI/VqdsDkp0EhIJ

Multiple bounding regions will allow customized map scrolling mechanics found in games like Megaman, and Legend of Zelda: A Link to the Past. Where a map's scrolling will be "locked" into some region until the followed entity leaves the viewport.

Activity

  1. Warpten commented on Mar 11, 2014

    @Warpten
    Contributor

    Another example would be Metroid Zero Mission (which I have been working on a few months ago, until it turned into vapor, but anyway). My idea at the time about this was to add viewport areas to the tmx level info, but I had no idea how to do that with Tiled at the time, and not even how to do it inside MelonJS.

    Also, In some games, viewport boundaries cross each other: so I believe that if you enter in a new viewport area, you should not clog the viewport into this boundary if you are already in another viewport boundary. A perfect example for that is metroid zero mission:

    (Notice the gray lines; those are the viewport boundaries)

    Another interesting technique used in MZM is that destroying some blocks expand the viewport, typically revealing secret areas. That would be interesting to implement as well.

    There are also places in games where viewport boundaris do not cross over each other; typically the game will smoothly transition from a viewport to another.

    If by april nobody has done it i would be more than glad to work on that (I currently cannot work much; even my chess engine is sporadically programmed)

  2. added this to the milestone on Jul 28, 2014
  3. modified the milestones: , on Oct 14, 2014
  4. parasyte commented on Feb 18, 2015

    @parasyte
    CollaboratorAuthor

    I was playing with an idea for this late last night involving collision shapes to define how the viewport is allowed to scroll. For cases where hidden areas of a map may be revealed by the player entity moving into the area, the collision shape can simply be removed, allowing the viewport to continue scrolling into the hidden area.

    This is not a high priority feature, but there's an idea that we might use (or not) later.

  5. locked and limited conversation to collaborators on Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions