I am new in cocos2d development. I developed some stuff on andengine on Android and I know C++ language. Now I want to rewrite some stuff from andengine and make it available to iOS as well. I am reading and reading and testing from couple of days, everything is just ok, but few days ago I explored Lua. I adopted language semantics, wrote some scripts and realized that in Internet there is a lot of usage of this language. It is so common that I cannot believe that I know about it from couple of days. So I thought that would be nice if I try to use it. I have only few questions for now.
Can I load some Lua scripts and use it in my cocos2d-x game (written in C++)?
What is the difference between cocos2d-x 2.x and new 3.x beta branch (about Lua treating off course)?
I think about Lua only as way to implement AI for now (is this so good idea or not necessary?). I think it could be good idea because it is portable and I can use very the same AI algorithms for different platform (andorid, iOs, windows, linux, web...).
Please just give me some light about usage of Lua in cocos2d-x, because I cannot find any sense tutorials. If there is something the headers are bad, or version is deprecated or something else which is really annoying when you have no clue how to use it.
Maybe better is to write entire project in lua?
In short:
Yes.
What do you mean?
It works.
As LearnCocos2D suggested, they cover too much and are not good questions. I suppose you're wondering if you would like to use cocos2d or cocos2d with lua. I suggest you take a look at quick-cocos2d-x, because you mentioned cross-platform AI and it worths to have a look.
Related
Are there any new options for converting a spritekit game to android? It seems the only options are to recode everything in Java or to use Cocos2D, LibGDX, etc.
Unfortunately ... no :{
And the cross-platform SpriteBuilder with the Apportable service that let you convert a Swift Cocos project to Android is no longer available (they got bought out by Google I believe).
SpriteBuilder is still available on GitHub but it's not active afaik and is abandoned.
So... what to do?
I would focus on iOS... you can make your game "cross platform" by converting to macOS and tvOS... This is where all of the money is in the market... Apple products...
If your goal however is cross platform, then you can look at Xamarin.forms alongside CocosSharp which will give you write once run everywhere games in C#
You also have regular Xamarin available to write gameplay code in C#, and share it across Android and SpriteKit wrappers written in C# as well.
Another thing to look at is Silver which has Swift wrappers for Android.. thus letting you port Gameplay code almost directly...
In all scenarios you will have to find another game engine for whatever Android solution you use..
IMO, developing with Swift for Apple is much easier and more fun than anything I've ever done with Android dev, even though I prefer Android devices (go figure), and since the revenue is higher it is sort of a no-brainer for starting up.
There are no easy options for supporting Android with a SpriteKit game, but with a little bit of work and not too much difficulty you can recode your game to use Cocos2d-x. I just completed such a project for my game. It took me about four months working half time. I've posted some tips here: http://doffen.org/porting-spritekit-to-cocos2d-x.
I would suggest to have a look here: http://processing.org/
and here : http://www.ricardmarxer.com/fisica/
Fisica is a wrapper of jBox2D for Processing and is quite easy to use. There are a few tweaks for android but nothing too hard.
I did it in the opposite direction (converting my fisica-based game to SpriteKit) and it was quite easy to create regex replacement to easily migrate to swift syntax.
Would writing an Android stock portfolio display app in Clojure be a good learning exercise? I'm totally new to Clojure. My impression is that the functional programming style of Clojure might be better suited for other applications and platforms. For example, I can't find a Clojure based open source project to start from. It looks like I should call a Java charting library such as GraphView and look to port a Java open source stock graphing project?
It will certainly be a good learning experience, though it may not be a pleasant experience.
Clojure On android is not the most common learning path, though everyone makes their own way,
so I don't mean to discourage you :)
If your Totally new to Clojure a webapp is a very popular choice of first real project (and can be made to work nicely from android). Also check out 4clojure.com
Writing android apps in clojure isn't straightforward, although there are some people working on fixing that (GSOC I think), so you'd learn how hard it is :)
If you want to learn clojure, you better start with something which does not involve android.
If you want to learn android, you better start doing so in java.
I am trying to learn to create 2D games on android, and I have heard that andengine is one of the best tools for that. I tried using it, but unfortunately there I have encountered numerous issues with andengine having little documentation, and no stable place where I can learn things. So my question is that what would you recommend to a completely newbie developer? Should I try learning andengine, or learn things the hard way? And can you please provide some good links to learn? So far a lot of links I found were quite old and would not work properly all the time.
Thanks to anyone for their help.
Also just to clarify, I am middle skilled in 2D game development (especially in java and C++), so I know the basic structure, my main issue is making things run on an android since I am completely new to android itself.
With andengine, your best bet is to download, compile and run the sample games and examples. From reading through and understanding the source code for those, you'll learn how to use it. The examples in particular are effectively documentation, they're very good!
I am an experienced professional programmer who wants to delve into Android programming. I also wish to investigate cross-platform programming using tools like PhoneGap or Titanium.
However, I am a bit in doubt of which learning strategy is best.
One approach is to get a good feeling of the Android environment and later on explore the possibilities of the cross-platform tools.
Another approach is to jump start using say Titanium (which to me looks like the better option of the two mentioned) and then after a while look into the underlying Android building blocks. The reason why this approach seems worth considering is that although I have earned my living on programming for 20 years, I have no experience whatsoever with Java. And the feeling of getting something done has always been encouraging to me.
What do you think? Does option 2 make sense, or would it be more sensible to get an understanding of the Android environment first?
Thanks in advance,
Martin
I think that all depends on what will you develop:
If you want to develop simple interfaces (parsing XML/Json/...) with some forms and nice transitional effects, then Titanium is yours.
However, the most advanced functionalities aim the iOS platform. For example, the augmented reality module or the push notification are not supported for Android.
On the other hand, if you want to develop advanced interfaces (Games for example), then you have no choice: Android SDK is the best way (you can use Flash for Android but it doesn't support very first Android OS versions).
In all cases, you have to understand how the Android platform works.
I had a similar decision to make, although I am not an experienced programmer like you with vast experience , I had no java knowledge and I needed to write an android app for a project in grad school ,and i'd tend to agree with you on which is the better option , although reading the dev guide and grasping the basics will be a must. And like Zakaria says , it also depends on what you plan to develop.
in my case I learnt basic java first , then used the SDK for my project. Its not that big a learning curve actually , I did not find too many problems with the API.
The dream is to run Grim fandango on my android,
And i stumbled onto 'residual' (http://residual.sourceforge.net/ it's a c++ application) and someone who made it to run on his nokia n900 (http://www.youtube.com/watch?v=TO9a5nTMHYI).
So for the question, would this be possible for android? My initial thought was the support debian and ubuntu and my android is faster then the n900, why not?
So before i spend days/weeks learning and getting it to work on my android,
I thought it might be a good idea to ask people who actually know about these things if its even possible.
And maybe how much work it really would be, in my head it's currently only:
make allot of Android.mk's
try to compile and fix errors still it works.
Which (if i don't get to many errors) doesn't sound to hard.
Any thoughts are welcome,
Thanks for reading!
I'd say your goal is totally feasible.
Residual seems to rely on standard C++ libraries, plus OpenGL and SDL. For the latter, there are actually several SDL Android ports out there you can take advantage of.
Somebody familiar with Android and the NDK could probably get Residual to a somewhat playable state in a few days (a proper port would take much longer ofc). If you're new to the platform however, you should be prepared to spend several weeks learning the basics of native application development in Android before tackling the project.