Jump to content

  • Log In with Google      Sign In   
  • Create Account


how to make a game with randomly genarating map


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • This topic is locked This topic is locked
9 replies to this topic

#1 coletastic555   Members   -  Reputation: 94

Like
-2Likes
Like

Posted 16 December 2012 - 08:15 AM

i need help to code in a randomly genarting map please help

Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 11850

Like
0Likes
Like

Posted 16 December 2012 - 08:19 AM

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.

#3 rip-off   Moderators   -  Reputation: 7641

Like
0Likes
Like

Posted 16 December 2012 - 08:32 AM

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.

#4 GeniusPooh   Members   -  Reputation: 157

Like
0Likes
Like

Posted 18 December 2012 - 12:34 AM

Hmmm

like diablo?

mostly people use block to matching each others..

^^ but I need more detail

Beauty is only skin deep , ugly goes to bones

 

World's only 3D engine tunner and 3D engine guru.

 

and real genius inventor :) but very kind warm heart .. and having serious depression for suffering in Korea

 

www.polygonart.co.kr ( currently out dated and only Korean will change to English and new stuff when I get better condition :) sorry for that)


#5 Solid_Spy   Members   -  Reputation: 389

Like
0Likes
Like

Posted 19 December 2012 - 01:01 AM

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.

#6 darkhaven3   Members   -  Reputation: 160

Like
0Likes
Like

Posted 19 December 2012 - 05:55 AM

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 possible 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, 19 December 2012 - 05:55 AM.


#7 C0lumbo   Crossbones+   -  Reputation: 2115

Like
1Likes
Like

Posted 19 December 2012 - 09:50 AM

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.

#8 BeerNutts   Crossbones+   -  Reputation: 2550

Like
1Likes
Like

Posted 19 December 2012 - 12:45 PM

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 possible 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.


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.
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#9 darkhaven3   Members   -  Reputation: 160

Like
0Likes
Like

Posted 19 December 2012 - 12:52 PM

... And thus, a misconception I've had for years about what rand() is doing was today blasted out of my mind. Wow.

#10 frob   Moderators   -  Reputation: 18823

Like
0Likes
Like

Posted 19 December 2012 - 01:18 PM

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.
Check out my personal indie blog at bryanwagstaff.com.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS