Re: My thoughts on C# and gaming.

Douglas Cox <[email protected]>
Newsgroups gmane.games.devel.sweng
Message-ID <[email protected]>
>
> Nice thing with C# is that there are many, many people maintaining
> frameworks, compiler, runtime environments and debugging tools. For Lua, the
> number is less, but still sufficient. Not-so-nice thing about C# is that
> most maintainers don't have low-latency real-time applications foremost in
> their minds.
>

This was our issue as well, along with being able to support existing C/C++
libraries easily.  So we simply(?) have been building our own version of a
C#-like language and compiler than can either generate C++ code or script VM
code from the same source file.  The goal is to have the flexibility of a
scripting language for working on our Editor and GamePlay code, while being
able to easily move common or important script (AI/etc) over to the C++ code
directory near the end of a project and have it compile to C++ and let the
compilers optimize it from there.

Yes, we lose all the existing C# framework, but we've got a huge code base
to pull from already (~10yrs) and we're doing a few things that would
require work-arounds if we used C# and .net anyway.  We also tend to make
different types of games, from platformy kids games, to 2.5D sidescrollers,
to 3D action/shooter games so we tend to need a fairly generic engine, and
decreasing iteration time is very important.  So while I think this strategy
will work out well for us in the end, I don't see that most people that are
focusing on one type of game and potential sequels would need to do this.

Doing this does have advantages over using Mono or .Net, in that we can fine
tune memory allocators and garbage collection to what we want vs what
someone else decides to do (see XNA on 360's GC for a reason of why this
will be nice).  And we reduce some overhead by not including language
features that we do not need (LINQ/etc).

And yes, we thought about and played with Lua, and several other scripting
languages for a while, but none met all our goals.  Just saying "Bad
gameplay programmer, don't do that in script because it's too slow" hasn't
worked so great for us over the years.  So this was also a way to solve that
issue more easily.

-Doug

_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.