Generating maps in OpenRA

Discussion about the game and its default mods.
tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

Hey everyone,

I'm now officially looking for some testers. People who are able to compile OpenRA for now.

I made it possible to change the values of the map generator within the UI, so you can experiment as much as possible with the current features.

All you need to do is compile my version of OpenRA, play around with it in skirmish, and send me information. You can do that by replying to the thread or chatting to me on IRC, but preferably you'd also fill in my little survey.

See more information in my blog post

Screenshot:
Image

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Awesome!

Is compiling OpenRA difficult? If you could write a little guide on how to do it I would like to do some testing.

It looks great!
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

It's probably difficult if you're not familiar with the programs. There's a guide on the OpenRA Wiki here.

I'd like to create builds if it's needed to get enough testers but not sure how to do that well right now, so I'm just trying to get people who can compile at first.

GoldenHippo
Posts: 13
Joined: Thu Oct 15, 2015 2:29 pm

Post by GoldenHippo »

Excellent stuff! I'd really be interested in testing this, just think compiling is a bit out of my league at the moment. It's great seeing things like this being worked in the community :)

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Did you find testers?

Any way we could work around the compile problem so us noobs can do some testing?
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

I found a few testers. Also did some testing locally, which is easier even though I don't know any OpenRA experts here. Sorry, I didn't check the forum in a while.

This week I've been busy implementing cliffs. I made a blog post here:
http://thomasvanderberg.nl/blog/cliffs/

Here's a screenshot:
Image

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Ha! Nice!

Not sure how the program works, but a good map designer once said that he never used the same tile twice right after eachother. That ensures cliffs get the more irregular natural curving shape. Ofcourse it's not a disaster if similar clifftiles sometimes follow eachother, just not all the time. Can you set probabilities perhaps? "if tile X6 is placed, reduce chance to place X6 again with 90%"

But overall really liking where this is going. Generating smooth, natural maps is difficult, but you are making nice progress!
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

Thanks. What you mention could be possible. The way it works now is it uses a jitter factor. You can see the third picture in my blog post has almost no jitter, cliffs tend to go straight, while the first and last have high jitter. You can adjust the settings, and the higher jitter % means a larger % chance of making a curve each time. It's possible to make it have to take a different direction than the last one all the time, but I feel it might force cliffs to be very jittery all the time. Currently I don't yet support cliffs like the ones that for example from west to east while moving one tile north. If I had more variation like those it could be easier to add in something like that and make the cliffs a bit more pretty.

User avatar
r34ch
Posts: 137
Joined: Sun Mar 01, 2015 2:02 pm

Post by r34ch »

How do you access the map generation options UI?

I had a little play about on default map generations, its really great work even at this stage. It is indeed a shame how the art was done, I can only imagine the pain you will go through when it comes to shore tiles.

I look forward to seeing trees and roads added.

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

r34ch, are you trying out the code on my OpenRA branches? The map generation options can be found in the lobby.

singleplayer -> skirmish -> options -> generate map

That should bring you to the map generation options screen.

By the way, the cliffs are currently on the branch "cliffs", not the main "mapgeneration" branch, because I was still using the mapgeneration branch to test with people while halfway through developing cliffs.

Nice to see you're interested, and yeah, getting the correct cliff tiles was a bit of a pain. Added this SimpleCliffs part to all tileset YAML files: https://github.com/tmsbrg/OpenRA/blob/1 ... perat.yaml
I don't believe anyone would understand that without me explaining it for a while. The difference between SN and NS for example is direction, with SN being a cliff facing east and NS being a cliff facing west(both going north-south). The idea is of a cliff going counter-clockwise.

Shore will be a pain too, especially because some tilesets are missing some shore pieces. I'm not completely sure how I'll handle that yet. But yeah I'd also love to see the world get more alive with trees, roads, water and don't forget houses and such. Can't work on it currently though, as this week is the week I finish all of my documentation about my half-finished project.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

I am no programming expert whatsoever, but wouldn't a more easy system be to give cliffs a code for what type of ending they have? And to that ending only certain tiles from a pool with a specific ending can be placed.

Here's an example of what I mean:

Image

The endings maybe got a bit strange name (L= left, R = right, s= south, n = north and T=top land, B = bottom land, and... doh I mixed up the R because it also means right land...)

