Slashdot Mirror


Toolkits for 2D Animation?

profBill asks: "I work in the area of complex adaptive systems, that is understanding the emergence of complexity from the interactions of many elements (immune systems, economies, ecosystems, etc.). In particular we are using evolutionary computation to create elements/creatures that can co-exist in an ecosystem with certain interactions and relationships. All that is very interesting, but in the end, assuming we create such creatures, I have to show them to the ecologists and biologists so they can understand what is going on. The only way I can imagine doing it easily, other than with graphs and charts, is to create a 2D animation of the creatures and their interactions that these folks can watch. My problem is that there are so many choices for a toolkit to build such a 2D animation. My goal is not a movie of ILM quality, but something 'good enough'."

"'Good enough' for me means:

  • Quick and dirty, that I can tune as needed.
  • Zoom capability on a grid
  • Pop up menus on any one grid element to get information.
  • Scrolling, resizing, the typical.
  • Be able to hook to a C/C++ program to get a creature's behavior
What would you use to build such an animation?"

3 of 21 comments (clear)

  1. Flash would work, right? by joFFeman · · Score: 1, Insightful

    With Macromedia's Director (there may be a new name for the MX version), you can basically construct entire applications. You could integrate pretty much any application with it. The fact is, flash is going to be the best way to create part of it, even if you don't construct the entire program with it. The portability is another plus. Maybe a hybrid of java and flash would be in order if you're looking for ease of coding coupled with a reasonable amount of power and portability.

    --
    "Life is great; without it, you'd be dead." -Harmony Korine
  2. The obvious answer by MarkusQ · · Score: 3, Insightful

    Q: What would you use to build such an animation?

    A: A programming language. Say, C or C++?

    Seriously. Consider your criteria:

    Quick and dirty, that I can tune as needed.
    So to produce a frame, you have each "creature" draw themselves if they overlap the present view area. The detail of each creature's "look" is local to that creature, so you can tune/tweak it at need. Done.

    Zoom capability on a grid
    The "present view" data includes a view-center and a scale factor, which all the drawing primatives use to translate from world coordinates to screen coordinates. Clicking on a point on the grid may make that point the new screen center and increase/decrease the scale factor, depending on which "tool" (the magnifying glass, etc.) the user has sellected. Done.

    Pop up menus on any one grid element to get information.
    Trivial. When the mouse hovers, or they right click, or press control-yada-yada-cokebottle, or wahatever, pop up your menu. If you also want information about each creature, use a (perhap subtilly) different colour for each creature and check the colour of the creature under the mouse to determine what to pop up. Done.

    Scrolling, resizing, the typical.
    Done.

    Be able to hook to a C/C++ program to get a creature's behavior
    Done.

    It shouldn't take much longer to write than it took to ask the question, or to answer it.

    -- MarkusQ

  3. Qt anyone? by Anonymous Coward · · Score: 1, Insightful

    Funny you should ask this question...

    I just coded the front end to a networked AI simulation with creatures that play, eat, interact, etc. I basically did everything you said you wanted...2d grid with mouse zooming/panning, tweakable creatures, interfacing with c++ AI and network packages. Did the whole thing using Qt's 2d graphics library...was generally quite straightforward (albeit not the fastest). If you can deal with c++ coding I'd recommend it highly.

    Info can be found at http://www.trolltech.com