A premature preview of cocos2d-iphone v3 preview

On November 18, 2013, in cocos2d, by Steffen Itterheim

A preview version of cocos2d-iphone v3 has been available for a couple days now. I thought I’ll take a closer look and summarize what’s been done, what’s working and what isn’t, what’s new and what’s old but revamped.

Installation

Screen Shot 2013-11-18 at 18.06.21The installer script has been revamped. It has a different name (install.sh) and different parameters (–force instead of -f).

The first thing I noticed is that the installer is downloading Chipmunk2D. Made me wonder why, so I double-checked to confirm: Chipmunk isn’t included in the archive. This means no offline installation.

I’ll explain later why Chipmunk isn’t included.

Project & File Templates

Screen Shot 2013-11-18 at 17.34.36

In the preview there’s only one project template. It doesn’t demo any physics features, it’s your typical “Hello World” example with buttons.

There seems to be an issue with the template where any attempt to save it to a custom location caused Xcode to crash. In fact every time the “Save File” sheet came up and I didn’t click on “Create” right away, Xcode would crash. That’s just one of the reasons why it’s still a preview.

The CCNode File Template isn’t worth mentioning at this point, it creates an empty Objective-C class and is barely different from the regular Objective-C class template at this time.

Hello World v3

Continue reading »

Being a Test-Driven Developer is a choice

On October 31, 2013, in idevblogaday, by Steffen Itterheim

This is my coming out: I’m not a test-driven developer. I have stopped trying to force it onto myself.

Yet I do test.

TDD never seemed to work very well for me personally. As a consequence the process never took hold in my habits of writing code, it did not prove itself as the uber-strategy to advancing to the next engineering level.

It took me a while to free myself of thinking that by not following TDD, that I am somehow an undergraduate software engineer. Or worse. As is sometimes implied by more religiously test-driven developers.

Eventually I realized that test-driven development is a thing that you’re born to love, or you aren’t. A process that works better or worse depending on personal habits, circumstances and environment – in that sense I now regard test-driven development along other relatively subjective and debated processes, like pair programming (XP).

Moreover, like pair programming, the minimum requirement is two programmers. If there are only two programmers in your team, it’s a freakin’ waste of time to do pair-programming round the clock. In the same light my experience with TDD is specifically in environments where I was/am the sole programmer, perhaps only occasionally sharing code development with one or two other developers at most.

This is where TDD’s proposed benefits lose a lot of their weight, while its drawbacks are more pronounced, and a more “agile” process works just as well for sole developers and tiny teams.

TDD is a personal preference

Unit testing is a tool used in test-driven development. If you don’t “test first” and then write the class’ code and then refactor, you aren’t doing test-driven development, you are testing. On the other hand, you can do just that without following the formal TDD process.

In test-driven development, the tests are written first. They are made to fail because the class they test hasn’t been written yet, it’s only a stub. Therefore all tests initially fail. Then you write code. Then you test and verify. Then you refactor. Then you test and verify again.

TDD is a fairly rigorous, rinse and repeat kind of process. It formalizes the process of writing code. It sometimes feels great, other times it feels terribly constrictive. Unfortunately TDD is not someting that you can do on and off, and still expect it to be very effective. Which means you have to be a rigorously test-driven developer. That might also explain why some developers are quite religious about TDD.

I wager that TDD is significantly harder to subscribe to for certain developer archetypes than others. It makes little sense to force it on developers. A lot of the process has to do with personal preference and a certain enlightened feeling that comes when applying and succeeding with it. Likewise, others may still be in shock after weeks and may forever struggle to adapt.

What is often forgotten when adapting TDD is to actually measure key metrics for the team and individual programmer, both before and after – for some teams/individuals the benefits may be tremendous, for others it may reveal fewer defects but also slower development. Then what remains is a tradeoff: do you prefer fewer defects or faster development? This is a valid question in any product development.

It should also be considered that it takes significantly greater effort for an experienced software engineer to change his or her personal process of developing code than it is for a student. Talk about teaching old dogs new tricks. The students are also more likely to find great rewards in test-driven development as TDD encourages them to learn and experience many software engineering principles.

Undeniably, test-driven development has benefits even for experienced developers. But since I’m talking about TDD specifically for sole developers and fairly small projects, then TDD is simply much less effective in my experience. A more informal process works just as well.

TDD benefits are generally overrated

There are benefits and drawbacks to TDD. Most remain inconclusive and subjective, only few have been measured in some very narrow-focused case studies (here and here).

Continue reading »

Tagged with:  

Why aren’t YOU contributing to open source projects?

On August 22, 2013, in idevblogaday, by Steffen Itterheim

I got a lot of questions in the past why I’m not contributing my work to the cocos2d-iphone project.

One of the obvious reasons being that what I did is simply too radical technically and I don’t want to compromise. Another reason being a fundamental difference in attitude towards developing and managing open and closed source projects.

These questions made me wonder – in particular because there was often a notion associated with these questions: because I do so much with cocos2d-iphone I should somehow be obliged to contribute back to it. Weird, right? I am contributing a lot already, just not code to the repository.

