Sign in to follow this  
coletastic555

how to make a game with randomly genarating map

Recommended Posts

alvaro    21246
If you don't give us any details of your project, we can't do better than Google. Speaking of which, have you tried Google? What did you think of the information you found? How is it lacking? Perhaps you can put together a much better question after you have done some research.

Share this post


Link to post
Share on other sites
rip-off    10976
What kind of game are you talking about? Randomly generating a solar system for a space game is going to be different from generating a forest for a hunting game, a city for a commercial game or a tile based continent for a large RPG.

Share this post


Link to post
Share on other sites
Solid_Spy    708
Your question isn't very detailed, but if you wan't to create random "anything", you would use a random function for whatever language. The documentation for the language you are using should tell you what function to use. (look for stuff that says "rand" or "Math::Random") Really it's more about experimenting and figuring out how to randomly "grow" your environments by creating objects in random locations and having other objects generate from them randomly.

Share this post


Link to post
Share on other sites
darkhaven3    160
If you want to be lazy, and if you're using a language like C or C++, you could use rand() or an equivalent if you really wanted, but that's not a particularly robust way to do it. One [i]possible[/i] way I've found is to use pseudo-random number generation and just iterate through a fixed-size array that way, but you may or may not need that kind of implementation depending on your uses. Good part about that kind of thing is that it's blazing fast, and it's virtually random as far as the user cares since you're not revealing the deterministic logic to them directly. Edited by darkhaven3

Share this post


Link to post
Share on other sites
C0lumbo    4411
Perlin noise is often very useful for generating levels, although there isn't enough detail of the problem to know whether it's applicable to you. Regardless, it's worth learning about if you're doing randomised procedural generation of pretty much anything.

Share this post


Link to post
Share on other sites
BeerNutts    4400
[quote name='darkhaven3' timestamp='1355918117' post='5012406']
If you want to be lazy, and if you're using a language like C or C++, you could use rand() or an equivalent if you really wanted, but that's not a particularly robust way to do it. One [i]possible[/i] way I've found is to use pseudo-random number generation and just iterate through a fixed-size array that way, but you may or may not need that kind of implementation depending on your uses. Good part about that kind of thing is that it's blazing fast, and it's virtually random as far as the user cares since you're not revealing the deterministic logic to them directly.
[/quote]

FWIW, rand() is a pseudo-random number generator. When used with the same seed, it will generate the same random numbers over and over. However, in saying that, I still don't think your post makes any sense at all and doesn't cover how to create a random world at all.

Share this post


Link to post
Share on other sites
frob    44908
Closing. I think we've set a new record with seven sequential requests for more information, but nothing added.

@coletastic, feel free to start another thread with a more detailed question.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this