Game Development – A whole new area for Eclipse Modeling?

The Eclipse Modeling Project provides the world’s leading set of tools and frameworks that are used for successfully applying model driven software development techniques in various areas. Successful adoption are known in Enterprise Computing, Embedded System Development, Mobile Development etc. But what about Game Development? I have not heard about Game productions that use Eclipse Modeling or Model Driven Software Development in general so far. I cannot know about all projects in the world, but at least it is an indicator that this development technique is at least not wide adopted in the branch of Game Development.

Game Development is highly complex, developed in multidisciplinary teams under high time pressure and quality requirements. And the complexity is even growing, whilst time pressure also. Time-to-market is everything there. If your game comes too late, you are out. If you don’t use the latest technologies, you are lame. How could such projects ever be successful just by coding and hacking? I could imagine that game developers are just too busy with developing their games in a traditional way to think how they could gain speed and quality by applying software engineering techniques like MDSD.

I would not wonder if they associate MDSD with drawing UML diagrams and wasting time clicking and drawing useless stuff. Model Driven Software Development is everything else than useless. It helps raising the level of abstraction, speeding up development and gaining quality. If applied correctly, of course. Of course they think their kind of software development is special and completely different than other disciplines. But let me say, it’s not the case. Every piece of software has generic parts, schematic parts and parts that don’t fit into one of the previous sections. And for the schematic parts, MDSD can always help. Don’t tell me that a multi-million, mission-critical enterprise project is less challenging than game development.

One of the most promising things for game development can be the usage of Domain Specific Languages (DSLs), especially textual ones. With Xtext 2.0 the development of textual DSLs with tight integration of expression languages and code generators has become easier than ever before. If you don’t ever tried Xtext, do it!

On October 4th there will be an interesting workshop at the 10th International Conference on Entertaining Computing (ICEC 2011) in Vancouver, Canada. The “1st Workshop on Game Development and MDSD” will bring experts from both worlds together. The Call for Position Papers is running now, deadline is July 30th. If you are in one of those businesses, submit a propopsal or attend the workshop. I think both “worlds” can really win a lot from working together. This workshop could be a good start.

