Unity or LibGDX for beginning 2D games

Started by
2 comments, last by Christian Tucker 10 years, 5 months ago

Hi, i've been learning bits and bobs of programming for a while now and finally want to get my head down and make something. I've looked around at various game libraries for one that would offer the most and be cross-platform and i managed to find LibGDX to fill all these needs. I was learning LibGDX for a while before i realised Unity3D could be used to made 2D games (which is my main focus at the moment, but the added 3D would be an added future bonus) and i was wondering how Unity3D fared against LibGDX on the 2D front?

Mainly my requirements are: ease of use/ease of learning, flexibility, speed of development and general usefulness.

I would also like to know if C# has significant advantages over UnityScript in Unity as other people have said about having problems with UnityScript and how much difference there is between C# and Java?

Advertisement

I don't know LibGDX, but I do know that using Unity will also reap other benefits over an only 2d API, and even over other 3d engines.

One, you mention the 3d as well. It is an added bonus, and in fact can be used to make your 2d better. Also, if in the future you want to make something fully 3d(gameplay too) you already know Unity3d so don't have to learn anything else.

Two, Unity is a commercial closed source project. This can be good and bad, but on the good side, there is a massive company behind it, which means that things are constantly getting added and approved. I can't say that the path of improvements they make are always what the community wants, but at the least we know it isn't going anywhere anytime soon. LibGDX, being open source, doesn't necesarily mean it will go under soon either, rather it is simply more likely than in the case of Unity. Then Open Source does have other advantages though.

Unity and GameMaker have one thing in common, though in different ways. They are "quirky" as in there are sometimes things that you just do the way the program says, not the way you may think makes more sense. The UDK has this problem too. In Unity, the recommended method for having objects know about other objects is to create public variables in your classes and drag&drop them. You can also use the find functions, but they are supposed to be pretty slow so are not recommended. There are other things too, but I don't remember all of them.

As far as C# in Unity, there are indeed a few things that UnityScript is lacking compared. Delegates are one thing, but frankly, though there are a few things, from what I've seen in forums, there isn't anything that jumps out heavily that would make a big deal. Remember that they get converted to the same .NET code on the backend so it doesn't matter much. Many people can use either one, though if you are more comfortable with one or the other, it makes more sense to use it then to worry about the other having a feature that this one may not.

If you have a budget, and believe you are only going to ever be interested in 2d games, you could look up GameMaker Studio. The price of the Master Collection is about to go from $499 to $799 in a few weeks, but if you were to want to export to all the mobile systems and desktops, GMStudio does it, assuming you purchase either the master collection or the specific module you want. One good thing about it is that it tends to be much easier than Unity3d to use, mainly for 2d though, but since it has the gml scripting language(similar to java/C/C++/delphi), you can still do pretty much anything you want to.

Unity has some advantages over GMStudio though, especially recently, and not only in the 3d side of things. They have recently upgraded the free side of Unity. It now includes some mobile exports for free, and a couple of paid features are now free, at least partially, like hard shadows from one lamp.



I started with LibGDX about three weeks ago. I don't know much but I have already sprites bouncing on screen, different levels and other fancy stuff. As a beginner with the game programming I think I stay with 2D for a while. Less work, more games.

I would recommend staying with LibGDX, you'll be learning much more and you'll be writing everything out yourself. LibGDX is also 3D Capable.

This topic is closed to new replies.

Advertisement