Jump to content

Yet another random map generator


Pyrophorus
 Share

Recommended Posts

Hi everyone !

Erratic replies to random comments generation :loool:

15 hours ago, FeXoR said:

Domestic animals at start locations: You can just place them after line 194 like "berry bushes" or "starting trees". Did I miss something? (And what issues does which newer placement method cause?)

I can't remember why I have commented those two lines:

	placeDefaultChicken(fx, fz, clBaseResource,av);
	placeDefaultDecoratives(fx, fz, aGrassShort, clBaseResource, radius,av);

at the end of this script section. Maybe some chicken finally sit on top of stone mines or ugly things of the like, and I hid them cautiously under the carpet:rolleyes:. Now I wouldn't say there are issues in the newer placement method. The problem I have with it is roads running to the CAER. One can place chickens or units on the road, but no tree or mines and the placement method can't deal with this particular problem (AFAICS).

16 hours ago, FeXoR said:

Large areas covered in water and ramps that can't be build on: Making the water deeper and the ramps flatter would do IMO. I don't get the entire main landscape procedure yet but maybe non-linear scaling (e.g. with square root) of the heightmap ("before" mountains are added - yea, it's in one go but in different sections) could change this without having to change much else? (on the other hand there should be an exponent scale factor for higher and lower terrain anyway IIRC) I can live with it as is but really think at least deeper water would be nice - and more realistic BTW ;) (If the water level is set before the main landscape procedure one could also change those areas separately )

There are two points here: the underwater and what you call ramps. As you know (or not, which is why I recall this quickly:diablo:), the heightmap is created merging a rather flat one (on which players can walk and build)  and a much more bumpy one to put on mountains. Lakes and pools are part of the first one and this is why they're shallow, and, in this particular context (Egyptian Oasis) it would be IMO rather unrealistic to create oceanic deeps here. But this can be done rather easily, just replacing the lower cells of the map with something deeper.

Now, I'm not sure to understand what you call ramps. Maybe you mean the valleys and depressions running across the mountains. If so, and if you find the relief too harsh here, the map creation parameters allow to tune this. There's probably no need to apply some other function.

On 11/17/2018 at 2:27 AM, FeXoR said:

Roads: AFAICT you first paint textures, then you paint roads taking the textures painted into account.

No. Roads are drawn in the abstract cell map prior to any texture painting. It is done setting the 'terrain' attribute to 'road' or 'road2' and the procedure uses other members of the cell object as well. That said, it's not a problem to create a region holding these cells, and, as you suggest, grow this region twice to create a path five cells wide (I think the PatchPlacer can do that, with some adjustments maybe). I'm not sure this will give really good results, particularly with very winding paths. But anyway, there are other solutions, and I'm thinking about.
Actually, the script draws roads before any entity placement because it has a useful side effect: it allows to verify no player is jailed in some part of the map. If so, the map is rejected and a new one is created from scratch. It is of course more efficient to test this as early as possible.

Friendly,

Link to comment
Share on other sites

17 minutes ago, Pyrophorus said:

I'm not sure to understand what you call ramps

I mean large areas on the "rather flat heightmap" some seeds. In some cases they are to rough or steep to build upon (Thanks for the reminder - though I got (or more guessed x)) this one right). So, yes, I'm aware the water and the ramps are on the "same" "rather flat heightmap". That's why I proposed non-lineare scaling. Linear scaling only the parts below sealevel would make the water deeper, too ofc, yes. But that wouldn't change the ramps. And I'm not talking about oceanic depth but about 50% of water covered area to be more then hip deep (unwalkably deep) ;)

30 minutes ago, Pyrophorus said:

No. Roads are drawn in the abstract cell map prior to any texture painting.

Yea, I didn't get this one (therefore my edit, not saying that I'm enlightened now :D).

But now I'm not sure if I explained well what I had in mind, trying again:

  1. Add the tiles of the path as is now with one type tag/key, say "road", to the abstract map (to be later covered with the path texture)
  2. Add the tiles surrounding the "road" tiles in a range of 1 or 2 with say "road_clearance" (avoiding tiles marked with "road", to be later covered with the surrounding region's texture but no entities)
  3. Optional: Add the tiles adjacent to "road_clearance", but not in "road", "road_clearance", with say "road_trees" (also avoiding start and end point by 3-4 tiles (depending if you chose 1 or 2 for the clearance), where later the alley trees could be placed)

I guess that's more clear (and ofc. the path painted with textures or the clearance could be made broader as seen fit).

And you could use those areas to place the chicken on (but a default placement method would be preferable).

But if you have other plans already, go for it! (y)

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...