Anyway, what I meant was: a tile-ending has 2 elements: the place where the land is (top, bottom, left, right) and the direction of the tile ending (north, south, left, right). For each ending there is only one other ending that fits. In the example the NR can only connect to SR tiles (and SR only to NR).

When NR needs a tile you randomly draw a tile from the SR pool. In this case there are only 2 tiles with SR and it could in fact be the 2nd tile with the RB ending! When that one is drawn you will no longer draw from the SR pool, but from the LB pool.

You could even assign chances to each tile by saying it standard has chance = 1 to be drawn. But depending on other variables the chance changes. E.g.: when the user has slided the rivers variable to low, then the "Rivershore-tiles chance to be drawn" lowers proportionally.

Hope it is udnerstandable what I mean.

*edit: the piece itself is also in the SR-pool by the way, since it also has an SR-side (and its also in the NR pool as it has an NR side).
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

I think you have some good ideas there, noobmapmaker. I'll look more into that when adding water and adding the other cliff types. One thing you have to keep in mind with that system too is you'd need a way to specify the location of each end, so it'd probably be more verbose and complicated. But it's probably necessary complexity later on. I thought the system I'm using now is more simple to implement with the limitations it has(almost only using the 2x2 cliff tiles going either straight or making a 90 degree turn).

Pools of endings, and putting them together like puzzle pieces, could be the right way to go. It'd also fit what I had in mind with implementing roads and rivers, which was using pathfinding and adding each road piece to fit on the previous one.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Tried to come up with a solution for that as well. This will require to systematically determine several aspects of tiles (whether it be road, cliff or shore):
- The type of tile (road, cliff or shore)
- The shape (height, width and irregularities in the shape)
- The points of attachment and their coordinates
- The endings
- Some types are special. E.g.: when the shore with river is drawn it needs to know that aside from two Shore-endings, it also has a Rivertype ending

That in itself is alot of work, but once it is done it could give you the freedom to write the algorithms that are needed to get what you want.

This image explains the Points of Attachment (PoA) and also categorizes the endings better.

Image

After the tile has been placed the software has to draw a new tile: a NR tile and it has to be placed 436pixels lower and 101 pixels to the left. Now here comes another problem. What if there is no room for another tile? Because even the smallest NR shore tile doesnt fit there? Im lost there... it would need to go back a step and redraw the previous NR tile untill this error no longer occurs.

If you think this is the way to go, or something similar adapted to what you allready have, and need someone to do the stupid work by categorizing tiles then I'd be glad to help.
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

User avatar
r34ch
Posts: 137
Joined: Sun Mar 01, 2015 2:02 pm

Post by r34ch »

tmsbrg wrote: singleplayer -> skirmish -> options -> generate map
Thanks, I was using the map maker directly

tmsbrg
Posts: 13
Joined: Thu Mar 03, 2016 11:48 am

Post by tmsbrg »

noobmapmaker wrote: After the tile has been placed the software has to draw a new tile: a NR tile and it has to be placed 436pixels lower and 101 pixels to the left.
Luckily it's not that complicated. The OpenRA templates always align to map cells so offsets only need to take cells into account, not pixels.
noobmapmaker wrote: Now here comes another problem. What if there is no room for another tile? Because even the smallest NR shore tile doesnt fit there? Im lost there... it would need to go back a step and redraw the previous NR tile untill this error no longer occurs.
I think going back is indeed the answer. It depends on what we're placing. With roads I'd like to use a form of pathfinding that creates paths between two areas and always has to end with a correct "road end tile". For cliffs we could generate them so we can have some guarantees, but currently only working with a reduced tilesets makes it work well too. Water is probably best placed in blobs. I know some tilesets lack crucial water tiles for making islands, so it's probably best to just make lakes first. Rivers are going to be interesting.
noobmapmaker wrote: If you think this is the way to go, or something similar adapted to what you allready have, and need someone to do the stupid work by categorizing tiles then I'd be glad to help.
Hah, thanks for the offer. I might take you up on that when it comes to it. Especially for C&C which whose tilesets I've totally ignored up to now because it'd be double work.

By the way, sorry for responding late, but I finished my school stuff friday so now I'm more free to work on the map generator.

Post Reply