So if I don’t contribute (code), why don’t you? Or generally speaking, why aren’t we all contributing more (code) to open source projects?

I have been using open source software for as long as I can remember doing programming work. Yet I’ve probably contributed no more than a few dozen lines to all projects together. And realizing this it’s easy to see that this is the case for 99.9% of the developers out there.

So why aren’t we contributing more to open source projects? What is stopping us? I’ll give you some probable causes and ideas how to improve it for your own open source project.

Continue reading »

The Development Plan for KoboldTouch

On October 25, 2012, in KoboldTouch, by Steffen Itterheim

I like to take a moment and explain what the development process of KoboldTouch will be, and how you will influence the direction of KoboldTouch. But first, let’s have a look what I have planned for the initial version:

UPDATE: KoboldTouch is now available!

First Goal: KoboldTouch equals Cocos2D

To be completed in November, the main goal is to allow users to use the MVC framework of KoboldTouch with all features of Cocos2D, minus a few exceptions (odd features like CCMotionStreak).

You should be able to write Cocos2D apps with Cocos2D features entirely within the KoboldTouch framework. You’ll experience the KoboldTouch API design goal “feels like Cocoa”.

The first version’s features will be:

  • Controller/Model Framework wrapping Cocos2D views
  • View Controllers for “view” nodes, minus exceptions (see below)
  • Scene Transitions
  • Scheduled updates (Step methods in KT)
  • Touch & Accelerometer input controllers
  • Mouse & Keyboard input controllers
  • Simple Audio Controller
  • Simple Model Classes
  • Archiving & Unarchiving Model Classes
  • Basic “Hello World++” Example Project

This first version will be KoboldTouch v6.0.

Continue reading »

Busted! Eight Reasons not to use ARC

On June 28, 2012, in idevblogaday, by Steffen Itterheim

So, you’ve heard about Objective-C automatic reference counting (ARC). And you’ve read about it here and there and every where. But you’re not using it.

Guess what? You’re not alone. There are developers out there who refuse to use ARC, who delay using it, who believe they just can’t use it or expressly decided against using ARC for the time being. They all have their reasons.

Most of them are wrong.

Here’s a summary of reasons I’ve heard (repeatedly) in the past months from developers who aren’t using ARC, or have tried it but gave up using it. And I’ll tell you why these rationalizations are wrong, or at least over-inflated.

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:  

Affiliate Products

On November 10, 2011, in , by Steffen Itterheim

I did not create the following products. But I help sell them through ads and affiliate links because they’re high quality and highly recommended. I get a commission for each sale made through these links, which in turn helps me spend more time on this website and on Kobold2D.

Paralaxer Platformer Game Kit

Paralaxer runs on iOS, Android, Windows, & Mac using the same C++ game code. Thanks to the ultra-awesome, open-source Cocos2D-X game engine, Paralaxer is a cross-platform platformer.

      

The iPhone RPG Engine

Rapidly create your own RPG or action-adventure game with this complete starter kit. Includes an ebook, game source code and a royalty-free art package.

Commander Cool Game Kit

This starter kit includes the complete source code of “Commander Cool” for iPhone / iPad / Mac build with Cocos2d & Box2d, extensive code documentation and video documentation (accessible online or offline) covering every beginning step to modifying the app for yourself.

      

Angry Ninjas Starter Kit

Ride the wave of success that sling shot games are seeing in the App Store and create your own popular game. All thats required is a bit of time on your part to build some fantastic levels and add your own artistic twist. We’ve done the hard part. Now you get to do the fun part!

Visit the Ray Wenderlich Store!


Learn about the APIs that were introduced in iOS 6 like Auto Layout, Collection Views, and Passbook. Over 1,500 pages of high quality content!

Also check out Sprite Kit by Tutorials!


The Starter Kit Bundle: Full Cocos2D source code and tutorials for creating a side-scrolling space shooter game, a platformer game and a beat ’em up game for iPhone and iPad!
Ray Wenderlich and his team provide awesome iOS Tutorials and excellent Starter Kit source code.

TexturePacker

Create sprite sheets and optimize images for your Cocos2D, Kobold2D, Corona and other game engine projects.

      

PhysicsEditor

Edit collision shapes for Box2D and Chipmunk based physics games. Supports Cocos2D, Kobold2D, Corona, and other game engines.

I have no doubt that automatic reference counting (ARC) is the next big leap forward for Objective-C since the introduction of Objective-C 2.0. ARC allows you to put the burden of memory management on the (Apple LLVM 3.0) compiler, and never think about retain, release and autorelease ever again.

Since many user’s first experiences with ARC will be trying to convert an existing app, they will learn the hard way that converting existing code to ARC is not a fire & forget operation. And since this is the Internet, there’s also a lot of assumptions, false statements and other myths revolving around ARC going around.

So here’s just about everything you need to know about ARC, and some ARC-mythbusting too.

Continue reading »

Page 1 of 3123