Demoing Mono in Games

I'm trying to plan some examples of using Mono in game development, so that we have time to get together some solid demos and samples for next year's GDC.

I'm primarily interested in showing how Mono fits into the existing games development ecosystem; we don't really have an XNA-like story for developing fully managed games in Mono at this point. The focus of the demos will therefore be:

  • How easy it is to embed Mono into a game and use it for scripting and gameplay programming.
  • How the Mono and .NET development tools make development faster, easier and more robust.
  • How Mono's performance compares to popular scripting engines such as Lua and Python.
  • (Possibly) using Moonlight as a Mono-scriptable, artist-friendly UI engine.

Does anyone know of any complete games or cool demos for which source or C/C++ SDKs are available, so that Mono could be embedded as a scripting engine? (I'm already considering Source Engine and Quake 3).

Nice ideas for demos would be useful too, though obviously developing a serious game from scratch is out of the question...

Comments

Older game that might fit the bill

Back in I believe 1997, Virgin Interactive Entertainment released a massively multiplayer online top-down space shooting game (Essentially multiplayer asteroids) called Subspace. The game has long since been abandoned by corporate entities and several years ago, to address security concerns with the protocol, a new client called Continuum was written (by one of the guys who ended up working on KaZaA and Skype). The client is closed-source but a replacement server has now been written as well which would be where the embedding would happen. It's cross-platform and written in C, with limited Python embedding (might be convenient if you wanted to do comparisons) as well for a subset of the functionality. I tried a while back to get embedding working but was in way over my head. It's a pretty neat game, I've been playing and developing this and that with it for about five years now. It's entirely community run and still has a cult following of over a thousand people from around the world. What I like most about it is that there's always plenty of things to work on in a variety of mediums. This was a very brief overview, if you have any questions you can direct them to me, the forums I linked above, or these as well.

Interesting

That's an interesting idea; I wasn't aware of that game. It's a shame the frontend's not open (or prettier). I'll keep it in mind as an option.

full game

Hi,

You said that build a game from scratch is out of question.

I do not agree. I have work for 3 years on a dark ages of camelot server emulator and it was not that bad.(dolserver).
For performance point of view, we have axiom3d the rewrite of ogre3D engine ( not a wrapper) which show very good performance.
http://sourceforge.net/projects/axiomengine.

olivier

We don't have three years

I appreciate your optimism, but we don't have three years — we have until March to prepare demos and samples for the GDC...

Even so, you're right that with things like Axiom and Ogre it's probably not so hard to put a game together these days. The main problem for us is art/design. We essentially want to demo something quite technical, and the game itself is tangential to that. We just don't have the resources to develop a game concept, models, levels, etc.

Mono is great. It works well

Mono is great. It works well for me.

Hey, You might have already

Hey,

You might have already googled for this by now based off the above comment, but OGRE .NET purportedly works for Mono.

I don't see why you can't make a complete game, although it would need to be pretty limited and simple, in less than a week or two with a skilled and dedicated team of about 4 or so (a game with a simple concept, a few game entities, and either a single level or procedurally/randomly-generated ones). You're being a little vague saying you want it "technical" and the game is "tangential", do you mean you basically just want a techdemo to show some flashy graphics at impressive framerates? I'm a bit of an outsider to the "I can afford to buy a $1,500 PC every other year" crowd, but I think graphics over gameplay is just plain stupidity. That's okay in this case; your objective is to showcase technology, not design. It actually works in your favor: a lot of game development goes into making a deeper gameplay experience, filling out all the thousands of details, and making it all stable, whereas it's okay for your game to be superficial. You could overcome the art limitation by just creating procedural content, or recruiting a 'real' artist to create just a few really good models, with all the possible bling (bump mapping, bloom, HDR, blah blah blah) the engine can provide added. It sounds like when you think of "a serious game from scratch" you think you have to create Half-Life 2, Crysis, or what-have-you from scratch... that's definitely not the case, just keep it simple. If you consider Galaga or Asteroids a "serious game", then you have nothing to worry about.

This is just an opinion, and you can entirely disagree because the libraries probably aren't on par with the 'batteries included' level of maturity XNA has, but I think it's unwise to advertise C# as a scripting engine versus a language you'd actually code your game in. C/C++ is ancient, hard to use versus the alternatives out there, easy to write buggy and unstable code in, prone to constant and embarassing memory leaks / crashses, and generally seems to only be kept around because it will produce the fastest possible executables. Since games seem to be about pushing the graphics/hardware envelope, C/C++ is the only feasible language. The success of casual / independent games and the skyrocketing cost of game development (yeah, I know, it's mainly about content creation, not coding) makes industry types eager to find quicker and more reliable means of development, and C#/.NET/Mono could be a competitive solution to C/C++ if you present it right.

I agree

I agree with pretty much everything you said. Our aim is to demo Mono in the way that people would want to use it, and the gameplay is certainly less important than demoing the tech.

However, pretty stuff always impresses people even if doesn't improve the substance (which in this case is the Mono tech, though in real games it's the gameplay). FWIW, I don't consider "good" graphics to be made by the graphics tech; that helps, but it's mainly the artists' skill that matters. Maybe we just have to find artists.

As I see it, there are three broad use cases for C#/Mono in games:

  1. Writing the whole game in managed code, e.g. using XNA, Tao, Axiom etc.
  2. Using mostly managed code but with performance-critical components in unmanaged code, e.g. using Ogre.NET as a rendering engine.
  3. Scripting in an otherwise unmanaged game engine, in the sense that things like UnrealScript and Lua are used today.

If I were writing a real game myself, I'd probably use #2. However, in this particular case we're trying to demo #3, since that's the most immediately attractive market right now. I'm actually considering making two demos: a simple game using #2 and a trivial embedding sample of #3.

I use Mono my game scripts.

I use Mono my game scripts. I've never had a problem with it.

[Admin: edited to remove spam]

Not excactly open-source

Hi, it is not excactly open-source but Unity (unity3d.com), a game IDE, makes use of mono. There are definitely some nice show off games in their gallery.

I've actually met the Unity guys...

Unity is very cool, but we basically want to show how it's easy to put Mono into a "normal" game development process, even if you're not using an engine that supports Mono already. Unity does all the mono integration for you :-)

Here are a few

everyone loves frozen bubble!

I think there's a graphical rogue-like game for gnome

Tux racer?

I'm not sure how Mono could fit into any of those

I'm not sure how Mono could fit into those, but I am a fan of Tux Racer and Frozen Bubble. I've actually shaken off addictions to both ;-)

Battle for Wesnoth

Battle for Wesnoth could be such a game. It's written in C++ and is open source. Additionally scripting would be cool there (AI ...).