Rogue Random Dungeon Map Maker (Source Included)

BlitzMax Forums/BlitzMax Programming/Rogue Random Dungeon Map Maker (Source Included)

dw817(Posted 2016) [#1]
While there are many RPG Makers out there, few have the ability to actually create a perfectly random dungeon, instead requiring the Worldbuilder to use a map editor and manually design their own.

Looking at the computer generated maps from ROGUE it is clear that perfectly random dungeons can be created with a bit of thinking and coding.



Now while most ROGUE maps have twisty corridors and only 9-rooms per map (3x3), I did not like that so in this map maker - I wrote it so it shortens the length to just a single connecting doorknob between rooms thus giving you many more rooms to explore per staircase level.



What is especially interesting is unlike other future variations of ROGUE which have more than 9 rooms per level, some of these rooms cannot be reached without teleportation or digging through solid walls. However, my map maker GUARANTEES all rooms can be reached every time no matter what size they are, where they appear, how they are randomly arranged, or even where you randomly appear in them.

The screen size is 1024x768, full screen size for me anyways, and the map size is 31x23 tiles, a very close match to 32x32 pixels, a good size for walls, critters, and player sprites to engage in.

And yes, I do plan to make use of this code in my future projects.

Enjoi !




Hezkore(Posted 2016) [#2]
I've been playing around with random dungeons myself for a while and I too dislike the long twisty corridors (boring to walk through).
Glad someone else is on my side heh.

Anyways, really nice work!


dw817(Posted 2016) [#3]
Thanks, Hekzore. Make no mistake I really like what I did and am definitely going to apply it to a future RPG Maker or Rogue variant.

Since someone is showing an interest, I'll post my latest update to this either today or tomorrow.


AdamStrange(Posted 2016) [#4]
the only thing you might want to consider is adding a few more connections.

Currently there is only one way to reach all rooms. The usual complaint with rogue-likes like this is they become less fun than having multiple way of accessing places.

just a thought :)


dw817(Posted 2016) [#5]
Actually I was rather pleased w the fact that you might be in one room and have to travel a GOOD long ways just to get to the room next to you. Still ... it's not very believable.

For instance, if you were making a Silent Hill type of RPG, what Hospital Floor is going to have rooms like these ? Not many. No, it should be quite possible for a center room for instance being able to link to four or more other rooms.

I will have to give it some thought.


Hezkore(Posted 2016) [#6]
You could add lots of fun options, so that it fits other situations.
Like maybe a flag to allow for those twisty long corridors, or length of corridors.
Set maximum amount of ways to reach a room.
Maybe even irregular shaped rooms and corridors, for caves and such.

Anyways, yeah I'd love to see an updated version!
This as a TDungeon type or something would be perfect. :)


dw817(Posted 2016) [#7]
I'm not very good with TYPE style variables, Hekzore.

As promised, here is the update. Tiles are now flagged not just as floor and doorknob but critter, treasure, trap, and stairs going both up and down.





What I had planned for the critters is they don't move.

But if you are one square away from them (even diagonally), they attack. So while it might be possible to walk around some in a dungeon, in other rooms where they are positioned near the doorknob by or stairs chance, you won't have a choice but to fight them.

Also I have noticed new RPGs benefit the player with a bonus when they grab all the treasures or defeat all the critters on a level in a dungeon. That could certainly be applied to this mapper.


Hezkore(Posted 2016) [#8]
I turned this into a Type, which should be much easier to include in any game you might want to make.
Basically all you have to do now is something like myDungeon = TDungeon.Create(Width,Height)
You can also specify the rooms minimum and maximum size, maximum room tiles (or skip that part by setting it to 0) and seed.
And once created, you can do myDungeon.Generate() to generate another dungeon.
Oh and it's now also SuperStrict.




dw817(Posted 2016) [#9]
It looks really good, Hezkore, except that it's not filling in every room. If there is a space remaining that is 3x3, 2x3, or 3x2, a room can be added.

Wait ... I'm reading more of the code.

OK, I see, you have made those as part of the dungeon creation arguments ! :D

Also SEED, so you can recreate the same dungeon each time. Marvelous for returning to a previously saved game.

I'll have to sit down sometime later and look over your wizardry. Need to run for now.

Excellent work !


Cocopino(Posted 2016) [#10]
Nice stuff dw817!
Thanks Hezkore for the Type conversion.

I made an extra Method for Hezkore's TDungeon:
	Method CreateExtraDoor:Int()

		Local doorCreated:Int = 0
		Local triesLeft:Int = 9999

		'Find random tile of "nothing" suitable as door
		While Not doorCreated And triesLeft > 0

			triesLeft:-1
			Local x:Int = Rand(2, width - 2)
			Local y:Int = Rand(2, height - 2)

			'Check tile = nothing, and no neighboring doors exist
			If Map[x, y] <> 0 Continue
			If Map[x - 1, y] = DOOR Or Map[x + 1, y] = DOOR Or Map[x, y - 1] = DOOR Or Map[x, y + 1] = DOOR Continue

			'Check east-west neighbors are ground
			If Map[x - 1, y] = GROUND And Map[x + 1, y] = GROUND doorCreated = 1
			If Map[x, y - 1] = GROUND And Map[x, y + 1] = GROUND doorCreated = 1
			
			If doorCreated
				Map[x, y] = DOOR
			End If
			
		Wend

		Return doorCreated
		
	End Method



It's not a very clean way to do this but it will add a new door randomly to an existing dungeon so multiple entrances can be made. To use:
If KeyHit(KEY_D) myDungeon.CreateExtraDoor()



AdamStrange(Posted 2016) [#11]
mmm, Interesting

I've got loads of different types of dungeon creators, but after testing they are not quite what I was looking for.

So here's a different angle on this subject:
1. lets assume that a dungeon is a collection of connected rooms (corridors could be just another type of room)
2. ignoring all room sizes, types, etc. Let's assume a room can have up to four exits: 1 on each wall. and all rooms are logically connected. E.G. no rooms you can't get to

Using a simple grid we can map rooms and connections:


rooms are numbered so we can put keys, lock doors etc. a key is always found in a lower room number than the locked door!

Taking this grid, we could then decide room sizes and using a separate 'map' create the true rooms giving more sense to scale, size, etc?

As a quick cheat
- rooms with 2 exits become corridors
- rooms with 1 exit become storage or special rooms (treasure)
- rooms connected to special rooms could have a monster
- sprinkle some other stuff and you have a more logic dungeon to play with


Hezkore(Posted 2016) [#12]
That sounds like a really cool way to do it!
I'd love to see a dungeon generated from that method.
Is there any chance you'd share the code from the example above?


dw817(Posted 2016) [#13]
Well now if you like that, Hezkore, I did write a flawless maze generator. Flawless in the sense the corridors are not simple nor can you approach the exit except and only by following one path.

Here is the code:

http://www.blitzbasic.com/Community/posts.php?topic=105489

Using this you can see how to apply it to your 'room' idea above. :)

Failing that, I'm not certain how to approach building the method you have above for interconnected rooms.


AdamStrange(Posted 2016) [#14]
Here's the basic code for how I do it. the code is a bit dirty with no help, but should be pretty readable :)




AdamStrange(Posted 2016) [#15]
Hezkore here is a sort of map produced from this concept

First the base connections:


and now the map (128 x 128):


As you can see I've also used colors to denote different areas:
grey = castle
light green = grassland
dark green = woods

This map design style does not feature doors, although they could be added


AdamStrange(Posted 2016) [#16]
and here is a further refined version:



dw817(Posted 2016) [#17]
AdamStrange, here is an idea. Is it possible to take your room idea and make it so it generates a floor like you might find in a hospital ?

[IMAGE].

Thus some rooms have different sizes and the map element is configured to generate smaller rooms with few or no additional exits from initial larger rooms that have and start with many exits.


AdamStrange(Posted 2016) [#18]
simple answer is yep. but...

I would look at hospital design first and come up with a generator that creates the sort of room plan that would say hospital.

but (again)...
If you took the last pic and viewed the grey central area. This does look like some form of community building plan (school, hospital, facility, jail), etc.

You take the generated (grey) area and then apply a room system on top of this?


dw817(Posted 2016) [#19]
I was giving some thought to this today, Adam, and perhaps it could be, the program recognizes one BIG room, the entire building itself, from there it adds smaller 'rooms' and rooms within those rooms.

That might meet the layout of 'hospital' or 'building.'

As for your question, yes, I think so, if I am understanding you correctly. Build rooms within rooms, not rooms linking to corridors as Rogue has it. You are making a map that is convenient for people to travel through and meet smaller rooms.

Here is a hospital map from the slasher/survival game, "Silent Hill."

IMAGE.


AdamStrange(Posted 2016) [#20]
yep, it's more how you decide the rules and then code from that.

In this case we already have the two main elements:
1. the general shape (the grey building)
2. the base rule = single long main corridor with rooms off

you could further enhance the rules with:
- entrance and junctions have large open 'public' spaces
- large (grey) 'rooms' have theatres, etc


Hardcoal(Posted 2016) [#21]
I just want to say, That I love random map generators..
I wanted to have a 3D game generator,
so when you explore a game, its really a new world for you.

with all do respect to Virtual reality developments
I still will love having a 3D monitor with out glass
that will truly imitate a window. well.. Just dreaming :)


dw817(Posted 2016) [#22]
Glad you're liking it, HC.

I have yet to find some really small code to do good generation of 3D dungeons. Now years ago I wrote one that simulated 3D. That is, I worked off of a 2D map and displayed a pseudo-3D image.

Basically it was a series of straight and diagonal lines to give the illusion of distance.

Try out "Arcana" for the Super Nintendo. This is a great example of 3D graphics using only simple image plotting.


Hezkore(Posted 2016) [#23]
I've made a few 3D dungeon demos and 3D dungeon crawler games back in the day, with various different methods of generating dungeons and towns.
(And recently an Android/iOS bike game with some random world elements heh)
Here's one that used some Snes games graphics, but the worlds were randomly generated and used a simple array with a byte value for the layout.
All the tiles were automatically drawn with the correct edges and borders.
Even the houses were basically just a block (or any shape) of 5's in the array and the game made correct roofs and windows and you could seamlessly walk into them.
It was also possible to edit the levels from within the game online with your friends. :)






I have however never managed to get a level generator working to the point where I could just define things something like this:
Level.FieldsRooms=4
Level.WoodsRooms=6
Level.CastleRooms=6
Level.LockedCastleRooms=1 'Keys would be created for these rooms somewhere on the level BEFORE this part of the level
Level.Generate()

PlacePlayer(Level.RandomFieldRoom())
PlaceNPC(Level.RandomLockedCastleRoom())

Basically this means the player would start somewhere in the field area, walk through that part and get to the woods, walk through that and get to the castle.
And somewhere along the road a key would be found to unlock the locked castle room at the end containing the NPCs to save.
All on one map the blends the different room types together based on which room was added first and last.
It would be super easy to setup different kinds of levels and also have them fit the quest's story.

AdamStrange's grid method kinda revived this idea.


dw817(Posted 2016) [#24]
Sounds like you're ahead of me, Hezkore. The closest to true random city generation I have seen hearkens from Ultima.



At one point I made an "Island Maker" which generated all the proper terrain and land curvature for housing icons of temples, dungeons, castles, cities, and villages.


AdamStrange(Posted 2016) [#25]
Here's something I was working on last year. It was 3d display out completely 2d and also completely random.

you can see the actual 2d map on the top right:






Everything is procedurally generated, from map layout, to room contents, decoration, etc. when you enter rooms, the outside slowly vanishes, likewise when you are outside the interiors vanish. exterior walls also appress/disappear depending on your location to them


Hezkore(Posted 2016) [#26]
Looks real cool Adam!
Though I'd love an isometric orthographic projection instead heh.

I fooled around with your example Adam, modified it, and I've come up with this.


It basically lets you define how you want the layout to be, and then it generates it for you based on a seed.
You can specify extra treasure rooms and how many locked doors you want, it'll place keys for you too.
It's real easy, just do AddRoom(Type, Ammount, Locked) then set how many extra/treasure rooms you want AddExtraRooms(3)
Then just called Generate()

Here's the first dungeon the example generates:



As you can see, there are 3 locked doors and keys for each door placed around the map.
It tries to not place keys along the main path, but sometimes it kinda has to heh.
There are also 3 extra rooms (17, 18, 19) which could contain treasures.

Does anyone have any tips on how I could "carve" out the rooms in a good way?
I want the rooms to be fairly small, like what dw817 has posted above.


dw817(Posted 2016) [#27]
Hekzore, you might wanna look at a game called Haunted House for the Atari 2600. They developed rooms in such a way that you had to travel maximum distance in order to find keys to open the locked doors.

I imagine it is similar to a method called, "Astar."

https://en.wikipedia.org/wiki/A*_search_algorithm

One of the seriously good advantages of Astar is the ability to click the mouse anywhere in a maze and the player will work towards that location despite having to travel away from the set destination.

You could also use Astar to determine maximum travel time to find keys.

AdamStrange, that's quite a bit you have there. I'm not one for Isolinear graphics so you might provide both this and standard square mapping to cater to people who like one or the other.

and truly Isolinear is not needed. It was a raster pixel cheat years ago in order to give a psuedo-3-dimensional depth to sprite images.

Clearly you have perfect 3-dimensional graphics before you.


AdamStrange(Posted 2016) [#28]
Hekzore - great mod :)
Does anyone have any tips on how I could "carve" out the rooms in a good way?

Lets assume you are using the routine you showed above.

Using the data you now have. setup a different larger map (this will be your ground)
for each room place it on the new map with different room sizes
where there is a door connecting the oldmap, make this a connecting single corridor - straight to begin with, then once it works you can start offsetting adding turns, etc

Alternatively, take the above map data. and give a size to each room. if a room has only 2 entrances, make it a corridor/angled corridor


Hezkore(Posted 2016) [#29]
@dw817 Yeah I gave A* a go in the past.
Planning on using it for enemies (maybe).
But I don't want keys to be that hard to find, but if you do you could change the line
Rooms[X, Y].IsExtra < 2
to a higher value which would allow for a longer path to the key.


I've been trying to carve out my level since yesterday, and I'm starting to get something decent going.



The level above starts in the forest. (blue is water)
It then goes through a cave and you come out in a swamp. (green is slime)
The orange part after that is a "house", which then leads to another swamp.
Then there's a castle, and the blue after that is some sort of "ice" cave.
At the end there's a "hell" area. (orange is lava)

Still working on it, and I need to figure out how to best place doors, locked and unlocked ones!


Hezkore(Posted 2016) [#30]
Managed to get doors working.
A door is placed at the edge of a room, but only if there's one tile of floor surrounded by walls and no other doors directly next to it.
A locked room will have walls placed at the entrance with a locked door in the middle.
Some rooms, like fields and swamps will never naturally have doors, but if you decide to lock a field or swamp room, the correct walls will still be placed along with a locked door.

Doors are the brown tiles.
Unlocked doors are black in the middle.




dw817(Posted 2016) [#31]
Pretty cool design, Hekzore. The island maker I had in mind blended all of these though, not separate. Hmm ... Guess I need to write it out.



Here is an island generated in a 255x255 area. More than enough to explore I think if you zoom it to RPG tiles to view only 15x9 squares at any one time like I have sorta like HERE:

http://www.blitzbasic.com/Community/post.php?topic=105731&post=1293684



This was something similar to what I had done back on the Apple ][, but it was a resolution of 40x40 pixels w 16 colors to each, the limit the Apple could do at the time.

Place dungeons next to mountains, place cities on grass, place castles nearby cities. Place towers and caves in desert or forest.

I think it's a pretty good way to build an island, maybe one of you guys can help me with the island shape code. For the most part it builds nice looking islands, occasionally though the shape doesn't look right.


AdamStrange(Posted 2016) [#32]
Still working on it, and I need to figure out how to best place doors, locked and unlocked ones!

here's a dirty way to deal with locked doors and keys:
- you now have the block data, map data and doors
- you also have a number (the block data number) where you placed the door
- you can put the corresponding key (key 3 opens door 3, etc) in any room which has a block number LESS than the loo block number

Reread that a few times, and it will suddenly make sense ;)


Casaber(Posted 2016) [#33]
Check out this island generator, I think it looks really good and simple.
https://gillesleblanc.wordpress.com/2012/10/16/creating-a-random-2d-game-world-map/

EDIT I forgot this but all online QBASIC compilers I found refused to compile it so I don´t know how it looks.
I don't think it's the codes fault as I could not even compile a PRINT statement on them. Might be good island code.
http://www.network54.com/Forum/190883/thread/1199451995/+(View+Thread)


dw817(Posted 2016) [#34]
Hi Casaber.

Here is the results of the QBasic program.



I kinna see what they are doing. They are creating a scribble, calling it highest peak of mountains, and then working their way around it to eventual tiles of beach and water. I might be able to do something like this myself.


AdamStrange(Posted 2016) [#35]
alternatively:
- an island is land that is above sea level (0)
- hills/land is anything that is above 0
so...
1. put a few random heights (in the range 4 to 10) at random positions on the map (these will be your highest points)
2. now cycle through each map position. the height being (current height + the height next to it / 2) if this is lower than the current height
3. do this a few times or so to spread the heights
4. apply some other sculpting if needed

you should now have a height map

You can use this to generate trees, water, features, whatever :)


Casaber(Posted 2016) [#36]
That island came out good I think. But I prefer the other link, with randomising tiles using heightmap, creating heightmap just like AdamStrange said.

The only thing left to do would be to decide what levels should become what tiles. In their example they have so some beach tiles are missing I noticed, that would be the first thing that I would change.


dw817(Posted 2016) [#37]
Hi AdamStrange & Casaber:

The problem I see is, where does SWAMP or DESERT fit in ?

I can see how you have mountains > forest > grass > beach > water, but how would you introduce these other elements ?

Sure you can have mountains > desert > swamp > forest > grass > beach > water, but if you did this then it would always tell the player what terrain to expect. They would always know swamp would be near desert and forest would always be near swamp.

And in the real world, that just doesn't happen always this way.

Now I know my 1st stage Island Maker is not the best, but it can introduce any number of elements randomly.

Let me see what code I can come up with this HEIGHT method ...


dw817(Posted 2016) [#38]
Here is my attempt at it. I'm not very happy with the results though:



I'm also getting weird rectangles to appear.


Casaber(Posted 2016) [#39]
Why does it look so boxy? Does it use box filtering instead of Gaussian? Shouldn't those be very round and similar to Gaussian?

About the desert I think.. (or I´m sure but I have no algorithm in my head yet) that desert fits in on the other side of the mountains
(Water <mountains> desert). And then on the other side of mountains, towards the water there's is heavy rain so rivers should be formed outwards there.

Maybe these rules could do it:

- Tiles at sea transients (or oceans / rivers) should probably be : grass / sand / gravel / mountains, and river and smaller watersources might have forrests and swamps very next to them though. So I´m thinking; the more water that is available - the less likely that green comes right along without transients inbtween?

- Forrest that are close To water might have swamps depending on how much rock the ground has or some other kind of grounddensity?

- Desert always needs mountains to separate them from condensation and moist air.


dw817(Posted 2016) [#40]
Hi Casaber:

It appears blocky because it is. The map is 255x255 in size. I am stretching that so it appears 510x510 pixels, doubling pixel size for appearance.

In the actual game, it would appear 50% alpha, one pixel per tile, and in the top-right-hand corner and also only show parts of the map the player has explored. The player must discover the rest.

So here is a version I call "Blossom And Preview." I'm very content w it and will use this for my random island creation needs unless something better arrives. Easy to fix margins too, right now I know it's a bit oversize. It could also use an overall outline to mark the edge of the water to the surf.



Once the map is drawn, use I J K M keys to navigate. Understand that random combat could be initiated about ever 3-4 steps, mapping will animate very slowly, about 2-tiles moved across per second, all there will be MANY structures for the player to find.

Towns, Castles, Dungeons, Towers, Crypts, Graves, Caves, Villages, Tombs, Temples, Caravans, and Campsites.

Some cities could also be placed right on the beach near the water so they have boats for lease to travel to other islands when the player is wealthy enough to afford this endeavor.

Critters could match terrain. Find Sand Crabs, Jellyfish, and Dark Shells near the beach.

Zombies, Voo Doo Dolls, and Slimes near the swamp.

Mummies, Evil Scarabs, and Vultures near the desert, etc.




Casaber(Posted 2016) [#41]
Haha, I was with you all the way until Zoombies and the swamp. It sounded so all natural and up to that point.

Okay, that example looked really nice, when it grows. Nicely done.


AdamStrange(Posted 2016) [#42]
mmm, interesting way of interpreting the concept. definitely not the result I was expecting.

using the map:int and only 8 values is not really a height map, but the result can be interesting.

Using your general method here is a true height map (and super strict code):

and the output:


There are a few things to note
Rand(from:int, to:int)
Rnd(float)
map[255,255] - the array values go from 0 to 254. 255 is not valid
indenting is tabs not spaces
using functions makes things clearer
using logical variable names with for loops. x and y to reference the map locations is more readable than using i, j as they don't really references anything sensible

ok, that's my code gripe over ;)

so how would you turn a (proper) height map into the island?
Simples...
if height is within the bounds you are interested in, make it what you are interested in. tip. use a second map for the result and the height map as your source


dw817(Posted 2016) [#43]
Hi Casaber:

Well I remember watching a movie and that's where the zombies came from, the swamp.

AdamStrange, I've been using I and J for index variables, not just as for X & Y for as long as I can remember. If you check some of David H. Ahl's original games, he used it quite heavily.

And yes, my map is not 256x256 it is 255x255 so it can have a natural center - as any odd number will.

I use SPACE instead of TAB because I don't like storing non-ASCII characters in my source, especially if I read it w Notepad later as TAB w it is like 10-spaces.

What you have above is an effect similar to what I posted earlier HERE as Candy Dreams:

http://dw817.deviantart.com/art/Candy-Dreams-284150276


Casaber(Posted 2016) [#44]
I´m curious about one thing, what does that line do? I see how it tries to average to an center height but I've never seen that kind use of randomness?

If I change
If heightMap[xx, yy] > heightMap[x, y] Then heightMap[x, y] = (heightMap[xx, yy]+heightMap[x, y]) * Rnd(0.49, 0.5)
into
If heightMap[xx, yy] > heightMap[x, y] Then heightMap[x, y] = (heightMap[xx, yy]+heightMap[x, y]) * Rnd(0.5, 0.5)

then the results is totally different?
What actually happens?

Function expandHeightMap()
	Local k:Int , x:Int , y:Int , xx:Int , yy:Int	
	For k = 0 To 100000 ; 	xx = Rand(1, 253) ; yy = Rand(1, 253)
		If heightMap[xx, yy] > 0 Then
			For y = yy-1 To yy+1 ; For x = xx-1 To xx+1



					If heightMap[xx, yy] > heightMap[x, y] Then heightMap[x, y] = (heightMap[xx, yy]+heightMap[x, y]) * Rnd(0.49, 0.5)



			Next ; Next
		End If
	Next
End Function



AdamStrange(Posted 2016) [#45]
it gives an element of randomness to the results. giving different numbers will give different results as you've found.

because it's floats, we can deal with very small values to give big changes.

It was also meant as the starting point for mucking around with and also showing height maps - what you do with the results if up to you ;)


Casaber(Posted 2016) [#46]
I find it interesting how random small changes can make those bubbly even round shapes when you go thru a square around each pixel, great code.


dw817(Posted 2016) [#47]
What's even more interesting, Adam & Casaber, if you try to retrieve the value of a random number less than 1 by itself, you get zero.
Strict
Local i,a#
For i=1 To 10
  a=Rand(0.49,0.5)
  Print a
Next



Cocopino(Posted 2016) [#48]
Rand() returns an integer, you need Rnd()


dw817(Posted 2016) [#49]
Ah, my bad, Cocopino. Try again.

RND() ? Trying it out. Hmm ... It's different than standard RND() or RND(1) in that you can have a range. I did not know that ! This could be useful for real arguments.


Cocopino(Posted 2016) [#50]
Some other useful functions from the documentation
docs/html/Modules/Math/Random numbers/index.html


Function RndFloat#()
Returns A random float in the range 0 (inclusive) to 1 (exclusive)

Function RndDouble!()
Returns A random double in the range 0 (inclusive) to 1 (exclusive)

Function Rnd!( min_value!=1,max_value!=0 )
Returns A random double in the range min (inclusive) to max (exclusive)

Function Rand( min_value,max_value=1 )
Returns A random integer in the range min (inclusive) to max (inclusive)

Function SeedRnd( seed )
Description Set random number generator seed

Function RndSeed()
Returns The current random number generator seed


dw817(Posted 2016) [#51]
Quite a bit, Cocopino ! I'm just now discovering how powerful SeedRnd() is for generating dungeons or random maps that the player may leave at one point and then want to explore later.

BTW, Rnd() by itself I think does the same thing as you have RndDouble() above ?


Cocopino(Posted 2016) [#52]
Rnd() takes arguments, a min and max value
RndDouble() does not take arguments, but returns some random value between 0.0 and 1.0

So RndDouble() does the same thing as Rnd(0.0,0.999999)
What IDE are you using? In most editors you can select your keyword and press F1 to get more information and in many cases a small example.


dw817(Posted 2016) [#53]
The IDE is fine, Coco, it's the MIND that's using the code which is flawed (Mine). :)

I'm used to RND() not having arguments so when I saw you using it up there w 2-arguments, my brain interpreted it to be Rand().