Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411587 Posts in 69386 Topics- by 58445 Members - Latest Member: Mansreign

May 06, 2024, 07:51:27 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)how in the world do random seeds work
Pages: 1 [2]
Print
Author Topic: how in the world do random seeds work  (Read 14872 times)
brog
Level 7
**



View Profile WWW
« Reply #20 on: October 22, 2008, 12:33:18 PM »

"Procedurally generated" just means made by a program.  People sometimes are throwing about the words like it's some kind of special magic, but it's not.  All it means is that you write a program to make something for you.

How you go about generating a world really depends on what you want the world to be like.  What features does it have?  How do you want them to be arranged?  What do you even mean by a "world"?  There's no one way of doing it, it completely depends on what you want.  You can go all Dwarf Fortress on it and try to simulate the formation of a world by natural processes like erosion, but this is difficult.

A general procedure for random generation is just:
- select something to place
- select random coordinates
- create it there

The "something" could be an enemy, a room or corridor, an item, whatever.
You can make this less random by doing things like placing a group of monsters together at once rather than placing them individually, or rejecting coordinates if they don't make sense.

But we'll be able to help much better if you explain what type of "world" you want to generate.
Logged
synapse
Level 1
*



View Profile
« Reply #21 on: October 22, 2008, 12:41:38 PM »

Good point.

Right now, your question is something like "I want to write an algorithm- what should I do?"
Logged
muku
Level 10
*****


View Profile
« Reply #22 on: October 22, 2008, 12:43:52 PM »

Here are two articles about how one could go about dungeon generation for a roguelike:

http://jice.nospam.googlepages.com/basicdungeongeneration
http://jice.nospam.googlepages.com/dungeonmorphing
Logged
medieval
Guest
« Reply #23 on: October 23, 2008, 03:45:10 AM »

Good point.

Right now, your question is something like "I want to write an algorithm- what should I do?"
Yeah, I guess. Sorry for not explaining it all clearly from the first time.

EDIT: hold on though; It's not for making the random seed itself work, it's just for generating the map.
« Last Edit: October 23, 2008, 03:49:21 AM by Medieval » Logged
diwil
Level 2
**


View Profile WWW
« Reply #24 on: October 23, 2008, 03:48:36 AM »

I use Mersenne Twister in my applications. It's a little costly, but I intend to implement it in ASM code later on.
Logged
medieval
Guest
« Reply #25 on: October 23, 2008, 03:51:49 AM »

Actually, you know what? Screw the random stuff for now. I'll be doing without for now. It's making my head spin.
Logged
Μarkham
Level 10
*****



View Profile WWW
« Reply #26 on: November 12, 2008, 11:41:14 AM »

It should also be noted that the "Room Full of 'Nerds'" random number generator is highly inefficient due to the fact that it is extremely biased towards the number 42.
Logged

diwil
Level 2
**


View Profile WWW
« Reply #27 on: November 13, 2008, 11:24:42 AM »

Code:
function rand() {
    return 4; // completely random, as proven by rolling a dice
}

There. It's all done!
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic