x


Possible Infinite Terrain Plane?

Hello everyone, i have a quick question for everyone! As i have been working a a huge game world i thought wouldn't it just be easier to have an infinite terrain plane i could just work on, so the question i ask is, is it possible to make an infinite terrain plane through scripting? Answers are greatly appreciated.

more ▼

asked Jan 02 '10 at 09:19 AM

Will gravatar image

Will
408 8 10 19

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Yes. With a treadmill. This is what you need:

  • A set of Terrains of equal dimensions. One you're standing on and a few more around that - arranged in a grid.
  • Make sure that your far clip plain limits the camera vision so that its not possible to see more than one terrain length.
  • When you move from one grid cell to another (you should implement some slack here - rather than a strict boundary which would result in flickering back and forth between grid configurations), you rearrange the position of the grid cells to make sure that you're now again position on the centred cell.
  • Whenever you (re)configure your grid, you should update Terrain.SetNeighbors to match. This ensures that the terrains seamlessly match up.
more ▼

answered Jan 05 '10 at 12:12 PM

AngryAnt gravatar image

AngryAnt ♦♦
4k 14 19 52

My friend, you have truly saved me, i thank you :D

Jan 05 '10 at 01:44 PM Will

Hello! Is there some examples of such treadmill script? How does it work in the editor? Do you display all the tiles without the treadmill algorithm?

Jan 15 '11 at 02:25 AM BigBulle

Will such a 'treadmill' concept work in a Multiplayer space-game with movement possible in all directions on any axis?

In your scenario, it sounds as though you're describing forward/back/left/right movement .... can treadmills go one more step into true 3D movement (i.e: outer space)? And if so, can this concept work within a multiplayer conetext ?

Mar 19 '11 at 05:14 AM user-9770 (google)

3D is perfectly feasible. The concept operates on a grid - that could just a well be a 3D grid. Multiplayer has no impact on the idea as it is a client side visualization setup.

Mar 30 '11 at 01:42 PM AngryAnt ♦♦
(comments are locked)
10|3000 characters needed characters left

Based on the recommendations above I have implemented a very simple script to do the "treadmill" infinite terrain. Attach this script to a terrain and it will repeat that terrain in a 3x3 grid, with the original terrain in the middle. Drag and drop the player game object onto the PlayerObject property of the script. As the PlayerObject moves onto a new grid cell (terrain), this new terrain will become the middle cell and the terrain copies will be cycled around so that the new middle cell is again completely surrounded by terrain copies. For my purposes I simply needed a completely flat terrain (never-ending floor), but if that is not what you need, the terrain needs to be tilable, ie the left must match up with the right and the top must match up with the bottom.

Hope this helps someone. :)

link text

more ▼

answered Jul 18 '12 at 02:22 PM

Looney Lizard gravatar image

Looney Lizard
1

(comments are locked)
10|3000 characters needed characters left

no, but you can make a really large one. Go to Terrain->Resolution, and set the resolution to like 12000 (i dunno max resolution) in both width and length. You will, however, need to take into consideration, that your PC WILL lag when doing so. and you should NEVER build a game with a terrain that large. If you going to be making an MMO, like WoW, with multiple zones, you should to Application.LoadLevelAdditive or something like that, look it up in the script reference, and make all your zones with different levels. I do not know how this works, since i have never tried it, but yah.

more ▼

answered Jan 02 '10 at 04:05 PM

m50 gravatar image

m50
76 2 3 5

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5060
x1467

asked: Jan 02 '10 at 09:19 AM

Seen: 4129 times

Last Updated: Jul 18 '12 at 02:22 PM