Search Unity

Procedural Content Generation with a Domain Specific Language

Discussion in 'Game Design' started by IntrudeN313, Aug 1, 2018.

  1. IntrudeN313

    IntrudeN313

    Joined:
    Nov 25, 2013
    Posts:
    1
    Hello guys!

    Currently I'm planning a DSL with the purpose of defining rules to generate chunks of levels in a 2D platformer game aiming to improve game designers work. This would mean no longer define platforms, props and traps locations in code. I don't know if it's better to develop an external DSL with Lua or some other language, or develop an internal DSL (Fluent interface).

    But I don't even know if this is interesting conceptually speaking, I want to make it as a tool that could be useful in my personal projects... What do you think of this?
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,702
    Unless you're going to expose the DSL to modders, a fluent interface in C# would probably be quicker to implement, more compact, and less error prone. However, once you fully lay out the specs of what it needs to do, it's possible that a true domain-specific grammar will be a better fit, maybe something more functional and closer in syntax to Clojure/Lisp. Or maybe even just some kind of cellular automaton-like rule set. In any case, I imagine you'd want something that's succint but supports a wide variety of generated results.
     
  3. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Interesting idea. Are you familiar with anything that's tried/done this before? Someone told me Houdini uses something like this. I'm not familiar and that would probably be total overkill but there might be useful things to 'take' from it?