14 thoughts on “Game Development – A whole new area for Eclipse Modeling?

  1. I think they heavily use DSLs and specific models editors (albeit “executable models”, not codegen), because all those creative, non-techy guys that design the game play have to work.

    Blender: Graphical logic editor for defining interactive behavior without programming
    Cryengine: Experience our “What you see is what you play” and our “Live Create” features enabling real-time editing of multi-platform game environments simultaneously both in 2D and true stereoscopic 3D.
    Historically: LPC (Lpmud), ACS (Adventure Construction Set).

    If you look at youtube videos of the cryengine etc. this could be seen.

  2. I’ve considered this for a year or two as well. MDD would be ideal for game dev for design and build tools, but not so much for the games themselves, unless they are quite simple. With EMF the main problem is performance, how long does it take to load and iterate through a 100MB EMF model instance? I think something like mmap()-based EMF would help a lot in this area. I agree that most games already use their own DSLs, just perhaps not DSLs integrated into the wider metamodelling environment.

    • Performance and scalablity is also important for EMF. In the automotive industry, for example, you have models that have some hundred megabytes size that need to be handled efficiently. The Eclipse Sphinx project targets adressing these scalability issues.
      However, I am also not sure whether EMF is the good basis for games themselves. I was targeting the development of games, and good and efficient tools can help here.

  3. Hello!

    This is a very interesting topic. I have some questions, but you have to know that I started reading a book about EMF, so still I have no experience.

    I created already a few games for the iPhone/iPad using cocos2d (a 2D graphic engine), Objective-C and Xcode. And I spend almost all the time copying and pasting state charts code. I guess it should be possible automatize many source code, and using models would give me more abstraction level, and games would have a more rich game mechanics and logic.

    Do you think it is possible to use Eclipse EMF/GMF and Domain Specific Modelling to generate a program in Objective-C and using some libraries like cocos2d?
    Watching this video, it seems is possible to generate programs for the iPhone using Eclipse EMF:

    Another possibility maybe is using Metaedit+, because after reading this article:

    Click to access kelly.pdf

    seems EMF learning curve is too high and metaedit easier.
    On the other hand, I guess EMF have more job opportunities than metaedit, so maybe is better spend my time in EMF rather than Metaedit.

    What do you think, is what I propose possible with Eclipse (or metaedit) technologies?

    @author: You say “Domain Specific Languages (DSLs), especially textual ones” but creating complex state charts is easier in a graphical or visual way, isn’t it?

    @codingkriggs: How did you manage all sound and textures in your game and MDD? Do you generate your game using Java?

    • I just thought about it some more, and realized, it wasn’t the settlers of catan project I did in EMF/GMF. I actually did that one in my C++ class. I used OpenGL mainly. Sorry for that. (My undergrad work is all a big blur now. 🙂

      The class for which I made my EMF/GMF game was advanced programming practices (or something like that). The game was not the most pretty, and had no sound. At the beginning of the semester, we were given all the requirements, and I saw that GMF provided all I needed already: vertices and edges (the game was an axis and allies clone). It was a great calculation, as I saved a ton of effort. It was also a huge risk, because I never worked in either EMF or GMF before. But after using them, I realized just how well designed they were, and I became a big fan. (Well, I don’t do GMF stuff much anymore. I use EMF with text to model (XText), model to model (ATL) and model to text (ie. Acceleo, XTend2 <- here I haven't settled on a solution yet)).

      If I were to make a serious game with graphics and audio, I would consider using EMF for the modeling, to save a lot of time and get some pretty decent performance and especially a very *flexible* solution, but I would use a real graphics library, such as OpenGL, to render.

    • Hi Ricardo!

      Of course it is possible to generate Objective-C code, or whatever code you need, from DSLs built with Eclipse Modeling. Why I mentioned especially textual DSLs is because they are more familiar to “programmers”. Statecharts are of course a visual domain, but you could also easily describe them textually and render a view on it. See this blog:
      The code generator frameworks in Eclipse Modeling – Xtend (new with Eclipse Indigo), Xpand, Acceleo – are awesome and not comparable to other frameworks you’ll find in Metaedit, Visual Studio or wherever. Of course these tools also have their benefits, e.g. Metaedit++ is effective when you want to create a visual DSL.
      Taking state charts UML is also an alternative here. I don’t think that UML is the right way for modeling all aspects of software, and often DSLs are better here, but state machines are not that bad in UML.
      With Eclipse Modeling technologies you can combine all together. It’s some work, though.

      Best wishes,

      • Thanks for the kind mention of MetaEdit+, Karsten! While I’d agree that Xpand is great, and a long way ahead of Microsoft’s T4 or Eclipse’s JET, I’d definitely say that MetaEdit+’s MERL is comparable with Xpand. In fact, although they evolved completely separately and without even knowledge of each other for many years, the structure and approach is strikingly similar:

        Both Xpand and MERL have their own nice little extras, and there’s definitely scope for good ‘pub arguments’ over which is best, but they’re certainly in the same ballpark. And with the new MetaEdit+ Eclipse plugin:
        even being in Eclipse is no longer an excuse for not trying out MetaEdit+ and MERL :).

      • Hi Steven,

        How about the tool support for writing code generators? All template based code generator languages have more or less the same set of language constructs. I think what is also really important (besides the language) to write and maintain generators is tooling: Syntax highlighting, static code analysis, error detection, content assist, navigation, tracing etc. I hope to learn more about these features in MetaEdit+, I have to admit that I do not know much about it.


      • Hi Karsten,

        Many template-based code generators are missing what I would consider basic language features: support for generator modularization, output from one model to multiple files, one generator (and sub-generators) operating over multiple modeling languages etc. Those are things that set MERL and Xpand apart from T4 and JET.

        Of course MetaEdit+ MERL goes beyond these basics, with unique features like associative variables, dynamic sub-generator calls, and language-level support for translators. With translators, output text elements can be converted to the desired format, e.g. uppercase, no spaces, appropriate escapes etc. E.g. if you want to turn an object’s Name property into a legal variable name, you just write :Name%var, or to escape it for legal XML, :Name%xml, or for uppercase, :Name%upper. Translators are user-definable in generators, even on the fly, and are simple to define, e.g. “%upper a-z A-Z”. They can contain mappings like character->character, character->string, string->string, regexp->regexp output.

        On the tooling side, MetaEdit+ offers the things you mentioned:
        + Syntax highlighting
        + Static code analysis: the default view of all generators is a call tree calculated by static analysis on the fly
        + Error detection: on-demand, on save, and at run-time
        + Content assist: you can see the metamodel structure as you are writing the generator, and double-click in it to insert references into the generator
        + Navigation: you can jump from a sub-generator to the place that calls it, navigate in the call tree, filter generators by search terms/error/breakpoint, sort them by name, call tree, last modified timestamp etc.
        + Tracing: in addition to debugging (below), can set up own output streams for debug output

        MetaEdit+ also offers some nice tooling extras you didn’t mention (*=in 5.0, all others also in 4.5):
        + Debugging: full MERL source-level debugger with breakpoints, interrupt*, step into/over/out, breakpoints, conditional breakpoints*, view of all output streams, call stack, model navigation stack, live editing of variables and models
        + Live code: double-clicking a piece of text in the output code takes you to the model element that generated it
        + Build integration: generators can run external commands and MetaEdit+ internal commands, can be run from outside MetaEdit+ by command-line or API, and can read and write files in any encoding
        + Syntax-oriented editing: can view all MERL language elements and insert them with the cursor placed ready to enter the next element. Of course you can just type too, but some of our users like clicking more than typing – we are a graphical tool after all! 🙂

        There are more features I could write about, but this is already too long so I’ll stop here. I guess Xpand has most of these, except translators (could be written in Java but having a DSL and concise syntax is nice) and live code – and what’s the status of Xpand debugging?

        – Steve

  4. Pingback: Game Development – A whole new area for... | Eclipse | Syngu

  5. Hi Karsten,

    FYI, I submitted a position paper on this topic for the workshop today (the extended deadline) due to your posting. The paper was based heavily on the work I’ve been doing in this area for the past year, though it focuses on the work in principle, rather than the specifics and I had to prune out parts of the effort due to length constraints. If you’re interested in reviewing the paper prior to the workshop, I’d appreciate your opinion.

    Steve Robenalt

      • Hi Ricardo,

        If you go to the workshop web site – – the paper is available there on the workshop archive page. Send me a followup message if you have any problem getting it or if you have any questions or comments about the paper itself. I have continued to work in this area since then, but will probably not make it to the workshop this year.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s