r/ProD

158 archived posts · Jan 2014 – Feb 2023

Random post

u/tuncOfGrayLake•

UPDATE: The jam has concluded!

Short version:

Here's the download link. (If the link is down please make a post in this thread.)

Here's the link to the PROCJAM2014.


Pro-D Total

Hi there fellow crawlers I've been lying sick at home and realized it was time for the PROCJAM already. We've been planning to do this for a while so here you go!

Pro-D Total is going to be FREE (Yeah, I said free...) only until the end of PROCJAM 2014. The actual package is worth $75 so go ahead and download it while it’s all up for grabs! (I recommend you st

2514

u/tuncOfGrayLake•

Hi everyone,

We're starting to work on a video tutorial and we're currently setting up a rough layout of the chapters.


  1. A first glance at Pro-D: Opening a new Unity project. Visiting the Asset Store page. Downloading and Importing Pro-D from the Asset Store. Opening the example scene and talking briefly about Pro-D's functionality. Reviewing the folder layout with minimal comment.

  2. Setting up Pro-D in your scene: Opening an empty scene and adding the barebones necessary for creating maps. Going over Pro-D related GameObjects in this scene and talking about their functionality briefly. Creating a simple map through an existing generator script.

  3. **Explaining the Pro-D f

812

u/RJAG•

For anyone interested in what I'm trying to do (generate maps, with biomes, where they fill up slowly until the map is full) here is how I did it.

http://i.imgur.com/mw1U4Ys.png

First, I started with generating the continent- Land & Water. I also filled in the Lakes, because I wanted no Lakes, no Mountains, nothing but Biome (which are rendered out into flat 2D Tiles).

You can see here how I Flood Filled the Ocean and got rid of the Lakes, after generating something similar to Generator_Cavern in ProD: http://www.reddit.com/r/ProD/comments/2x1cek/identifying_lakes_from_ocean_filling_in_lakes_and/

So after I generated the continent and water, I then made my function to generate biome

82

u/rougelikedev•

While messing around with the RandomSprite script to add some variation to my level generation I ran into the problem where too much variation was being added:

http://i.imgur.com/D4mgNYg.png

To fix this issue I implemented a weighted random number generator to select from the list of available tiles. The weighted random generator function was provided by one of the nice people in #unity3d on freenode.

Weighted Random Number Generator function - http://pastebin.com/7wurEHWk

RandomSprite modified to use weighted function - http://pastebin.com/rT52z97a

Script applied to a prefab - http://i.imgur.com/NHGaw0o.png

The result - http://i.imgur.com/V1OMxtG.png

83

u/jmcmaster•

Hey again!

Since the last tutorial was well received, let's take a look at how to enable the goblins that come with Pro-D and how we can interact with them.

The first step is super, super easy. We need to go into the scripts directory in the Pro-D package and location the Map Generators folder. Within that folder is Generator_DwarfTown.cs. This is the one we are using for the first tutorial.

When we mess with the engine, I'm not going to post the entire code files for somewhat obvious reasons. However, we will post snippets. So, in this CS file, on line 134 (or at least it is for me), you'll find this:

//MethodLibrary.AddNoiseOn_I(map, "PathWithGoblin", type_Path, 5);

All we need

74


u/RJAG•

I am using ProD to generate continents using something similar to the Cavern generator. (Wall = OceanWalls, Path = Land). My continents were filled with holes, with no way to identify them as "Lakes", separate from "OceanWalls". To do this is as easy as flooding the "OceanWalls" (all the walls around the dungeon).

http://i.imgur.com/DpH5Zn7.png

On the right, you have the "holes". Where you see green, is type_Path. Where you see nothing, is type_Wall.

On the left, you have the desired result. First, I generated the map. type_Wall and type_Path. Just like normal.

        PrepareMap();
        MethodLibrary.FrameMap(map, type_Wall, thickness);
        MethodLibrary.AddNoise_I(ma
63


u/rougelikedev•

I'm posting this here to see if anyone else has encountered these items and solved them, I'll also add my solution if I manage to figure something out.

  1. Variable width corridors. This also appears to be on the list of items for the Graylake guys as it's listed as TODO item 5 in MethodLibrary.cs

  2. The entrance and exit shouldn't be placed in the same room. Also the player should spawn next to the entrance.

  3. Use 2D Physics for map tile prefabs. This one I figured out today, if you enable the topDown boolean value in ProDManager then the Materializer script will map the prefabs over X/Z axis which causes Unity to complain that the 2D physics couldn't be displayed. So setting topDown

67