Now you need to copy the cocos2d-android.jar file into the ‘libs’ folder of your project. Open up Eclipse and create a new Android Project: In fact when you’re developing on your own, the source code is a better option since you gain full documentation along with the ability to tweak the code should you need to. jar), although you’re welcome to include the full source code if you wish. I’m going to assume you’re using the pre-compiled library (the. The basics of Android (such as what Activities are, etc.) are helpful to know, but not critical.įirst you need to download cocos2d-android-1. There are plenty of Java tutorials out there, don’t worry we’ll wait here while you learn. I’m also going to assume you know Java, otherwise you’re going to get lost very quickly. You’ll also need to test with a real device, the emulator is far too slow to test Cocos2D applications, even one as simple as this tutorial. If not, you can follow the guides at Google. I’m going to assume you’ve already got the Android SDK installed, along with Eclipse. Credit should also go to Sketchydroide for his basic template for Cocos2D on Android. Ray deserves all credit for this tutorial – the tutorial is originally his, this is merely a port to Android. Of course we’re dealing with Android here, so here is his tutorial recreated for Android. It supports the vast majority of the features necessary to make almost any 2D-based game, it even includes a fully-featured physics engine!Īs part of learning Cocos2D for Android I followed Ray Wenderlich’s tutorials for the iPhone port of Cocos2D. Sorry guys □Ĭocos2D is a fantastic library / game engine for numerous platforms from PCs to smart phones. Unfortunately I don’t have time to update the tutorial to the new release of Cocos2D. It’ll still work if you use the sample download linked at the end – but it’s using outdated API calls. Update: This code is using an outdated version of the Cocos2D port.
0 Comments
Leave a Reply. |