Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Building proffesional 3D apps on the mono framework.

Discussion in 'General Discussion' started by techmage, Jun 26, 2011.

  1. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    I ask this to anyone who knows, and I'd really like to get some comments from unity staff themselves.

    I am curious to know what thought process went into the decision to build unity on top of Mono? Do you think Mono is really an ideal platform for 3D applications?

    I am also curious to know does unity use GTK+ as a gui toolkit or did you guys make your own?

    I am personally looking to start on the creation of some standalone 3D tools, I would of never in a million years thought to build it on top of mono, or on top of .NET even. But Unity is one of my favorite applications, and I have to say both Unity and MonoDevelop have a great feel to them, so this is really making me consider mono as a viable choice.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Unity isn't "built on top of Mono"; rather Mono is used for scripting. Unity is coded with C++, and doesn't use GTK+.

    --Eric
     
  3. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    Oh I see. I didn't know that. So Unity is like it's own separate thing, and they just made a wrapper so that mono could call functions in it?

    I am still curious to know, why .NET and Mono for a 3D engine? Unity is the only 3D app I know who uses .net for it's scripting.
     
  4. jeffro11

    jeffro11

    Joined:
    Jan 7, 2010
    Posts:
    185
    Just going out on a limb here. Why reinvent the wheel?
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
  6. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    So mono really is considerably faster than Lua or python?

    I find that interesting because cryengine 3 uses lua. I wonder why they wouldn't go with mono as well... If mono really is the fastest multiplatform scripting language, seem like more things should go that way?
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It seems to me that most engines use scripting basically just for simple state systems, and "hardcore" programming is done with C using the game engine source code. So overall it doesn't matter that much if the scripting is relatively slow, because it's actually not called very often in the context of running a game. If you read the scripting docs for these engines, you see that they encourage you to do what you can to make sure your scripts are run as little as possible.

    Unity blurs that line significantly, to the point where (for most people) it doesn't actually matter if you have the source code for Unity, since you can implement most things very effectively using scripting. Like Unity's terrain engine, which is done with scripting. In this case it obviously matters a lot how fast scripting is, since you're using it for far more than simple state machines, and you may very well be running hundreds of lines of code per frame (or thousands if you count loops).

    --Eric
     
  8. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
    Lua is a standard in the game industry (standard are not always the best). It mean that many Game designer know LUA.
    Lua take a lot less memory than .net.
    With all modern engine, you do most of the work in C++, and expose very high level fonction in LUA -> you don't need excellent perf.
    In Unity you usually do everything in scripting -> you need excellent perf

    Lua lib are very small ( less than 1Mb ?)
    You need at least 2 or 3 time more disk space for .net.

    Pros and cons for every choice.