1. For information on the current problems with the download system, please see this thread.

Our servers are now running a Steam Workshop rotation, if you'd like your map to be considered for inclusion on our rotation, post in the rotation discussion thread

Or, if you just want to play some of the best community maps the Workshop has to offer, you can join our servers by clicking these links:

Critical Gameplay Elements

Discussion in 'Mapping Questions & Discussion' started by Headhunter09, May 3, 2012.

  1. Headhunter09

    Headhunter09 L1: Registered

    Messages:
    47
    Positive Ratings:
    6
    I am an amateur Source mapper, with varying interest in the process. However, I'm also a very avid programmer. I was talking with one of my friends, and we came up with this idea:

    I'm looking to create a genetic algorithm for generating balanced maps procedurally. The easy part is setting up the game with AI scripts and such to do thousands of games on a given map in a short amount of time. The hard part, for which I need the input of a large number of experienced mappers, is the breeding portion of the algorithm.

    The algorithm needs to be able to change the map not brush by brush, but by altering fundamental gameplay elements. The question is, what is a fundamental building block?

    So that's my question to this community: what are the smallest parts of a map that alter gameplay? The question is vague, so just go ahead and say what you feel the answer is. Keep in mind, I don't just mean "rooms". Routes, obstacles, holes, elevation? I could come up with some, but I want to see what you guys think.
     
  2. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,346
    Positive Ratings:
    2,321
    Smallest parts that affect gameplay? Maybe textures or lights. Everything affects how a map plays in one way or another, that's why creating TF2 maps can take much longer than creating maps for other games.

    I honestly doubt, though, that you'll be able to make a computer program that makes maps that play well. There are so many things that have to be taken into consideration that just listing all of them would take ages, much less how to use them properly.
     
    • Thanks Thanks x 1
    Last edited: May 3, 2012
  3. Headhunter09

    Headhunter09 L1: Registered

    Messages:
    47
    Positive Ratings:
    6
    I recognize that. It would be much more difficult to incorporate visual or aesthetic elements into an evaluation function. The idea is to generate a novel layout that has potential. Then a mapper can take the design and clean it up.
     
  4. Prestige

    aa Prestige im not gay anymore

    Messages:
    1,764
    Positive Ratings:
    1,503
    i don't think this can really work, i mean it could make a bunch of bad/mediocre maps and maybe it'll get lucky and make a great map but i doubt it.

    these areas you want to be randomly generated have to flow into other areas pretty well and almost flawlessly. you cant put the badlands spire in the middle of 2fort courtyard, etc.. i suppose it'd be possible to make some pretty boring, kinda MEH maps that are just rooms of varying size and shape going into other rooms, but it doesn't seem worth the trouble to me. im not really sure what you want as a basic unit of map other than rooms/fighting areas.
     
  5. Headhunter09

    Headhunter09 L1: Registered

    Messages:
    47
    Positive Ratings:
    6
    The point of a genetic algorithm is that it creates lots of bad permutations, but then only recycles the ones that work. In this case, it would start out with a basic seed layout, and then make random modifications to the map areas. Those are the sort of small changes I'm looking for, but don't have the experience to identify.

    Once the algorithm has slightly modified the base layout, it plays 2 bot teams against each other many times on the map, and evaluates the games, giving the map a "rating". The maps that are assigned the best ratings get to "breed" with each other, in which new maps are created that share commonalities between the two parent maps, but also have slight "mutations" (again, I'm looking for what sort of mutations should be made to make a difference).

    Eventually a set of maps that receive a high rating consistently will emerge. Depending on the strength of the evaluation function, these maps could be good, or terrible. If you also have ideas about common things that happen in a game on a bad map, that input would be appreciated.
     
  6. Trotim

    aa Trotim

    Messages:
    1,171
    Positive Ratings:
    984
    Depends on the game mode. I'm assuming you'd want to focus on KOTH first? Arguably the simplest, and its point could be reused for 5cp etc.
     
  7. Zee

    Zee L1: Registered

    Messages:
    34
    Positive Ratings:
    16
    Someone actually made something like this for Half life 1 maps. So it kind of reminds me of that.

    Anyway, putting aside the should you or shouldn't you make it, I'd say the biggest problem you would face is height elevation. A huge flat mat just isn't very interesting. Even granary, although very flat, has quite a bit of height advantage.
     
  8. Headhunter09

    Headhunter09 L1: Registered

    Messages:
    47
    Positive Ratings:
    6
    Thanks for the input.
     
  9. MangyCarface

    aa MangyCarface Mapper

    Messages:
    1,616
    Positive Ratings:
    1,272
    This is not the game to do this in. CS, with a much more narrowly defined range of player actions, would work much better as a hosting element
     
    • Thanks Thanks x 1
  10. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    390
    Granary is actually a pretty good study I'd think. It is a very boring and uninteresting map.. but it's also considered the gold standard of "competitive" maps.

    Stripped down to essentials, a TF2 map is a bunch of hollow boxes connected by halls. Props and detailing are provided to break up lines of sight for long range classes and create close quarters areas for short range classes. Elevation changes are a little more subtle at creating advantages. They can be used to push players in certain directions as the high ground is almost always favored in a battle. Nooks and crannies are useful for sneaky classes and players seeking a break from the action.

    All of this is within reach of a programmed algorithm, assuming you can quantify these features somehow.


    The hard part is testing. TF2 bots are decent for what they are, but don't emulate humans all that well. A map that works and seems balanced with bots will probably still have significant issues once you include humans.
     
  11. Kiddnils

    Kiddnils L3: Member

    Messages:
    140
    Positive Ratings:
    72
  12. zpqrei

    aa zpqrei Theme Changer Extraordinaire

    Messages:
    1,066
    Positive Ratings:
    1,120
    I can't be the only one worried by the prospect of maps breeding, can I?
     
  13. Tarry H Sruman

    Tarry H Sruman Large Orphanage Proprietor

    Messages:
    871
    Positive Ratings:
    813
    We need to fight these genetically-modified franken-maps and preserve maps as nature intended them.
     
    • Thanks Thanks x 1
  14. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    390
    Not impossible at all actually. Genetic algorithms can do some really neat stuff, it's really only a question of how much development time you want to put into it.

    But you do have to manage your expectations somewhat. The results can be surprisingly effective, but will be quite a ways off from "perfect".
     
  15. zpqrei

    aa zpqrei Theme Changer Extraordinaire

    Messages:
    1,066
    Positive Ratings:
    1,120
    Okay, I've actually gone away and thought about it for a few minutes, and I drew up some of my worries about it, and how I think it would be best to have it develop, instead of picking 'traits' and evolving the maps through breeding (because we know someone would breed Hoodoo with Turbine and get map which plays horribly and looks crap - and then everyone loses out).

    [​IMG]

    Apologies for the crappy photo, but it should be just about legible.
     
  16. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,346
    Positive Ratings:
    2,321
    If you want to look at TF2 that way, then everything, even real life, is just a bunch of hollow boxes and halls. Hell, aren't halls themselves stretched-out boxes?
     
  17. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    390
    Yes of course, but if you're going to attack mapping programatically, that's how you have to start.
     
  18. Headhunter09

    Headhunter09 L1: Registered

    Messages:
    47
    Positive Ratings:
    6
    What you're suggesting is a "smarter" algorithm with a fairly greedy approach. This could work, but you have to consider the possibility in which two seperate areas reach an optimal layout, but the connecting areas are impossible to fix. In that case, having the two good areas is NOT the best solution.

    Anyways, thanks for everyone's input. I might get around to working on something like this over the summer; I'll update this thread if I do.