views:

206

answers:

4

I'd like to program a .NET app that provides a 3D render of an animated world. I'm coding on a Windows PC, but many of my target audience will be on Linux.

There are a bunch of frameworks out there that look useful, categorised into high and low level as best I can:

Low Level Graphics

Game Development Frameworks

Are any of these non-contenders? What have you found to be the best option and why? I'm looking for any insightful comparisons, and recommendations for/against. Some of these claim to work as XNA substitutes. Does this literally mean you can deploy to Win/Mac/Linux as well as Xbox? Is there a catch?

I'm not yet familiar with OpenGL/DirectX/XNA APIs for 3D graphics. Are any of these easier than others to work with? Do you lose any flexibility/power/performance due to higher abstraction levels?

Note that I won't have access to a Linux machine for a month or so, so I won't be able to test my development on Linux (hence this question).

EDIT I found this table which adds a few more to the list. I've merged them above.

EDIT 2 I'm leaning towards Axiom. It gives a pretty rough landing, but shows real promise in terms of features. Here is a great summary article with user reviews. But so far the beginner documentation and sample projects are pretty hard to make use of. Tutorials all reference different versions of the API, and they all recommend you use different base classes (not included in the API) to get started. Certainly not designed with the Pit Of Success in mind, but still promising.

+7  A: 

Maybe not quite what you're looking for but, Unity3D is a cross platform 3D gaming environment which is based on Mono, which means that you can code the bits you need to in C#. There are indie and pro versions with the indie version being free. http://unity3d.com/

Ira Rainey
Have you worked with this before? Do you have any reasoning to your answer? What does this API offer over the others listed?
Drew Noakes
I've dabbled with it. The thing is don't get Unity confused with other code API's. This is a complete game authoring environment, which just happens to be based on Mono. Not the same as an API you would use in your own code.
Ira Rainey
By _environment_ do you mean authoring and runtime tools? Is this something that's actually useful for me as I already have all the models and structure, I just need to render it somehow?
Drew Noakes
Yes I mean exactly that. Go download yourself a copy, the indie version is free so you have nothing to lose.
Ira Rainey
Bummer though cross platforms here means 'Mac and Windows'.
Dykam
Or browser-based, or if you want to stump up cash if you're more serious about it then the same game can also be built for iPhone, Android, and if you're really serious, Wii.
Ira Rainey
I'm not actually making a game. It's a visualisation for a simulation that currently has majority users on Linux, but I'm strongest developing for Windows/.NET, hence this question.
Drew Noakes
I'm afraid that because Unity doesn't support Linux it's not an option. Shame because it looks great -- I guess you get what you pay for. Shame too because your highly voted answer makes it look like the case is closed on this question!
Drew Noakes
How is it that being based on Mono, but designed excluding from being run on Linux?
Blessed Geek
Yeah, like I said it might not be what you're looking for. It is a cracking tool, but just doesn't fit your bill this time.
Ira Rainey
@h2g2java, the Mono part is really only the configuration engine, that is, how you can plug in your own code. The graphics core is all C++. And the Unity.Net framework shows clear signs of a lot of methods directly poking into a C++ backend.
Dykam
+2  A: 

I'd second the idea to look at Unity, which if I remember rightly uses C# as a scripting language to let you write the game code (using Mono), allowing the actual rendering engine and so on to use native code (presumably C++).

Otherwise, I'd be wary of using Mono for anything like 3D graphics or other 'hard core' uses... anything involving GUI or rendering I'd be nervous. But that's my personal choice, if you've time to spend researching it might be worth throwing a prototype together... but i would not write a lot of C# code without the ability to test it on Linux very early in case there are big issues.

John
Agree. Last time I checked Mono had quite a bit of catching up to the Windows version and had a lot of missing functionality. NASA World Wind was a pretty big 3D app written in C# but since managed DirectX was killed I guess they switched over to Java and JOGL.http://en.wikipedia.org/wiki/NASA_World_Wind
daveangel
@John: What does unity give me over a directly OpenGL wrapper such as OpenTK? And I think you're right -- I'll find a way of testing an early version on various platforms as soon as possible.
Drew Noakes
As an aside, Mono does have some 'hard core' stuff in it that MS CLR doesn't have. For example, SIMD support. I think that Mono is capable of running complex things, but it might take more work as it's got rougher edges than you might expect on Win/MS CLR.
Drew Noakes
@Drew - Unity is a full (or part) game engine as I understand it. So lots of extra stuff, common things you can reuse like resource-loading and stuff (I'm not an expert). It also has browser-deployment options.
John
By hard-core I mean more like anything not the central core, like GUI. For a server app, Mono is probably very stable but I don't know what parts it supports beyond that. Personally cross-platform C# would be great, I love it as a language.
John
Unfortunately Unity doesn't support Linux so it's not an option for me. Do you have any other suggestions?
Drew Noakes
Are you certain the web deployment doesn't work on Linux? If not, then I'd revert to my "don't use .net for cross-platform games" position.
John
+1  A: 

You might look into using Qt and OpenGL. I imagine, however, that OpenGL is probably too low-level (read: "needlessly complex") for your particular needs.

TreDubZedd
OpenTK seems like a sensible wrapper for OpenGL, but I'm not clear on what kinds of things higher-level APIs provide. Or asked another way, what makes OpenGL low-level?
Drew Noakes
With OpenGL, you're dealing with your scene at the level of individual vertices and matrix transformations. Other libraries provide a higher layer of abstraction, removing the need to understand many of the basic 3D constructs and concepts.
TreDubZedd
Well a few days on now I have a better handle on OpenGL and although I'm glad I spent the time learning it, I think I'll get more development bang for my buck if I use a library. Primarily, I want textures that degrade nicely with different hardware support levels, and shadows. Everything I've seen on shadows so far is ok in theory, but gets tricky in practice. Would you recommend any higher-level frameworks that run on top of OpenGL?
Drew Noakes
OpenGL support on windows is also a little dodgy. The SDK that comes with Visual Studio is OpenGL 1.1 released in 1996! You can get around it but it makes everything more complex - http://www.gamedev.net/reference/articles/article1929.asp
Nick
@Nick: Recent support for OpenGL is why I recommended Qt (completely ignoring OP's preference for a .Net app).@Drew: I'm afraid I haven't had much interaction with higher-level libraries. I've heard good things about both XNA and Ogre, though.
TreDubZedd
Cheers @TreDubZed, I've been playing with OpenTK (a .NET wrapper for OpenGL) and Axiom3D (a native .NET port of Ogre) which seems great though a little crufty. Your comments are encouraging.
Drew Noakes
+2  A: 

Use OpenTK

  • It's OpenGL It's platform independent. It's strongly typed
hkon
I'm running with OpenTK for now. Seems fine. Have you used it or did you get that bullet point online? Interested to hear how others got on with it. It's pretty low level (which is the point) and begging for higher-level abstractions to be made for productivity's sake. However the right abstraction depends upon what you're doing and so far I haven't found any that quite suit what I'm doing.
Drew Noakes
I did not get it online. I'm using it right now for a hobby-project. Been a while since I did OpenGL and OpenTK was a refreshing surprise to use. The strong typing is a blast really.And yeah, you're pretty much on your own when it comes to creating the "engine". If you go to the OpenTK site, there is a blog sections where gems turn up on occasion.
hkon
So far I like OpenTK, but it's quite low level. The community on opentk.com are great too. Have been looking a little at Axiom3D too. Some nice examples about. Any reason you didn't go for a higher-level system?
Drew Noakes
I studied OpenGL a few years back, I want to get to know the new version.
hkon