Where to start... "Cocos2d-x by Example Beginners Guide" is a good great book! Turns out one of my Appsomniacs partners has bought this book and also enjoyed its knowledge (votes+=2). Even have cut my teeth and shipped on iOS, Android and Windows 8. The Windows 8 was such a hack job I could never get it cleaned up to do a push request (I think, I should just try, at least put it in my branch. Please nag at me if I don't... It may be a bridge too many not subtle changes. Anyway, I digress, the rest of this about this great book that might help a lot of people on their Cocos2d-x journeys.


1) The first thing that popped out at me when I cracked the spine on this book was the large quantity of and the technical diversity of the contributors. I was impressed with their bio/resumes and the book certainly was better for it.

2) Hang on tight. The gas pedal is binary. The book gets you up and running rather quickly. Almost too quick in some respects, but later chapters make up for that hand holding fast start in ten fold. I was worried at first a lot of bits were glossed over. Do not worry about this stuff. Great details will be given in droves, and when not a good entry point to references often sufficed.

3) I actually appreciated the section (within chapter 2) that was a primer on as well as described why the C++ was arranged the way it was (e.g., what conventions were from the Objective C world and reminders of things you need to remember to do when in C++ (i.e., proper memory management because ARC is not available.)) My favorite quote so far "... relax, and let the framework work for you."

4) The learn by example part struck me as well done. It could always cover more. I was wanton for more after 6 games. Maybe combining this and the ideas found in the iPhone Cookbook you could get even more mileage. Frankly, after you tackle this books examples. I did one a weekend (~4 hours in 1-2 sessions usually) you will be pretty well versed. The games are varied enough and the topics within cover a lot of ground. I will always want more!

5) Chapter 10 is gold for anyone coming from iOS and wanting to break into Android and really use the greatness of what Cocos2d-x brings to the table (IMO anyway.) You are presented a nice 'uncluttered' step by step walk through (albeit the compile sections was 20 steps, but they were important 'no fluff' steps! I am pleased they linked their sources on this one too. Our team put this stuff together by piecing together Android NDK posts and trial and error last year (of course we never thought to share because we never thought we did it right to begin with... it compiled... and ran, so we shipped it anyway...) I think the chapter here would have saved us much time and pain. Luckily you now have this resource to leverage. My only wish was that a little more time was spent on the tricks you have to go through to get as clean as code as possible (not special casing every piece of logic with pre-compiler directives, etc. for each platform.) Maybe a little treatise on design patterns would have been helpful here too. But I guess all of that is really beyond the scope of the book (i.e., a lifetime could be spent learning how to write well designed cross platform C++ code. If anyone knows of a good book let me know!

6) I want to mention the index. It was a basic run of the mill index. Don't get me wrong it was a good and proper index. But I can not help but note this book chapters were laid out similarly to the iPhone book "Creating Games with Cocos2d for iPhone 2", which had a brilliant index (I bet someone hated it... those darn trolls convinced them not to do it this way!) In the iPhone book most chapters covered an entire game by example much as this book did too. The iPhone version's index had a breakdown of a game chapter by game name as a sub index of concepts within it. I absolutely loved that and I dearly missed it in this one. The index is fine as it is, but having tasted the other books additional index by chapter concepts I found myself longing for it as this new book was also a perfect candidate for that format as well. But it is no reason to not get this book if the subject interests you. File this under 'I have to find something to complain about in a review' comments.


I do think beginning, but versed, C++ developers could pick this up and succeed if they try. If you have Objective C down C++ is not really that hard to grok also (and the parts you don't use won't likely come into play as nearly as often as you might think.) Advanced users probably won't get a lot out of it, but if you are street learned on Cocos2d like I have been (and still am learning in many respects) it wouldn't hurt to have gone over this material once. 

Thank for sticking out my wall of text this far. I am pretty sure there is an achievement for having made it this far. ;) 

"If all misfortunes were laid in one common heap whence everyone must take an equal portion, most people would be contented to take their own and depart."
Greek philosopher

This quote got me thinking about how my misfortunes are much less than so many others and even if the day has me down, I am still way low on the amount of misfortune I bring to the heap. Just saying. I am grateful. Of course this quote could ALSO be a criticism about how generally selfish people are and not wanting to 'share the load' with those less fortunate... Something to think about.

I'll get back to code and tech posts soon enough. Still a ton of work to do on Android's Doodle Army Boot Camp, and ramping up on another round of server fixes for Doodle Army 2. Windows 8 is hovering in the back too. That was too much work to just abandon it... too much... but the cocos2d template needs a lot of work still too.

Sound advice from Jeff Vogel  (on February 9, 2012) of Spiderweb Software for the indie: "Find your niche and own it. Accept what you can't change, be as awesome as you can, charge what you're worth, and stand proud on the ocean floor."

Jeff Vogel is one of the long term success stories I like to aspire to. He works hard, loves what he does, and as long as he keeps delivering the quality goods I expect he will continue to do well. I've never spoken to him, but if I do I think I will simply say "Thanks for all the fun and advice!" He has had a great influence in where I am and heading today.

Thanks Jeff! Thanks for all the RPG loving over the (dry) years! Thanks for encouraging and sharing as much as you do! Its the kind of stuff that fuels my forges here at CodeWorx!

There is a tight coupling between the user experience (UX) and the user interface (UI). They are often synonymous, I think they are nearly interchangeable in many aspects.

I think it is safe to say when you block the UI thread with some long running process you are *blocking* the UX from being as good as it could be. Maybe when multiple processors were not really prevalent I could accept it. Now I can not. I know better and now so do you (or at least you have my word of caution.) Short of citing examples and writing tutorials to show you I know better you know better from reading this PSA. You have an entry point to discovery. Go do it! NOW! The next time I see an app run and go get data and block the UX and create an unresponsive app I will bring out the gauntlet of shame and slap you with it! Since no one really reads my rants the world is pretty safe ... For the moment. Soon to follow is my PSA on creating threads all 'willy nilly'. There is a time and place for it... A good rule of thumb, never spin up another thread. And then only do so when a queued/scheduled task will not suffice. Do everything on one thread AS MUCH AS POSSIBLE, but be smart and don't tank your UX (I know I know, its not easy, this is tough love time.)

There is one exception to my tolerance, Dwarf Fortress, although since having gone to OpenGL (did I date my playing time?) I rarely encounter anything less than 45-60FPS except when my fortress is collapsing and/or filling with lava and water... (physics/fluid dynamics baby! the simulation demands it! the simulation must have its synchronous way with you! I have a very unhealthy love of Dwarf Fortress... I know this...)

CodeWorx Studios

Welcome! Satisfaction *not* guaranteed. Mileage may vary.