Wrap map to create an open world map.

0 favourites
  • 5 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • I use Wrap on my player to create an infinite map. When I reach the end of the map the character approaches the edge and then reaches the beginning of the map (This is normal Wrap behavior) Is it possible to make the beginning of the map appear without me reaching the edge so that it looks like I am walking non-stop?

  • Yes, i've done this before.

    Essentially you need to split the map up into small segments that are larger than the screen, then reposition the segments as the player moves between them.

    Example, imagine your character walks from left to right. You would have 3 segments to the map, 1, 2 and 3.

    The character starts on segment 2, when the player reaches segment 3, segment 1 repositions after 3, so the map now looks like, 2,3,1. etc. When he crosses to 1, segment 2 repositions, so 3,2,1 etc.

    It gets a bit more complicated with all 4 directions, but the concept is the same.

    Also all objects need to be pinned to a segment when it repositions, or else simply position objects on a segment based on that segments relative x,y position.

  • I haven't done it before. But a quick mock-up;

    html5games.info/samples/WrapOpenWorld.c3p

    It still slightly 'jumps' a bit when it wraps.

    But the objects are static and only need to be copied.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Nice ideas but they will make trouble with multiplayer. And I need it for multiplayer.

    Any more ideas?

  • I think my mock-up could work with multiplayer as everything is static. As long as you have one map. But I'm not sure what you want in your game. Or could you explain why it wouldn't work? The wrap behavior works as intended. I think you can also reposition the Player instead of using the wrap behavior.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)