Kobold2D v1.0.1 now available!

On December 15, 2011, in Kobold2D, by Steffen Itterheim

Kobold2D v1.0.1 is now available from the Kobold2D Download page or via github! You’ll find the Release Notes in the usual place.

The most important new features are:

Almost all bugs reported so far have also been squashed. Mainly several fixes related to KKInput, a crash with CCMenuItem* and blocks and an issue that caused Retina mode not being properly enabled.

A few minor convenience methods have also been added, for example CCDirector now has a continuously updated frameCount property that returns the number of frames drawn since the app started, and KKInput now has the anyTouchLocation property if you just want the touch location of any (the) finger on the screen.

Detecting collisions on pixel-perfect boundaries is the holy grail of collision detection in 2D games. As such, it seems like the ideal, if not to say perfect, solution to collision detection in general. Yet, it’s also quite complicated and the straightforward solutions don’t perform very well until you start optimizing the code.

This first post focuses on creating a pixel mask by analyzing the raw image data, as proposed over 3 years ago by Ernesto Corvi. It’s the fastest solution if you want to test if a point collides with a pixel on an image, which also works for rotated and scaled sprites. However it does take some optimizing to speed up detecting collisions between a bounding box of a node and the pixel mask, or two pixel masks.

The alternative solution is to render the two colliding objects onto a CCRenderTexture, as developed by Dani and others on the Cocos2D forum. It is able to detect collisions of arbitrarily rotated and scaled sprites but can be expected to be noticeably slower than a pixel mask. I will discuss this solution in a future iDevBlogADay post.

The results will find their way into Kobold2D, to make the solutions readily available to all developers.

Continue reading »

LearnCocosTV 1: How I maed your Kobold

On December 2, 2011, in LearnCocosTV, by Steffen Itterheim

LearnCocosTV is sort of like a personal sprint review presentation but in video form.

I think that just writing about what I’ve done recently would be rather dull, whereas a bi-weekly Show & Tell video would not only be more interesting, it is also much more encouraging for me to create something cool to show in the first place!

Each episode will update you about what I’ve done for or with Cocos2D, Kobold2D and iOS/OSX development in general, what I’ve learned in the process and what the end results are. Here’s episode one, I hope you’ll enjoy it:

LearnCocosTV – Episode 1: How I maed your Kobold

• Kobold2D 1.0 Released
• Kobold2D source code published on github
• First Kobold2D games published on App Store
• Kobold2D Server moved
• iDevBlogADay: How to use CCRenderTexture…

And no, I’m most certainly not going to run out of TV Show titles to vilify. 😀

PS: in case you’re wondering, the video was created with ScreenFlow 3.0.

Tagged with:  

Cocos2D’s CCRenderTexture class is shrouded in mysteries. Part of it because it has a low-level aura to it, and most certainly because it simply works differently than most Cocos2D nodes. In this tutorial you’ll learn all about CCRenderTexture and what you can use it for.

The CCRenderTexture demo project will guide you through basic uses of CCRenderTexture with 6 examples, including taking a screenshot, drawing with your fingers and applying full-screen motion blur.

As a bonus I’ve also added an example for CCMutableTexture2D (aka CCTexture2DMutable) that shows how you can set pixels in a mutable texture.

Continue reading »

Tagged with:  

Kobold2D v1.0 Released

On November 17, 2011, in cocos2d, Kobold2D, by Steffen Itterheim

Kobold2D v1.0 is now available from the Kobold2D Download page!

This is mainly a maintenance release, I found and fixed all the bugs that had been reported, including some nasty linker issues that occurred with a preference on Snow Leopard. Kobold2D is now thoroughly tested with Xcode 4.0.2, 4.1 and 4.2 under Snow Leopard and Xcode 4.2 under Lion.

Of course the latest updates of cocos2d-iphone-extensions 0.2 and cocos3d 0.6.3 are also included.

And I can’t say it often enough: Kobold2D supports ARC (automatic reference counting) out of the box! There’s nothing you need to do! Just have Xcode 4.2 installed and start writing code without retain, release and autorelease ever again.

Forward Looking Statement

The motto for the next updates is still “Get Connected!”. I want to add more online features and update the KKGameKitHelper class with remote config support provided by AppMynx. I will evaluate ShareKit and hopefully be able to implement that with (if necessary) a reasonably simple interface for Cocos2D apps.

I also have a commercial product for iOS in development that will make sending data over the network a lot simpler. The basic idea being that if, for example, you want to synchronize a sprite’s position and rotation properties with all other devices, you simply write something like this:

[cc lang=”cpp”]
[KKConnect addSharedObject:self
identifier:@”Player1″
properties:@selector(position),
@selector(rotation),
nil];
[/cc]

It works with any properties (except id/pointers). Whenever one of the property values changes, its value is sent to all connected devices and assigned to the property of the local object with the corresponding “Player1” identifier. Dead simple. And coming soon.

Learn Cocos2D Game Development with iOS 5

It’s also no coincidence that the print and PDF versions of the Learn Cocos2D Game Development book (2nd Edition) are available since a few days.

The book uses Cocos2D v1.0.1, the chapters have been significantly improved, Chapter 3 is almost a complete rewrite. There are also two new chapters discussing integration of UIKit views in a Cocos2D app, as well as adding Cocos2D to an existing UIKit app. The other new chapter is about Kobold2D and introduces Lua and Cocos3D.

Readers keep asking me when the Kindle or iBooks versions of the new edition will be out. To be honest: I don’t know. But I’m confident that there will be a Kindle version and one for iBook eventually, and I expect these to be available soon. After all the first Edition is also available through these channels, and so are most (if not all) Apress books. Plus Xmas is coming, just like most companies book publishers are eager to get their best products out the door in time for Xmas.

In Depth iOS & Cocos2D Performance Analysis with Test Project

On November 17, 2011, in idevblogaday, by Steffen Itterheim

I took Mike Ash’s performance measuring code from 2008 with the improvements made by Stuart Carnie in early 2010 and turned that into a performance measuring project for 2012.

I know it’s still 2011, consider this a forward-looking statement. In any case, the test project is available for download, ready to run, includes Cocos2D v1.0.1 and is relatively easy to modify for your own needs. This project is also available on my github repository where I host all of the iDevBlogADay source code.

Since numbers are so dry and hard to assess, you’ll find the rest of this post garnered with charts and conclusions based on the results obtained from iPhone 3G, iPod 4 and iPad.

Continue reading »

Affiliate Store Opened

On November 13, 2011, in Announcements, by Steffen Itterheim

I opened an Affiliate Store page to be able to promote and sell other developer’s products.

Recently I decided to write one big post every other week (bi-weekly on Thursdays) as my iDevBlogADay post. I also wanted to create something exceptional each time. In particular the Compiler Directives list worked great. It bothered me that there was no such list. And apparently I wasn’t the only one looking for that.

That made me start regarding the iDevBlogADay posts essentially as paid writing jobs. Regardless of how little that payment may be, it is adding to my bottom line and it is a welcome additional incentive to put my best efforts into it.

Continue reading »

Tagged with:  
Page 16 of 37« First...10...1415161718...30...Last »