cocos2d-iphone v2.1 released, and more!

We are happy to announce the fifth coordinated release of the cocos2d family. We are releasing:

  • cocos2d-x v2.1.4
  • cocos2d-html5 v2.1.4
  • cocos2d-iphone v2.1
  • CocosBuilder v3.0-alpha5

Our goal is to provide a complete toolchain for developing multi-platform games both for Web and Mobile, all the way from rapid prototyping to a finished high performing game.

cocos2d-x

Download

Highlights

  • Added support for XMLHttpRequest and WebSocket on JSB
  • Added support for encoded JavaScript files and add command line tool for generating javacript code
  • Upgraded Spidermonkey to v21
  • Added support for Emscpriten and Tizen port, usage of Emscpriten and usage of Tizen
  • AssetsManager downloads resources in a new thread
  • CCLabelTTF supports shadows and stroke
  • Added support for ETC1 image format on Android
  • Added many test cases for Lua bindings
  • Added more plugins: weibo, twitter

More information

Read more about all the new features at cocos2d-x v2.1.4 release notes.

cocos2d-html5

Download

Cocos2d-html5-v2.1.4.zip

Highlights

  • Added support for multiple resources loading, please refer to the document Mechanism of Loading Resources for usage. This mechanic is the same as cocos2d-x now
  • Optimised “Performance Tests -> Sprites Test”, and increased its benchmark to 220%! Yeah, 2.2 times faster than before!
  • Migrated audio (CocosDenshion) API to keep the same as Cocos2d JS API
  • Added auto test for NodeTests and TilemapTests
  • Changed CCTextureCache member functions such as addImage(path), addImageAysnc(path), removeTextureForKey(key) from using relative path to absolute path
  • Added support for particle batch node

Note

