Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Infinite 2D tile base world

Hey, I am just messing around with unity and trying to make a game and I can't seem to figure out how I could make a 2D infinite world. I current have an object that spawns individual tiles of the terrain so that it will fill the view port of the main camera which works fine; however, when I reach the end of the generated tiles then it just stops. I thought that you could do it by using the movement of the player and if the player moves up by one tile then it removes the tiles that were previously displayed and add them to the top of the camera but then if the player went back then it wouldn't be generated the same, that would work with a single terrain tile but when I start adding new terrains i'm guessing it wouldn't work.

So I was just wondering if anyone here had any ideas on how this could be done effectively?

Thanks for any responses :)
His approach seems quite good : http://alexstv.com/index.php/

Here is a more conventional approach http://code-phi.com/infinite-terrain-gen...-unity-3d/

Unsure what will suits you the most.
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by OneHalfFeb 2, 2018 03:36 PM 21 893 Feb 2, 2018 03:36 PM
Last Post: CAFEEFAC
[C#] by vitaminicMay 10, 2015 03:08 PM 4 260 May 10, 2015 03:08 PM
Last Post: vitaminic
[Java] by DuncanrpMay 26, 2014 05:34 PM 4 184 May 26, 2014 05:34 PM
Last Post: Duncanrp