Dienstag, 18. Dezember 2012

First Experiences with MGD


as promised we will now start to write about our experiences with Mobile Game Development, especially with the help of Corona SDK.

Well, we were new to this field, but we had experiences with 3D-Game development. So our first thought was: "lets use Unity3D". It's actually a very easy to use 3D-game development environment and is easily able to work together with Open Source 3D-Modeling applications like Blender 3D (http://www.blender.org/). Another advantage ist, that you can use c# as the programming language for your game logic. C# is one of the best object oriented programming languages that I know and we had a lot experience with it. However, after a while of comparing development costs we had to admit that Unity 3D ist just too expensive for students like us. Even the student pricing was way to high for us. If I remenber it right, we would have to pay more than 1500$ for 2 licences and the required plugin to delevop for Android devices. iOS would have cost additional 250$. Still we development a little demo app to test the performance and the workflow. It was fastly created, but as we were aiming at targeting standard smart phones the handling of 3D applications seemed too confusing and just not appropriate for a small mobile device screen.

So at first, we were a bit disillusioned, since we really wanted to develop 3D games. There we would be able to apply our cumbersome aquired 3D game knowledge. So what should we do? After a while, we tried to identify appropritate 2D development environments. After some research on sites like these http://mobilegameengines.com/android/game_engines we encountered Corona SDK. Of course every vendor claimes to have the best solution ;). But this had to be verified! So we downloaded corona sdk. The first problem that we encountered was that there was no standard IDE (Integrated Development Environment). Included with Corona SDK is the so called Corona Project Manager. The tool is usable, but very low level concerning functionality: no code folding, no code completion, no subversion support for teamwork, no detailed code analysis, no refactoring. Some simple issue that we didn't like was that standard variables were not highlighted. That makes it really difficult to effecieantly scan your code for error or to understand code from others easily. Still, for just trying to get familiar the Corona Project Manager is a good choice. It fast and easy to use, since there are just a few options. Nevertheless, we are now using another free soltion, which is way better. But this will be covered in another post.

After 2 weeks of playing around we decided to use Corona SDK. Not only because it's 2D, but especially because the documentation is extremly good (http://developer.coronalabs.com/reference/index/). I've never seen a documentation that makes it so easy to digg into a foreign API (Application Programming Interface). A further pro were the costs. We were able to develop for Android, iOS, Kindle and nook for around 300$. That's a fair price, considering the possibilities it offeres.

The programming language of Corona is called lua and enables cross plattform development since you are not developing in a specific platform dependend language. The lua code is translated for each platform automatically when deploying.

After two Month of developing with lua I can already draw the conclusion that it's negative sides, but also has atvantages. For me, as a educated object oriented programmer it was really unpleasent to work with the NOT object oriented lua. For some reasons some people claim lua to be OO. But it's definitely not. It does not specify any class structures and does not automatically offer typical inheritance. However, it is possible to  use OO-ideas and to pull them over lua. That works, but often it leads to erros, because the language is simply not build to be OO. To some extend we are now working with OO ideas, but we learned to to exxagerate. This seems a good balance so far. Now it might sound that the absence standard of OO-concepts is solely but. This is not true. Because the language is so free you can nearly do whatever you want. This offers new flexibility. Especially for people that don't have a lot of OO experience, it is pretty easy to create you first simple games. Just because you don't need to think about all the OO stuff. But, in contrast to typical OOP langauge you have to think about script language issues. For example it is not possible to use a function in your code that is defined later in the same file. It need to be defined, before you use it. in none-script OOP languages you don't need to think about that, because the whole code is compiled into Bytecode in the right order automatically.

Still i would prefer a strictly OOP-language like Java or C#, because it makes code much more reusable, maintainable and clear. Despite the cons I would recommend Corona SDK. A good documentation and a easy programming language are worth a lot, as long you don't want to create extremly complicated games.

We hope this gives you some interesting insights. More articles will follow.

Your Moccagame team

Keine Kommentare:

Kommentar veröffentlichen