Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Given a map created with procedural generation algorithms, should the server transmit the seed used to generate this map (so client must contain the same algorithm) or maybe send all the information?.

I'm inclined to send the seed, i have in mind generating big maps. Right now, i have one seed to generate multiples seeds, and each one is used to generate a chunk, so this last seed would be transmited to each client everytime someone needs information about a new chunk.

share|improve this question
    
You could send the seed - and that would work if your maps were deterministic and had no dynamic, changing content. However, if you could change chunks (players) then this wouldn't neccessairly work. –  Vaughan Hilts Jan 7 '13 at 20:32

1 Answer 1

This would work just fine for the initial generation of the maps. If the generation algorithm is using a deterministic approach for generating the chunks, you will get the same chunk every time. This means you can't create any random generators on the clients them selves unless you're using the seed from the server as the seed for the random generator.

This can be demonstrated in Minecraft with the world generation seeds shared among its users. If someone finds a map they like, they can share the world generation seed with others and Minecraft will generate the exact same map.

Obviously you'll need to send the clients any changes that are made after the initial generation. Since those could not be predicted by the generation algorithms. In that case it would be far better to transmit the map instead. You can try to only submit the changes, but it may more complex and could be more time consuming to find what has changed and send the changes than to just send the entire map.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.