x


Map Generator script ?

Hi,

I'm currently thinking about creating a map generator. And I'd like to know a way to store terrain + gameobjects as one entity.

I've seen I can't add terrain to prefab. I thought about a script that would take gameobjects AND terrain to rely them "manually" but I hope there is an optimized way to work this out =D

Regards, Sladix.

PS: I found how to generate a map =D

more ▼

asked Feb 03 '11 at 10:08 PM

GeekURLant gravatar image

GeekURLant
34 7 7 13

PS: I found how to generate a map

How?)

Aug 14 '11 at 10:57 AM Acrossfy

This is why @Sladix should have answered her own question.

Aug 14 '11 at 12:34 PM Waz

And This should be a comment

Aug 16 '11 at 11:23 AM Bunny83
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The basic idea is to create some "blocks" with objects and attach to them a "block" script which contain basic informations such as if it's a border, a spawn block and so on ... And then you define a grid based on you blocks size and create a function that will look for the good blocks that can be placed, depending on position on the grid.

So the block searching function ends with an array containing ids of blocks that can be placed.

This is only my first attempt but it work well at this point. I'll surely look for an optimized solution as the blocks are still quit big and contain too much details...

more ▼

answered Aug 16 '11 at 09:47 AM

GeekURLant gravatar image

GeekURLant
34 7 7 13

(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:

x3318
x1467
x1252
x38

asked: Feb 03 '11 at 10:08 PM

Seen: 1831 times

Last Updated: Aug 16 '11 at 11:24 AM