I have 2 separate Projects one is in Cocos2dx v3.6 and one is in Swift. I want to start a game from the Swift project. How can I do it?
I have copied whole cocos2dx project into my Swift project and then created one View Controller in swift and trying to open CCDirector as a root view of the project. but not able to find director, I am trying to import cocos2dx with this #import "cocos2d.h" , but it is giving me error of "undefined file".
Apple Swift version 1.2
Cocos2D-Swift is a framework for building 2D games, demos, and other graphical/interactive applications for iOS, Mac and Android. It is based on the Cocos2D design, but instead of using Python it uses Swift or Objective-C. New Cocos2D projects are created with SpriteBuilder. SpriteBuilder is, just like Cocos2D, free and open source.
Xcode 6 includes Swift, an innovative programming language with an interactive work area called a playground. Developers can directly manipulate and experiment with Swift code live—enter the code for a Bézier path in the playground and watch the path drawn directly beside the code.
Xcode 6.1 Xcode 6.1 adds development for OS X with Swift, and includes bug fixes as well as other new features. SDK Support for OS X Yosemite Xcode 6.1 includes development support with SDKs for OS X version 10.9, OS X version 10.10, and iOS 8.
You can use version Cocos2d for Swift it is here. this
Also I suggest you use this tutorial it is very simple todo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With