#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    49
    Rep Power
    2

    Why are some PC game developers using C# with Unity3d to develop games?


    Why are some PC game developers using C# with Unity3d to develop games?

    There is a strategy game developer that is using C# and Unity3d to create their games. Do you think this is wise using a managed language, at the cost of performance?
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,297
    Rep Power
    7170
    The most performance intensive part of 3d games should be done on the GPU anyway through DirectX or OpenGL, so the language used for game logic has a minimal effect on that piece of it. The only modern game I've ever played that is CPU-bound is Minecraft.

    So yes, I do think it's wise.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    49
    Rep Power
    2
    Originally Posted by E-Oreo
    The most performance intensive part of 3d games should be done on the GPU anyway through DirectX or OpenGL, so the language used for game logic has a minimal effect on that piece of it. The only modern game I've ever played that is CPU-bound is Minecraft.

    So yes, I do think it's wise.
    So why do so many game devs use C/C++ then, if C# would be faster to code?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Usually Japan when not on contract
    Posts
    240
    Rep Power
    11
    Portability and existing in-house experience are probably the two main reasons C/C++ are still so prevalent. C# ties you to a Microsoft-specific runtime and set of libraries (as in, you automatically exclude the change of sales on Steam running on any other platform than Windows). Right now the market is fragmenting at an accelerating pace, so investing heavily in C# experience in house is not wise imo.

    E-Oreo is right, though, the performance-heavy parts of a game are almost always on the graphics/interface end, not the game logic or state maintenance of the system itself. Nearly any language with high portability and good OpenGL bindings is reasonable; the places where you wind up really needing to control how the bits flow can still be written in C (and would be even if the main language were C#). Using a language with better abstraction mechanisms than C++ is a good thing, generally speaking.

    From where I set games development in C# on Windows is just as short sighted as doing everything in Objective-C on Mac, despite the initial ease of development when targetting the host platform.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    49
    Rep Power
    2
    Originally Posted by zxq9
    Right now the market is fragmenting at an accelerating pace, so investing heavily in C# experience in house is not wise imo.
    Why is that? because they are likely to end up working for a firm that uses C/C++ anyway?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Usually Japan when not on contract
    Posts
    240
    Rep Power
    11
    Originally Posted by pditty8811
    Why is that? because they are likely to end up working for a firm that uses C/C++ anyway?
    I was speaking from the firm's perspective. Every time you run a project you are training and deepening your team's experience, and every minute your guys are trying to grok something new or use something from a new library is a minute of salary you are essentially spending for them to learn that new thing. It doesn't make sense to switch tracks after years of C++ experience at just the moment when the platform is no longer guaranteed to be Windows anymore.

    Games are hard enough to produce at the pace commonly demanded by the beancounters, even with an old experienced team that knows their language and libs inside and out. But you almost never get the chance to write a game with such a team, though, and a lot of time is often spent in development trying to locate the magic combination of existing but unfamiliar components.

    A very similar logic applies to individuals. Why spend time getting familiar with a development environment that is already rare in production at just the time when the market is about to be subject to a huge amount of platform instability? Every month you spend working in C++ is an extra month of current experience in that environment where you may learn new things. Same goes for libraries.

    My point is that once a developer gets past the "whoa! I can program!" stage and can write a non-trivial program in a language, he can pretty much teach himself how to be effective i any language that permits similar paradigms as long as he has access to a language reference (and especially if he's got a mentor). Environment and libraries, however, take a lot more time to learn than a language does, and switching from C# to C++ entails a huge shift in the set of available libraries at the same time it ties you just one platform for ever and ever. Both are bad, especially right now.
  12. #7
  13. No Profile Picture
    Offensive Member
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Location
    in the perfect world
    Posts
    622
    Rep Power
    27
    Originally Posted by pditty8811
    Why are some PC game developers using C# with Unity3d to develop games?

    There is a strategy game developer that is using C# and Unity3d to create their games. Do you think this is wise using a managed language, at the cost of performance?
    How much performance do you think it costs on your average PC these days (coding in C# compared to C/C++)?

    The answer is NONE (in most applications).

    Bad coding / design will cost much more in performance than using the .NET framework.

    There are many reasons why development is moving to C#.

    Biggest is the availability and cost of good C/C++ coders (compared to C#).

    Ease and speed of development are also good reasons to move to C#. (C# is strongly typed, memory managed, safe, etc)
    The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

    Frank Zappa

IMN logo majestic logo threadwatch logo seochat tools logo