miercuri, 6 noiembrie 2013

How to chose a cross platform engine/framework

I would like to make some games for Android/ios. Although I have a lot of experience using mvc ect application design patterns I really have no idea how to work with any design patterns for games other than like the loop and stuff lol.
I need an engine that is easier to learn, but will allow me to continue building my knowledge in this domain so I can understand game development better. (so I don't want something like corona)
Preferably I would like to be able to use Java or some similar language because that is what I am most familiar with and I haven't used C++ in a long time and was never very good at it anyway.
Also I have no knowledge of opengl whatsoever.
Cocos2D-X: Port of cocos2d-iphone in C++.
cocos2d-x is a multi-platform 2D game engine in C++, based on cocos2d-iphone and licensed under MIT. Now this engine has been expended to iOS, Android, Bada, BlackBerry Playbook, Marmalade and desktop operating systems like Linux, WindowsXP & Windows7.
An experienced Unity user would use Unity. The people who prefer unity over corona for 2d are generally experienced unity users. Take that into consideration. Unity, as you have heard, is a platform designed for 3d. There are a lot of features specific to 3d, e.g. if you want physics for a 2d game you need to lock the x rotation axis and lock the z translation axis.
Unity fortunately has a ton of extensions that make it great for 2d, so us experienced unity users, or users who plan on using more than just the 2d aspects, should choose unity given a 2d game to develop.
To sum it up, if you don't plan on using the 3d aspects of unity, go with corona or other 2d engines. It's built for the task and doesn't have an extra layer of complexity for features you don't need. If you do plan on doing 3d and don't mind a slightly larger learning curve so you only have to learn one environment, go with unity.
Marmalade, although it's not free and the developer community is also not large enough, but still you can handle most of the task using it's tutorials.
IwGame is a good engine, developed by one of the Marmalade user. It's good for a basic game, but if you are looking for some serious advanced gaming stuff, you can also use Cocos2D-x with Marmalade. I've never used Cocos2D-x, but there's an Extension on Marmalade's Github.
Another good thing about Marmalade is it's EDK (Extension Development Kit), which lets you make an extension for whatever functionality you need which is available in native code, but not in Marmalade. I've used it to develop my own Customized Admob extension and a Facebook extension too.
Marmalade now has it's own RAD(Rapid Application Development) tool just for 2D development, named as Marmalade Quick. Although the coding will be in Lua not in C++, but since it's built on top of C++ Marmalade, you can easily include a C++ library, and all other EDK extensions. Also the Cocos-2Dxand Box2D extensions are preincluded in the Quick. They recently launched it's Release version (It was in beta for 3-4 months). I think we you're really looking for only 2D development, you should give it a try.
Now I need to decide if to use IwGame or Cocos2D-X or both for development. Both looks great and interesting. Have anyone used these and can share experience?
Physics engine like Box2D and Chipmunks are said to be better linked with Cocos2D-x, however I've used them separately in marmalade project and faced no problems at all. So it's not a big deal to have a better linked physics engine.
To work on Cocos2D-x, you'll need to learn it first, while IwGame is not too complex to start. But once you worked with Cocos2D-x, it'll be easier for you to work on serious projects and you'll want to use only this.




Popularity of Game Engines
Let’s try comparing the popularity of various game engines which are popular on Stackoverflow, meaning at least 500 results from tag-based search queries. This reveals PhoneGap to be the surprise winner:

Is cocos2d-iphone more popular than Unity?
Good question. Probably not.
The above values only provide very rough estimates and there are a number of issues (see next section). In google searches cocos2d has the bonus of having many engine variants, which means more hits in search queries on the general term “cocos2d”.
One way to compare two engines more directly is by comparing the forum stats, at least this gives you an impression on how active the community is. I picked three engines whose forums provided these stats.
Since cocos2d-iphone’s forum doesn’t reveal it’s member count, I estimated it to 45,000 based on number of topics and posts in relation to member count of the other three forums. I’d say that’s very likely to be accurate within a range of plus/minus 15%.
It should be noted that the XNA community also hosts the DirectX and Direct3D forums. Seeing that Unity’s community has about two thirds of the members as the entire Windows game developer community is rather impressive. On the other hand, the Unity community seems to be a much chattier bunch compared to the XNA/DirectX community (more members, more topics but far fewer posts).
Whether that’s a bad thing or not is up for debate and would require. You’d have to pick a couple threads and see for yourself. Like companies or restaurants, each forum has its own culture and different target audiences.
Knowing that the ratio of registered community members vs “silent” users is usually far, far below 5%, we can estimate that there could be up to half a million cocos2d developers, and possibly 3 million Unity developers.
Considerations
Obviously, the sheer number of questions asked on Q&A sites has only indirect relation to an engine’s popularity. The forum topic and post counts are much better measurements. Why? Because the users of one engine may simply be more used to ask questions on a Q&A site than others. And users of engines that aren’t well represented on a specific Q&A site may be less inclined to start asking their questions there.
If an engine is not easily understood nor well documented, the number of threads on a Q&A site will likely be higher than for an engine that is easy to use, well documented and where users find outstanding support through official channels.
Google search queries then are limited to a specific keyword which may be over- or underrepresented for particular game engines. The use of brackets is also crucial, since searching for xxx game development vs “xxx game development” can change the number of search results from tens of millions down to a couple hundred.
Since search queries seemed to reveal greater accuracy with brackets, possibly rooting out a lot of SEO optimizations as well as unrelated terms (for example Unity, Torque and Corona are very ambiguous terms).
Lastly, keep in mind that some engines have been around for longer than others (cocos2d-iphone vs cocos2d-x) while commercial engines often have a google bonus because they typically pay for SEO, content marketing, press releases and other search rank optimizations.
Final Words
Don’t read too much into these numbers and comparisons.
Do use the same approach whenever you compare game engine and eventually have to choose one. Skip all engines that have neither a healthy community nor a frequent release schedule unless you feel fully capable of helping yourself if need be.
You should check more closely what developers are chatting about – if you find plenty of reasonable questions go unanswered, while developers rant about features on the fringe, and moderators seem to be non-existant or indulge in chit-chat, this gives you an impression of the support quality besides the sheer number of topics and posts.
You would also want to check other metrics, specifically the release cycle ie number and frequency of commits on github or release announcements.
These factors are just as crucial in picking a good game engine than the engine’s features themselves. That doesn’t mean you can’t find everything you need in a narrow-focused, newly-conceived, tiny-community game engine if it perfectly fits your bill. Don’t be foolish and consider only the top three engines listed on google or in other lists.
Do check out the engines on the fringes instead of opting for the popular choice – the most popular option is typically also rather difficult to master (Unity, DirectX, etc) though the learning curve does pay off if you want to do it for a living as either employee or freelancer
Cocos-2d lua
quick-cocos2d-x is a quick framework, based cocos2d-x. Make mobile games in Lua.
  • No risk: cocos2d-x's Lua support already exists two years, mature, reliable, the choice of large companies.
  • Full-featured framework: Write the entire game using Lua, no C++ requirements.
  • Native extensions: Integration of third-party components, including Payment, Ad, Analysis. Lua-ObjectiveC and Lua-Java bridge make life easy.
  • Enhanced Simulator: Run the game from any directory, multiple resolution switching, debug console.
  • 100% FREE: cocos2d-x, Lua, quick-cocos2d-x all is Open-Sources project. licensed under MIT.

Framework main features:

  • display: creates scenes, display objects, animation ...
  • transition: moving, fades, creates animation programing easy ...
  • audio: play background music, effect sounds ...
  • ui: creates button, menu, label ...
  • luaoc: Lua call Objective-C, Objective-C call Lua ...
  • luaj: Lua call Java, Java call Lua ...
  • network: Asynchronous HTTP requests, JSON, check the network status ...
Conclusion
I have a strong preference for cocos2d-x related choices because it is still very easy to use the platform specific popular APIs - i.e. game center on iOS, in app purchases, specific ads and so on.

On the other side it would be great to also have Lua scripting since it reduces quite a lot the time needed for prototyping and actual development, so I guess i will give a try to this kind of options first.