project-navigation
Personal tools

Author Topic: Stupid RMA tricks  (Read 4671 times)

Offline Anarch Cassius

  • Squad Leader
  • ****
  • Posts: 176
    • View Profile
Stupid RMA tricks
« on: December 19, 2012, 12:19:49 am »
As someone who is getting in to making games for a living, I have to say I think the RMA is one of the nicest features in the game. However it's impressiveness as a system and it's ability to make interesting maps aren't immediately obvious I think.

What makes the RMA so useful is how it's practically a language in it's own right. Like DNA proteins each little bundle of simple instructions interacts to create very complex patterns. So maybe I'm being dramatic but my initial frustration at lack of direct commands has been replaced by awe at what indirect ones can do and I'd like to do some brainstorming in the interest of better maps.

There are some issues. You cannot rotate tiles, this would seem logical enough and save disk space, but I'm blaming the light engine since as far I can see that's the major obstacle. The lights are prebaked and you'd have 4 different competing "suns" if tiles rotated.

Also shadows are baked to objects so you they won't extend over to the next tile. IE a long hallway will have light gaps at connections where one tile shows the sun it would get if the next space were clear. The next hallway segment would have a shadow overlap on that side to cover this gap, but with no object to receive the shadow on it's own tile it has no way to put that shadow on the adjacent segment.

You MIGHT be able to make some kind of no-clipping, invisible-but-shadow-receiving brush to fudge this gap... but then you'd have to make the RMA set up so only a tile with floor/wall at the right places to make your dummy shadow can go there. I don't recommend trying this as the RMA can freak up with hard to comply with instructions (I'll discuss more below)

Roads are explained in the basic help for RMAs. You make a type for vertical (E here) and a type for horizontal (F) and have cross pieces count as both types. I used this for hallways on the school I'm working on. Good but there are some problems.

The hallways would appear in odd places connecting nothing, and worse form clumps of just hall. I set the building tiles to want hallways at their doors and set the halls to want basic area (A) on their sides. Basic areas are the buildings and open space (also tagged O) so they sometimes appear in the middle of nowhere but they won't clump. Building doors always open on to a hall or open space ( E or F, and O).

Mostly good but my crosspieces can appear at doorways and some of them block the door. So now I set my hallways with a second type C (which I just removed from other tiles as unneeded) for clear. The main hallways get this for their 2nd type and I make my doorways want to be next to C or O.

Now all these instructions are getting a bit much for the RMA. I'm basically giving it a puzzle to solve and it knows in advance if it has the right number of tiles but it doesn't know if it will be able to fit them all together. The more strict the rules the fewer possible solutions and the more likely it will take a long time or lock up generating the map.

Giving the tileset more flexible free tiles to work with helps as it can drop these to complete the map. Having lots of tiles in general helps as it has more options. I'm also looking into using the preconfigured blocks to set up larger chunks of hallway and building that can be dropped in with the rules already fulfilled.

I'm just getting started and welcome more ideas. I'll keep posting with my tricks, issues and discoveries.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Stupid RMA tricks
« Reply #1 on: December 19, 2012, 12:54:32 am »
IMHO, fully random assemblies work best in situations where nearly all tiles can be placed next to each other, such as +oriental or +forest. Unfortunately, these use-cases tend to be limited to natural areas. As soon as you introduce an element such as roads, tunnels or human-built areas which have to look planned in some way, it's a bit more difficult. The RMA algorithm will, impressively, build a map if it has the right pieces. But it's nearly impossible to get the maps to come out looking like a real place.

If you're working with tunnels or streets, you might consider using fixed layouts alongside tilesets. In this way, you can lay out a street grid, for instance, and then have the RMA insert random buildings at the appropriate slots. Because you can create as many different assemblies as you like, and they take very little time to create, you can easily set up several different street grids to prevent the same exact layout from occurring every time.

You can actually get more random-ness this way, I think, than by going with the fully random assemblies. This is because the algorithm tends to stumble upon similar solutions given a recurring configuration of tiles. For instance, although you can use lots of "filler" tiles to fill in gaps and ensure a layout is found, you tend to end up with a map packed with fillers and too much space (see +village).

That said, I'd love to see some experiments with tile size and the RMA, using simple blocks. How do layout results differ if I use all 2x2 and 2x4 tiles? What if I have a 2x1 a 2x2 and a 2x3 title? I suspect we can come learn some lessons about what works best to produce different layout results if we test like this.

Quote
You MIGHT be able to make some kind of no-clipping, invisible-but-shadow-receiving brush to fudge this gap...
Look for the Lightclip texture. Check out the +alienb map to see how the tunnels are stitched together (or the +b maps).


Offline Latino210

  • Squad Leader
  • ****
  • Posts: 161
  • UFORadiant mapper
    • View Profile
Re: Stupid RMA tricks
« Reply #2 on: December 30, 2012, 12:59:15 am »
I concur H-Hour, but AFAIK there are only three or four maps making real use of the RMA algorithm, all the others have only a main  and a dropship tile! I tried to add some variety to my maps by having a random choice between two tiles, but I think I am the only one that did so. I'd really like to dissect the "harbor" map to understand more of its RMA working, but I had no time!

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: Stupid RMA tricks
« Reply #3 on: December 30, 2012, 11:39:21 am »
We actually have ten maps that are fully RMA, iirc.

Offline Anarch Cassius

  • Squad Leader
  • ****
  • Posts: 176
    • View Profile
Re: Stupid RMA tricks
« Reply #4 on: January 11, 2013, 09:15:52 pm »
Taking a look at Africa made me realize I hadn't fully understood what a Tileset is.

I thought they were a set, that it would add all or none for that option. In fact its a set that the RMA chooses from for that slot. Obviously having this backward made the RMA's job harder, not easier. I'm not saying my mistake wasn't dumb, but this could be made clearer in the doc.

The set I'm making is a school. They tend to have the same elements in different, almost fractal arrangements so the RMA does a decent job. Many schools undergo partial renovation and expansion and look a bit haphazard anyway. With the right tile requirements it looks pretty good. Of course, that based on the schools around San Francisco and Berkeley where I live. I'm actually thinking by shifting the tilesets used and the amounts I can make a high school, city park, and college using most of the same tiles.

I still have the occasional failure to load. This isn't technically a crash or hang I realized. Once after I left the computer having given up on it, it actually started processing the map after like 20 minutes. It tends to get done quickly or take absurdly long, I don't see it hang for just a minute or two for instance. Does the RMA have the potential to "back itself in to a corner" so to speak and what can be done to minimize it?