Monogame vs LibGDX for 3D development

Started by
3 comments, last by realh 8 years, 8 months ago
I love building 3D games and I usually build them natively in OpenGL on either iOS or Android but I want to focus my effect and do it on a cross platform technology.

I have played with Unity which is super impressive but for some reason it does not float my boat.

So I am looking for a cross platform 3D engine with support for object loading, animation, VBO etc

Both Monogame and LibGDX seem to be popular but most of what I read is always towards 2D games. Not 3D.

I want a minimum of iOS, android and desktop support of some sort.

I tried OpenGLView in Xamarin (forms) and this died horrible on android, it's has some real issues.

I also seen some issues with XNA performance.
Advertisement

I would probably refer to them rather as frameworks (altho I don't know much about LibGDX)

I know that anything you can do in DX11/OpenGL4.5, you can do with MonoGame (XNA was DX9 - where this is more like DX11+/OpenGL) - like a wrapper -- I've done 3D animated character stuff with it before (and used new shaders). Yeah, it's odd that not very many ppl use them for 3D - although 3D xna tutorials for example, will work exactly the same way (except it's faster now and you can use new shader models).

I don't know much about LibGDX so someone else should probably speak for that one. I've heard it is also very good but I don't know if there are any limitations.

I would be VERY suspicious of anyone saying there are performance issues with MonoGame - at least I've done my own benchmarking and found it compares extremely close to DX11 in C++ on desktop. FAST. Maybe the old versions had some issues? I don't know - that could be it.

The only way I could see that happening is not knowing how to program c# for performance(pools, garbage collection, locals, etc) or how to minimize locks and changes when accessing the video card. It isn't essential to use the provided methods either - as you can make your own primitive rendering stuff. I've heard you can use bullet for 3D physics too if you didn't already make your own. I think I'll go play with libGDX just for fun now too.. laugh.png

I would not classify MonoGame or XNA as engines, although the term has such a wide variety of meanings that pretty much anything short of OGL or DX can be considered an engine. But they are much more rudimentary than Unity or UDK for example.

MonoGame and XNA are for all practical purposes the same thing. XNA is no longer supported by Microsoft and MS has officially given the blessing to the MonoGame team to take it over. MonoGame is the new XNA. There are some differences. For example, MonoGame is cross platform and XNA is most certainly not. MonoGame is built on DX11 and XNA was built on DX9. MonoGame is built on SharpDX from what I understand.

I've used XNA for 3D for years and never noticed a performance problem. I'm doing DX11 now and if anything I find DX11 to run a little more slowly although I've never precisely measured it and that's the performance with a debug build and not the release build. There's obviously going to be some "overhead" performance wise for using managed C#.Net as apposed to native C++ and you have a very thin layer between you and DX. But whatever performance hit you take is not enough that I've ever perceived it. Unless you are a highly seasoned pro, you're not likely to really make use of the performance advantage of one over the other. As you are learning over the first several years, I can vouch that any performance hit is going to be totally irrelevant. I've been at this several years and have never seen XNA code that did not perform well unless there was a bug and I was doing something wrong.

XNA and MonoGame are an excellent platform to do 3D on. I've done very little 2D on them and have been using XNA for 3D for many years. Even now that I do DX11 I don't feel like there's much of a performance advantage with DX11 over XNA/MonoGame.

MonoGame/XNA is much lower level than Unity or game engines such as that. It is much closer to doing DX than it is to Unity. I'm just now starting to try OGL and I find OGL is reminding me a lot of XNA as I get started with OGL. OGL uses a lot of libraries to setup a window and a process and handle keyboard and game controller input and maybe even do things like handle models and such. By the time you get all these libraries going, it's starting to be a lot like MonoGame/XNA. With DX I don't use any libraries and handle all that super low level stuff myself which makes it very platform dependent.

Java/libgdx has two advantages over C#/Monogame. The latter requires Xamarin to run on Android and iOS, and that's expensive. I don't know how good RoboVM is, but at least it's free, and there are no problems with getting Java to run on Android of course.

The other advantage of Java is that you can use IntelliJ which is free, excellent and cross-platform. I presume even Visual Studio is inferior in its vanilla state otherwise Jetbrains wouldn't be selling Resharper. For Linux or OS X the recommended IDE is MonoDevelop, which is pretty basic in comparison with IntelliJ. Vim users would probably be better off sticking with that, using youcompleteme with omnisharp enabled. vim+ycm is really rather good.

One thing Java lacks is a well-established 3D engine that isn't tied to an all-encompassing framework. The 3D engine in libgdx seems a bit experimental still, and I just didn't take to its API for some reason. I'm thinking of trying to write a renderer or family of renderers and texture loaders for Parallax3D so it can be used with Android, LWJGL, libgdx or whatever. Parallax3D is a sort of reimplementation of the very popular three.js API in Java for use with GWT. To my surprise I found it's reimplemented the whole thing in Java, whereas I was expecting it to be mostly JNSI wrappers over three.js. So the developers are really missing a trick by tying it to GWT I think. They also use a Creative Commons licence for the code, which is kind of weird.

This topic is closed to new replies.

Advertisement