Search Unity

Looking for advice on how to build an open world 2d game

Discussion in 'World Building' started by Thimble2600, May 15, 2019.

  1. Thimble2600


    Nov 27, 2015
    I've been working on an open world RPG for quite a long time now.

    The game is online and uses a socket network server.
    On launching the server the player can create a new world or load an existing one.
    When creating a new world it randomly populates tiles with vegetation and wildlife depending on the tile type or biome. Tile types are determined by the height of the tile output from the perlin noise.

    When the player connects they're then given the seed to build the world. If they're a new character their position is randomly placed within the world boarder. As they build the world (and during login) they're given a batch of local entities and modified terrain (trees/wildlife).


    I kept running in to FPS problems when loading chunks, and subsequent framerate issues.

    Screenshot of testing non-isometric Chunk Loading

    The game used RuleTiles so that terrain tile could have a single value representing the tile type and it'd blend in with adjacent tiles. Before the game used RuleTiles it used regular TileBases and ran much smoother.

    My PC doesn't have a graphics card so that might've impacted the framerate, but it could just be a processing problem. I'm not utilizing any special HD features, graphics settings are all set to disabled or lowest available.

    Anyway, I started over last week. This time the game doesn't load chunks, and instead loads tiles every step taken. It copies tiles using GetTilesBlock and pastes using SetTilesBlock.
    The camera is locked to the player character and when it moves a tile the character snaps back to the center tile and all the tiles shifts one tile in the opposite direction to smoothly simulate movement. And this worked really well until changing to RuleTiles.

    using ruletiles

    Now the game drops from 60FPS to 40 every time the player walks.

    But anyway, I'm really rather baffled and was wondering if anyone could recommend or even describe a good system for building a 2d open world.
    Last edited: May 15, 2019