Jump to content

Implementing new feature into D2kEditor: A Random Map Generator


Recommended Posts

Posted (edited)

Hey there! Here are some first reasonable results. I have still plenty of improvement ideas! You may guess which principle and algorithm I am using here.

dycXxAz.jpg

5rcjl2k.jpg

pDSTnHi.jpg

PcUtCgM.jpg

 

Edited by Klofkac
  • Upvote 1
Posted
9 hours ago, Klofkac said:

-snip-

Oh damn, man! I like that idea, integrating the random map generator.

Designing very large maps from scratch can be pretty difficult for newcomers and veterans alike. It's easy to leave a lot of empty space in a map, but ya know we gotta put a base here, a base there, and then what's in the middle? Although it would be awfully lax to use the RMG exclusively to create a new campaign, it would be incredibly useful as a base to work off of. Please do continue work on this!

As for the existing templates, things look rather square. Not uncool, I mean literally square-shaped. :P If the edges could be made less harsh, that alone could improve the visual quality. Like so:
https://prnt.sc/mywv9i

Otherwise... hmm, how about a "minimum rock tiles" parameter? Either a number of tiles for the average auto-generated rock island to have, or... the number of rock tiles arranged in formation if you want it to be really wide? For instance, if you set it to 4x4, the auto-generated rock island will look really square but there will ALWAYS be enough room for a 4x4 object. It would prevent stuff like this:
https://prnt.sc/myww4r

And ensure that the rock island could always be built upon. What do you think, is that possible or feasible?

Posted
On 3/18/2019 at 11:19 AM, D2k Sardaukar said:

Random path finding walk algorithm thing?

Oh yes, that's exactly it! I even did not know it's called like this or did not read any theory before implementing it. I came up with all the ideas myself.

And yes, I already saw your attempt for a random map generator.

On 3/17/2019 at 2:54 AM, Fey said:

...

I agree with you. But as I said, I still have plenty of ideas how to improve it, so it will hopefully get much better. This is just the first version I came up with which is creating valid terrain (by valid terrain I mean that all areas - sand, rock - are properly enclosed and there are no tile errors). It just generates the terrain in blind way, not considering anything like size of rock area and other things. This is purely random, only based on fixed probability weight of certain block types (i.e. straight rock cliff block has 10 times more chance to generate than rock-to-sand cliff transition block, but there is no context and surrounding tiles considered).

Anyway, I will provide a preview version of the editor, so you can look how exactly it works and better understand the algorithm and possibly give some suggestions:

D2kEditor_randomgen_v1.zip

Copy BLOXBGBS.ini into Tilesets folder before starting the program. Then create a new empty map and make sure to select BLOXBGBS tileset. Go to terrain editing mode and select any block preset (for example some rock cliff block). Place the block on map. By placing the block you place a "seed" block, which will then extend to more terrain in next steps. You can run manual single step by pressing "Num +" key. You can forcefully undo last step by pressing "Num -", then next step will generate a different block.

If you place a block while holding Shift key, it will automatically run until it ends up by generating whole terrain. Press "Num *" to reset internal structures, so that clean map will be rendered without those crosses and marks.

Have fun!

  • Upvote 1
Posted (edited)

Wow, really nice. It is a lot of fun to play with it. Just using the + and - keys you can kinda steer the direction of the 'line'. Just pressing shift and seeing a big map part being filled is also cool, however often it's too wiggly (too random?). On smaller maps it seems to generate slightly better rock area's, not sure.

Some kind of layer on top of the map where you can paint on that gives higher priority to how the random walk should go could be nice.

I'm sure you are aware, but an undoing of the shift-auto-run feature would be useful.

Edited by D2k Sardaukar
Posted (edited)

If it has not been mentioned before. Make sure that all open places are reachable by ground.

 

Great work though!!

Edited by X3M

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.