Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Dungeon-like random placement code?

srfstudio
Registered User
Quote
2019-12-21 19:13:52

Does anyone know of a dungeon-like random placement code template or example for CC? I searched but haven’t found anything :/
I want to be able to create a small, randomized set of type-A-boxes connected with type-B-boxes that, once generated, can be replaced with pre-made rooms (type-A) and corridors (type-B).
If there’s nothing similar to that I will try to code it myself. Nothing fancy, let’s say 5x5 grid (25 places) that will randomly be populated with type-A, Type-B boxes and empty places (in 5 columns) in first pass, than in second pass be modified to be connected by rows in 1 or 2 places. Third pass would be placement of rooms/corridor models in appropriate places depending on box-type.


Zoo
Guest
Quote
2019-12-22 10:42:05

An easy way to make rooms is by doing the following

1. open paint on windows
2. Using black drawing and block tool create your map
3. Save as png
4. Import to coppercube as map

The cons :

1. No roof
2. Can only use single texture during import.

However, because it is effectively a map, you can use the coppercube map painting tools to retexture some of the walls, floors etc...

Not randomized, but a quick way to build a very large dungeon


srfstudio
Registered User
Quote
2019-12-23 19:04:20

That's a good idea, cheers! I've experimented with heightmaps some time ago, it's a much better tool then I originally thought and I was able to create some sort of natural-looking mazes.

In this case I'm more interested in randomization system, I clicked together yesterday a small template that successfully places 3d rooms in a 3/5 grid with randomly-generated values.

I uploaded the ccb file and there's a post here:
https://www.ambiera.com/forum.ph...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact