Forum



LordVader am 14.11.2016 21:12 #14463


Hey guys,

I started implementing in-game random-map generation (a bit like Age-of-Empires style). As I got some vacation days left this year, I'll
continue the implementation in December :-)

Basically, for now it is only a "Random" button in the map-selection menu, but I'd like to add a pop-up (or someone else got better ideas?)
with some parameter-selection (number of players, type of map, size of map, ...).

Here're my current results:






LordVader am 14.11.2016 21:13 #14464


Oh shit, i didn't save the urls for lower-resolved images :(


Spike am 15.11.2016 05:43 #14465

Im Ruhestand
Cool, you may also add different generators (that one made by maqs and linked on this page or merris s2 mapgen), that'd be great :)

Also there should be an option to regenerate the map in the host menu as it could get quite depressing if someone dislikes the map, the
game closes and everybody has to rejoin.

But nice work :) I like it

---



LordVader am 15.11.2016 08:14 #14466


Hi Spike, very true & thanks for the feedback. I didn't think about multiplayer yet.

About integrating different generators: i planed to include different variance of map types (age-of-empires style: like continental, islands,
greenland, ...). I found some map generators which are based on different programming languages - those i cannot integrate. The one
from this website i didn't like (apart from the harbor positions), because the coastline is not looking very pretty. But like i said, i'll generate
different types of maps.
(Working on coding conventions more now, because i didn't do c++ for more than 4 years now. )


Spike am 18.11.2016 08:24 #14467

Im Ruhestand
Just an idea an das the generator on this page is also written in c++ it could be "easy" to add that one as generator option.

Did you also think about adding a settlers4-like generator? I really liked the way they generated maps also its easy to
balance them which is a great pro for multiplayer.

---



LordVader am 18.11.2016 19:34 #14468


Hi Spike, I don't know about settlers 4. Never really played anything above 2 (a bit 3 but not much). My idea came mainly from Age of
Empires 2, because I've been playing both games a lot with my brothers. But if you describe a bit the requirements you want to achieve
(e.g. balanced map is a good starting point), I'm sure I can come up with something :-)

I saw the code from the generator of this page in the repository, but I tried playing some of the maps and the landscape was not looking
nice enough (no offense intended! i really love the work of the main devs of the project, it gave my family great joy!!!). Of course, the
client/user is kind, so I'll integrate it once i reached the minimum code quality to commit to the project hehe (last time i developed c++ was
5 years ago with a really old compiler). But might be easier if you describe the style of the map you would like to have, then I can think
about the best way to integrate it.

Thanks for the feedback anyway! Very appreciated!


Spike am 20.11.2016 16:43 #14469

Im Ruhestand
Well first of all, I already started some years ago creating such a generator, but with limited knowledge etc. the result wasn't
overwhelming ( https://www.youtube.com/watch?v=Mk897I7Rm-Y ).

Main idea in S4 was: The map is parted in rhombuses, each rhombus then gets a biome.
In S4 there were: Water, Meadow, Desert, Swamp, Mountain

In my code I called them patches. Those patches may contain the same biome but are randomly generated, that way the map still looks
great without (keeping the s2 charme). Also those patches could be placed nearly the same for player start positions, resulting in a
balanced map.

Just as an idea still (because I liked those maps)

---



LordVader am 20.11.2016 17:22 #14470


Hi Spike, I started with diamond square approach (which was giving bad results though).

The basic idea, how I generate maps is like this:
1. create a more-or-less random height map (with restrictions around player positions)
2. apply textures according to a mapping height-to-texture
3. place resources, harbor-positions, objects and animals according to textures
4. some cleanup stuff (improving visual appearance)

I know there are a lot more advanced algorithms (e.g. what might make sense is taking derivative of height map into account). Basically,
for the current implementation i focused on getting good transitions between different areas and playable maps (player positions, harbor
positions etc.). Via simple parameter treaking you can get a huge variety of maps (islands, rivers, land-only, and lots of stuff more).


Vesanus am 21.11.2016 23:39 #14473


IG random map generation sounds great. Would be really nice to play some random maps on multiplayer!


~Gast am 23.12.2016 18:16 #14493


Hi,

tried some random maps, and they are freekin awsome. This is a huge step for RTTR! Not even kidding, those maps look better than any of the implemented maps.
Thats gonna keep me playing for quite some time :)) Bots are doing ok as well (still handicapped by their max building counts and stupid tool ordering^^)

THANKS, good to see some progress around here :)

Greetz!




Feel free to post in English!

Antwort schreiben

Username:
Security code:
Text:

   
  Convert smilies like :), ;) etc. into small graphics?
  Convert WWW-addresses into clickable links?
  Soll Boardcode in ihrer Nachricht aktiviert werden?