Our working branch on github repository (https://github.com/cocos2d/cocos2d-html5) is moved from “master” to “develop”, while “master” branch will only hold the latest stable release. Please send all pull requests to the “develop” branch from now on.

More information

Read more about all the new features at Cocos2d-html5 v2.1.4 release notes.

cocos2d-iphone

Download

Highlights

  • CCLabelTTF supports shadow and stroke
  • Added CCEasePolynomialXXX actions

More information

Read more about all the new features at cocos2d-iphone v2.1 release notes.

Continue reading

Posted in cocos2d | 1 Comment

Congratulations Badland for winning the Apple Design Award

Congratulations to the Badland team for winning the Apple Design Award.

badland_award

More info about Badland:

 

Posted in games | 1 Comment

Apportable SDK: Free Android support for cocos2d-iphone

Kingdom RushApportable allows developers to cross-compile Objective-C apps to Android, without maintaining a separate code base in Java. It is used by many top-rated games, including cocos2d-iphone titles like Kingdom Rush and Mega Run.

We are pleased to announce that Apportable is now offering a free version of our Android SDK for porting cocos2d-iphone apps. The Apportable Starter SDK includes:

  • Common frameworks used by cocos2d-iphone including Foundation, CoreFoundation, CoreGraphics, OpenAL, OpenGLES, libdispatch, and AudioToolbox.

  • Develop in Xcode! No need to create and maintain Android-specific makefiles.

  • A fully-functional debugger that can set breakpoints and invoke Objective-C methods.

  • The latest version of Clang with support for ARC, __weak, blocks, C++ 11, and more.

  • All the Objective-C runtime functions that you would expect, even swizzling, dynamic method injection, and block trampolines.

  • A more complete and compliant libc than the Android NDK.

  • Support for Android screen sizes with optional iOS screen size emulation.

  • Full Java support so you can call Android APIs and Java SDKs from Objective-C.

You can download the SDK today at www.apportable.com. Try compiling the open source sample apps, or give your own app a try. Deploy your cross-compiled apps to any Android store at no additional cost. And if you need even more awesome, we have a variety of upgrades available.

Let us know what you think in the comments or through Twitter (@apportable).

About the author: Collin Jackson is co-founder of Apportable, a San Francisco based company that helps developers build cross-platform apps in Objective-C.

Posted in cocos2d | 25 Comments

4th coordinated release: cocos2d-iphone v2.1-rc2 and much more

We are happy to announce the fourth coordinated release of the cocos2d family. We are releasing:

  • cocos2d-x v2.1rc0-x-2.1.3
  • cocos2d-html5 v2.1.3
  • cocos2d-iphone v2.1-rc2
  • CocosBuilder v3.0-alpha4

Our goal is to provide a complete toolchain for developing multi-platform games both for Web and Mobile, all the way from rapid prototyping to a finished high performing game.

cocos2d-x

Download

Highlights

  • Added support for Spine skeleton animation editor
  • uses LuaJIT
  • CocosPlayer supports iOS
  • add kResolutionFixedHeight and kResolutionFixedWidth resolution policy
  • updated to SpiderMonkey v20.0
  • add many Lua test cases
  • Possible to obfuscate JavaScript code. More info here
  • plugin-x released

More information

Read more about all the new features at cocos2d-x v2.1.3 release notes.

cocos2d-html5

Download

Cocos2d-html5-v2.1.3.zip

Highlights

  • CCEditbox now implemented for WebGL and JSB
  • Updated CCBReader to latest version
  • Improved performance Firefox by about 20%
  • Added render mode flag to switch between WebGL and canvas2d
  • Added support for Tizen
  • Now able to load embedded texture file in a plist
  • EGLView now works if canvas is placed inside another DOM element
  • Added a Simulator which can be found in MoonWarriors Directory

Note

The work in progress development branch will now be “develop”, while “master” branch will only hold the latest stable release. Please send all pull requests to the “develop” branch from now on.

More information

Read more about all the new features at Cocos2d-html5 v2.1.3 release notes.

cocos2d-iphone

Download

Highlights

  • Bug fixes in many components: CCParticleSystem, DrawingPrimitives, Layer, MenuItem, ProgressActions, TMXMaps and more.
  • Includes JS remote Debugger (disabled by default)
  • Updated 3rd party libraries: SpiderMonkey 20.0, JS Bindings 0.7,

More information

Read more about all the new features at cocos2d-iphone v2.1 release notes.

Continue reading

Posted in cocos2d | 7 Comments

BADLAND – a cocos2d-iphone game

BADLAND launched April 4th, 2013 on App Store for iPad, iPhone & iPod touch. Since then it has sold more than 100 000 copies. Try it out (iTunes link) or check out the launch trailer below so you get a better picture of what kind of game I am going to talk about. BADLAND was our two-man indie company’s, called Frogmind, first iOS game and it uses the latest development version of cocos2d-iphone 2.1 along with lots of other open source libraries.

Why cocos2d?

First of all we wanted to develop the game with the minimal possible team as possible. In our indie studio we have only me, Johannes Vuorinen, as the programmer, and Juhana Myllys as the artist. Audio is something neither of us do well enough, so we subcontracted a very talented audio guy, Joonas Turner, to do the audio side. So with this small team it was clear to us that we want to focus on developing the game itself and not implementing engines and tools of our own.

So, we decided to look for an engine with good support for tools. BADLAND is a 2D game so a 3D engine with 3D physics (e.g., Unity3D) felt a little bit overkill. Also, I prefer engines with full source code access so that I really know what’s going on under the hood, and maybe change something if there’s something I do not like. And of course, most importantly, we wanted the engine to be still in development with an active community. With all these requirements, cocos2d was an excellent choice.

BADLAND - Dawn BADLAND - Noon

The other awesome engines, libraries and tools

It’s not just cocos2d that makes BADLAND tick. Box2D as the physics engine is equally important. In fact, Box2D is so amazing that we were able to implement everything we wanted to the game without changing a single line of code in its source code. For example, the ability to set continuos collision detection enabled for individual bodies was a really important feature to us because we have some thin obstacles and fast moving objects in the game.

For the audio we chose FMOD with FMOD Designer. I can highly recommend FMOD as well. We were able to develop very dynamic soundscape without touching the game’s source code that much as the FMOD Designer does lots of stuff for you. Use of FMOD is not completely free but it’s very inexpensive for indie developers.

As offline tools we used the fantastic tools by Andreas Loew: TexturePacker and PhysicsEditor. I can highly recommend both of them and they work easily with cocos2d and Box2D. With the TexturePacker we were able to highly optimize the game performance and memory consumption, and with PhysicsEditor we were easily able to define physics shapes.

In addition to these, we used GlyphDesigner to rapidly create the game’s font atlas, and ParticleDesigner to create particle effects. Both of them work out of the box with cocos2d. ParticleDesigner was not as perfect as the other tools mentioned and I have lots of improvement ideas to it but it did its job.

Finally we used CocosBuilder to create 80% the menus. It was easy and efficient. The only thing that I really missed using this tool was the lack of ability to use ready-made spritesheets to reduce draw calls when rendering the CocosBuilder nodes.

BADLAND of course also use lots of additional open source libraries that do not play as big role as the ones mentioned. However, this should give the general idea that we used a LOT of ready-made engines, libraries and tools to develop BADLAND. I would say the 95% of the time we were able to concentrate on just developing the actual game itself.

BADLAND - Dusk BADLAND - Night

Conclusion

All in all, I can highly recommend using cocos2d for any 2D game. It was easy to learn, use and modify. Without the engine and the awesome community, BADLAND would not have seen daylight this early. And with the cocos2d-x, we have the possibility to bring the game to other platforms too in the future. Thank you for the awesome engine and all the support!

We are continuing developing BADLAND further with updates so if you want to stay in the loop, you can follow us:
Facebook – http://www.facebook.com/badlandgame
Twitter – http://www.twitter.com/badlandgame
Blog – http://www.badlandgame.com
iTunes link – https://itunes.apple.com/app/badland/id535176909

If you have any questions, please ask for example in the comments or by twitter @johannesvuorine

Posted in cocos2d | 20 Comments

Introducing Watermelon2D: the future of cocos2d

watermelonThere are some features that we need in cocos2d (like multithreading, a good UI toolkit, multiple view support, auto-batching, etc.).

Adding those features in the current cocos2d design is not trivial, so a reboot of cocos2d is necessary. Let me introduce you to Watermelon2D, the future of cocos2d. Planned features:

  • Multithreading
  • Complete UI toolkit
  • Multiple OpenGL view support
  • It is going to be implemented in D language
  • Not as tasty as a coconut, but with more water
  • Green in the outside, red in the inside with black seeds
  • Support for Groundhog2d physics engine
  • Backwards compatible with cocos1d

 

Posted in cocos2d | Tagged | 20 Comments

3rd coordinated release: cocos2d-iphone v2.1-rc1 and more

We are happy to announce the third coordinated release of the cocos2d family. We are releasing:

  • CocosBuilder v3.0-alpha3
  • cocos2d-html5 v2.1.2
  • cocos2d-iphone v2.1-rc1
  • cocos2d-x v2.1rc0-x–2.1.2

Our goal is to provide a complete toolchain for developing multi-platform games both for Web and Mobile, all the way from rapid prototyping to a finished high performing game.

CocosBuilder


This is the third release of CocosBuilder 3 alpha. When updating please make sure to also update to the latest version of CCBReader and CocosPlayer. You will be able to open old ccb-files with the new version, but it may not be backwards compatible. Please make a backup of all your project files before updating as CocosBuilder is still in alpha state.

Download

Highlights

  • Improved default project structure
  • Adds support for sound playback directly from the timeline
  • Adds support for callbacks from the timeline
  • Improved support for Cocos2d JS
  • Skew properties can now be animated (not supported in cocos2d-html5)
  • Plenty of bug fixes

More information

Read more about all the new features at cocosbuilder.com.

cocos2d-html5

Download

Highlights

  • WebGL support! Great performance boost on modern browsers
  • cc.Loader now supports multiple stage preloading – all tests now preload by multi resource groups
  • cc.Node now uses transform matrix – better performance
  • Added Accelerometer support
  • Added support for MP4 and M4a Audio format
  • Designer resolution for multi resolution support
  • Faster cc.ParticleSystem, thanks to Ivo Wetzel
  • Bug fixes in audio support, file utility, Google Closure compiler, LocalStorage, cc.MenuItemImagecc.MenuItemToggle, actions andUIWebView compatibility

More information

Read more about all the new features at cocos2d-html5 release notes.

cocos2d-iphone

Download

Highlights

  • OpenGL bindings for JavaScript (compatible with the WebGL API)
  • New drawing primitives functions ccDrawSolidCircleccDrawArcccDrawSolidArc
  • Bug fixes in different components: CCClippingNodeCCDirectorCCGLProgramCCTexture2DCCRenderTextureCCEaseBound*,CCEaseExp*
  • Updated 3rd party libraries: Chipmunk 6.1.4, SpiderMonkey 19.0, JS Bindings 0.6,

More information

Read more about all the new features at cocos2d-iphone v2.1 release notes.
Continue reading

Posted in cocos2d | 5 Comments

Coordinated release: cocos2d-iphone v2.1-rc0 and more

Update: cocos2d-iphone v2.1rc0a released. It is a hot fix release with a few important bug fixes.

We are happy to announce the second coordinated release of the cocos2d family. We are releasing:

  • CocosBuilder v3.0-alpha1
  • cocos2d-html5 v2.1.1
  • cocos2d-iphone v2.1-rc0a
  • cocos2d-x v2.1beta3-x-2.1.1

Our goal is to provide a complete toolchain for developing multi-platform games both for Web and Mobile, all the way from rapid prototyping to a finished high performing game.

CocosBuilder

Today a second version of CocosBuilder 3 alpha is released. It is a fairly stable release, although there are still features missing that will be in the final version of CocosBuilder 3.

Download

Highlights

  • Much improved cocos2d JS support
  • Built in texture packer with support for png, pvr and pvrtc
  • Automatic resizing of assets for different devices
  • Improved publishing for Android
  • Improved support for cocos2d-x
  • Automatic audio conversions for different platforms
  • CocosPlayer support for Android, and many fixes regarding reliability

More information

Read more about all the new features at cocosbuilder.com.

cocos2d-html5

Download

Highlights

  • Added mouse button to MouseDispatcher, supports right-click
  • Changed preload audio type from “bgm” and “effect” to “sound”
  • Added “Sys” class for system capabilities
  • Improved cc.BuilderReader to support .ccbi extension auto-completion
  • Improved TMXXMLParser to support XML, CSV and zlib compression
  • Changed cc.Time.gettimeofdayCocos2d to Date.now which is more javascript friendly.
  • Added stackable support for position actions like cc.Move*cc.Jumpcc.CatmullRom*, etc.
  • Added filename lookup support in CCFileUtils
  • Fixed bugs

More information

Read more about all the new features at cocos2d-html5 release notes.

cocos2d-iphone

Download

Highlights

  • Added stackable support for position actions like CCMove*CCJump*CCCatmullRom*, etc.
  • Added filename lookup support in CCFileUtils
  • Added option to cascade color and opacity in nodes
  • Added auto-premultiplied alpha support PVRv3 textures
  • Improved JS bindings support
  • Many bug fixes

More information

Read more about all the new features at cocos2d-iphone v2.1 release notes.

Continue reading

Posted in cocos2d | Tagged , , | 12 Comments

LensFlare Studio – Photo Editor for Mac

LensFlare Studio

How a 2D game engine came to power a professional photo editor

LensFlare Studio

LensFlare Studio is a brand new photo editor for adding optical effects on your Mac. With over 100 effects, you can choose from anamorphic lens flares, lighting effects, sci-fi flares, sunlight glare, and more.  The heart of LensFlare Studio is the Optics Engine running on cocos2d, the powerful animation framework based on OpenGL.

Lens flares have really become an important part of the visual language for design, adding glares and imperfections to overly perfect shots and computer animation. Lens flares add a sense of depth and brightness to an otherwise flat looking image. I’ll be the first to admit that they are often overused and can over-power an image. Nevertheless, having a powerful tool for creating optical effects is a must for any designer or photographer.

LensFlare Studio is great for:

  • Graphics Design
  • Logos and Titles
  • Anamorphic Flares
  • Special Effects

Isn’t cocos2d a Game Engine?

Who would have thought the leading game framework would be used for a photo editor? When I started the original app, LensFlare for iOS, I knew I needed a fast and easy framework that could handle full animation. For my photo app idea, I wasn’t interested in making static overlays and filters, but a fully interactive app where you can move, rotate, and scale optical elements effortlessly. This app would also need to render numerous image layers without any slowdown. Effective lens flares are composed of many light components that move, rotate, and scale independently relative to the light source.

It turns out, cocos2d is the perfect framework for this. It was super easy to get started with, yet has proven to be capable of high quality effects and rendering.

 

Optics Engine

The heart of my apps is the Optics Engine. This handles all of the display and rendering duties to realize the optical effects. Each lens flare effect is a collection of images contained in classes derived from the CCSprite base image class. Cocos2d framework handles large numbers of on screen images very efficiently through the use of texture caching. My custom CCSprite image classes handle the different types of optical effects and model the physical characteristics of light and glass interaction. For example, the EdgeFlare class only shows itself when the light source is near the edge of the screen, thus modeling light hitting the edge of a physical camera lens and glaring across the the frame.

 

LensFlare for iOS

I first developed the Optics Engine as the foundation of LensFlare for iOS.
Over the past 2 years I’ve expanded this into two more apps; LensLight and AlienSky, which add more content and features while using the same Optics Engine.

iosApps

These are iOS apps designed for adding optical effects to your iPhone photos. They have minimal UI and are mostly gesture based. After placing an effect on your photo, you can move, rotate, and scale it by touch. These apps are universal and work on iPads as well. Making them universal was very easy to do with the cocos2d framework which elegantly handles screen resolution internally.

 
Continue reading

Posted in cocos2d | 3 Comments

Creating Games with cocos2d for iPhone 2

I’m happy to share my new book, Creating Games with cocos2d for iPhone 2.packt_book_cover_small

Creating Games with cocos2d for iPhone 2 takes you through the entire process of designing and building nine complete games for the iPhone, iPod Touch, or iPad using cocos2d 2.0. The projects start simply and gradually increase in complexity, building on the lessons learned in previous chapters. Good design practices are emphasized throughout.

Why This Book Exists

I will dispense with the general marketing blurbs here.  If you want to read the “official” promotional information, it is all in the first post of this forum thread.

Instead, I want to share, from a developer’s perspective, why you might want to read this book.  Most developers learn the basics of cocos2d for iPhone v.2.0, and subsequently hit a wall.  We have all these interesting classes that are really powerful, like CCLayer, CCSprite, actions, etc.  How can we put these things together and make something equally interesting out of them?

That is the “gap” this book aims to fill.  Rather than take the beginner’s book approach, where we spend several pages explaining what a sprite is, how it is drawn, etc.  “Creating Games” skips many of the generalities and jumps right into the reason we are here: building games.   This is the book I wished I had in hand when I was first exploring cocos2d for iPhone.

Class by class, method by method, the text explains the “good parts” of why we are building the code in this fashion.  All the “good parts” are explained in detail: from building with Box2D to GameKit Bluetooth integration, and even how to build in “artificial randomness” into a Match 3 game, so you never run out of moves.

Each chapter is a complete game, and all source code is available as a download from the publisher’s web site. The games cover a wide variety of game types, and the games become more intricate and complex as the book progresses.

The games included in the book are:
Chapter 1: Memory
Chapter 2: Match 3
Chapter 3: Mole Thumper
Chapter 4: Snake
Chapter 5: Brick Breaker (with Box2D)
Chapter 6: Cycles of Light (iPad with Bluetooth integration)
Chapter 7: Pool (with Box2D)
Chapter 8: Scrolling Shooter (using Tiled)
Chapter 9: Endless Runner

Book Giveaway

We are giving away two free copies of Creating Games with cocos2d for iPhone 2!  The contest runs until January 29, 2013.  To enter, all you need to do is post why you want the book to the book’s forum thread.  To see the particulars of the contest, read this post: Book Giveaway

Posted in book, cocos2d | Tagged , | 13 Comments