The first Cocos2D Podcast with Mohammad Azam (@azamsharp) from HighOnCoding.com and me is now online. Refer to the Cocos2D Podcast website for show notes and web links.
Listen to the Cocos2D Podcast (36 minutes).
And here’s the iTunes link for the Cocos2D Podcast.
Addendums
… to be laid off is kind of cool.
No, that’s not a freudian slip but not the whole story either. 😀
As the layoffs hit EA Phenomic and it was disclosed to us that we’ll never be working on 3D games for PC and consoles anymore, and instead we’ll be focusing on making webgames, you’d be either in the position where you would have to be laid off (eg 3D Artists) - which admittedly wasn’t “cool”. But if you were in a position like me where you could expect to stay with the company, but you simply had no interest in making webgames, you could volunteer to be put on the layoff list. The “cool” thing about that is that you wouldn’t have to quit, which makes a big difference in terms of compensation and treatment you reveice from the company as well as getting state support for unemployment. And you could save someone else’s job who actually wanted to stay with the company. So that was just a nice way to handle an otherwise difficult situation.
Also, as far as I know almost everyone who was laid off quickly got a new job or started new careers as freelancers. Some even moved abroad to the UK and Canada to work for Ubisoft. Most went on to work for Crytek and Blue Byte. And even those who I expected were going to have a hard time getting a new job in the game industry, mostly due to lack of experience and achievements, found new employment in other game studios small and big. I find this noteworthy because whenever situations like EA Spouse, the Red Dead Redemption crunch or the layoffs and shutdowns in 2008/2009, there’s going to be a huge amount of worry expressed by employees that they don’t want to be fired because there’s no one else hiring. This couldn’t be further from the truth!
The game industry was and still is an industry where it is ridiculously easy to get a job - even with little qualification and experience - but at the same time notorious for those who “made it” to sustain the worst working conditions. This probably goes hand in hand. I know that those who landed their first game development job were very eager to keep it (me included), and they know or (even worse) suspect that there are likely better hires out there than oneself. Which in fact is sometimes reinforced by management, but my experiences trying to hire qualified staff tells a different story: it’s really, really hard to find qualified game developers which is why it’s so easy to get in because you often have no other choice but to hire from those who applied, not necessarily from those you wish would have applied. So game developers maybe trying to prove themselves harder and are more concerned about their job safety than they need to be.
Celsius / Fahrenheit
Turns out I wasn’t too far off with my guess: 25 ºC = 77 ºF
Not as hot as Texas of course, but relatively speaking a hot day for spring in germany.
Stressful
At one point I mentioned that the popularity I gained from writing the Learn Cocos2D book, plus the websites I run, can be “stressful”. I’m referring to the obligation and personal responsibility that I feel towards people seeking my help. One of the strongest negative feelings I have is looking at all those requests, knowing I can’t help all of them, and not knowing where to start answering. I don’t even have a good way to measure who needs my help the most.
Some of the questions are easy to answer, but that also means they are already answered if you go look around (google is your friend). Other questions are challenging, and I like that because they pick my brain, but answering those would require at least an hour or more of research and would seriously cut into the time I need for other tasks. And a third class of question is simply those I can’t answer, or at least not by email. That’s either because I lack the knowledge and experience on the subject matter (for example, I barely have any Cocoa Touch programming experience yet), or because it requires a fair amount of understanding of project-specific details, including design goals and the actual source code. Then there’s countless of job inquiries which as a professional I feel I should at least politely decline but even that is eating up quite a bit of time.
I feel a certain responsibility to answer everyone’s inquiries, be it about a specific programming problem or seeking someone to hire in order to get their game project done, which is why it’s so hard for me not to do it. And that in turn causes stress, or anxiety. But as I started receiving more and more of these requests I was lagging behind answering them, up to the point where I had to purposefully ignore most of the requests. I needed to face reality and cut down on the total time I spend communicating while still getting the essential tasks done (client work or the projects I set myself out to do). Though necessary to ignore most requests, to me it still doesn’t feel right, or fair, especially after I promised to be responsive. This is what creates the stress I was referring to. It’s something I have to come to terms with and I can only apologize for it.
I decided to alleviate that situation by monitoring all of these requests and figure out what the most pressing issues are, and then focus on fixing what I call the “big picture issues”, be it by programming or documenting. Kobold2D is one such effort to fix the ongoing issue of getting to work with Cocos2D (template installation, project configuration, setting up libraries). The Xcode 4 Template Documentation is my attempt to fix the information void about Xcode 4 templates, especially since every bit of information about Xcode 3 Templates is null and void due to the significant format changes.
Book Update
The contract is signed, this summer an updated version of the Learn Cocos2D book will be published. It will likely be titled “Learn iPhone 5 and iPad 2 Cocos2D Game Development” and change all the source code to be compatible with v1.0 of Cocos2D. There will also be two new chapters which will be revealed at a later time. And I’ll fix the erratas that have been reported thus far.
One of the things I want to fix is that working entirely from the book will not cause compile errors anymore, this specifically means adding some more source code to chapters 3 and 4 I believe, where I’ve omitted a few lines of code in the first edition. The Game Center chapter will be improved to include the data send/receive example. There will certainly be a couple more changes in regards to iOS 5 (if available at the time) and new devices like iPad 2 and iPhone 5 obviously, and miscellaneous changes here and there.
As usual I’ll keep you posted on the progress.
An ongoing discussion about how to correctly send/receive data with Game Kit on Cocos2D Central prompted me to write a demo project to complement the Learn Cocos2D book’s Game Center chapter. The resulting working code is in this post, and also reprinted below.
The Game Kit Data Send/Receive Demo Project (download here) is based on the Learn Cocos2D book code made for the Game Center Chapter. It’s called Tilemap16 just to stay in line with the naming scheme.
You control the little Ninja as usual, but this time anytime you move it, it will also move on all other connected devices because the tile coordinate is sent via Game Kit to all connected players but only when it actually changes. The demo even allows you to move the Ninja on any device, and all others will follow, so it truly works in every direction. In addition, a score variable (int) is transmitted every frame just to show how to send different types of data at different times.
I wish I could have made a movie to show how cool this is but alas, my iPod was busy running the demo, so all I can show as proof is my iPod and iPad running the game with both Ninjas at the same position (mushy image made with my already-ancient iPhone 3G under perfect programming but terrible lighting conditions):
Source Code Example
In summary this is the code that’s used to send/receive data with the help of the GameKitHelper class I wrote for the book (also included in the download and free to use for anyone and any purpose):
[cc lang=”ObjC”]// add this to the header
typedef enum
{
kPacketTypePoint,
} EPacketTypes;
typedef struct
{
EPacketTypes type;
} SPacketInfo;
typedef struct
{
EPacketTypes type;
CGPoint point;
} SPointPacket;
[/cc]
Sending a packet:
[cc lang=”ObjC”]
-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint location = [touch locationInView: [touch view]];
SPointPacket packet;
packet.type = kPacketTypePoint;
packet.point = location;
gkHelper = [GameKitHelper sharedGameKitHelper];
[gkHelper sendDataToAllPlayers:&packet length:sizeof(packet)];
}
[/cc]
Receiving the packet:
[cc lang=”ObjC”]
-(void) onReceivedData:(NSData*)data fromPlayer:(NSString*)playerID
{
// first, assume it’s the general SPacketInfo, that way we can access type
SPacketInfo* packet = (SPacketInfo*)[data bytes];
switch (packet->type)
{
case kPacketTypePoint:
{
SPointPacket* pointPacket = (SPointPacket*)packet;
CCLOG(@”received point: %.1f, %.1f”, pointPacket->point.x, pointPacket->point.y);
break;
}
default:
CCLOG(@”received unknown packet type %i”, packet->type);
break;
}
}
[/cc]
Requirements & Setup
You need:
- 2 devices which are Game Center capable, eg they must have the Game Center App installed. If it isn’t, that device is not ready for Game Center. 1st & 2nd Generation devices up to iPhone 3G do not support Game Center. In addition Simulator will not work due to Matchmaking/Invites not being supported on the Simulator.
- 2 Game Center accounts (you can create dummy accounts via the Game Center App)
What you have to do:
- Create a new App on iTunes Connect, enable Game Center for that App, and replace the Bundle ID of your App with the one in the project’s info.plist. Please refer to the Game Center section in the iTunes Connect documentation.
- Make sure Push Notifications are enabled on all devices via Settings App.
- Run the Game Center App on both devices, login and make sure each device is logged in with a unique account. Then invite the other device’s account as friend and accept the friend request, this makes it easier to join each other’s matches.
- Build the Tilemap16 App and deploy it to both devices. Whenever you make a change to the code, you must deploy the App to both devices again, to make sure they run the same code.
- Run the App on one device, wait for the matchmaking screen to appear. Invite your other device’s friend account to join the match.
- Wait on the other device for the match invite to pop up. Tap Accept. The Tilemap16 game will launch.
- Tap Play Now on the first device once the other player has successfully connected and is ready.
- Move the Ninja on either device and watch it move on the other.
Enjoy!
Today is Christmas Eve. The last day of the Cocos2D Linkvent Calendar. I’d like to make you a gift, but I can’t give to all of you, so it’s going to involve a little competition.
This is your chance to win an unsuspected present: the print edition of my book. And signed. With a dedication of your choosing. Shipping and handling is on me, and I’ll send it worldwide. As long as you give me the correct address it should get there in between a couple days or a few weeks, hopefully in January.
I have five copies to spare, so there will be five winners.
How do I win the book?
It’s simple. Make a comment on this post. Tell me why you would like the book sent to you.
Make sure to enter a valid e-mail address in the appropriate field, so I can contact you in case you’re a winner. Winners are those that I like best, for some arbitrary reason I don’t even know about yet until I’ve read your comments. I am the jury and the judge but I’ll give you a fair trial after due consideration, or I’ll just flip coins if I can’t decide. Surprise me with something. I’m not looking for something specific, or merely praise or jokes. You could tell me your story, sing a song, draw a picture, record a video of yourself cracking a coconut, post a link to your blog, bribe me (hey, who knows?). Just keep it appropriate and PG13 rated, please. 😉
Deadline
I’ll give you time to post your comment for the remainder of the year, until midnight on December 31st. If in doubt I’ll consider your local time.
Discuss this topic on Cocos2D Central.
My Learn iPhone and iPad Cocos2D Game Development book is out and that inevitably meant it would appear on websites offering download links to illegal copies of the book.
Since there’s really nothing that can be done about it that actually works, and because I understand (but not necessarily condone) the reasons for downloading ebooks illegally, I wanted to take a different stance. And so I’m posting my thoughts on the matter on forums and websites, where a link to an illegal download of my ebook is shared.
That way, I hope to convert a minority of the downloaders to buying customers. But my actual goal is to use their websites as marketing instruments. Shamelessly placing my links on their websites and asking their users to come here is just fair and square. If they enable illegal downloads the very least they can do for me is to allow me to enable users to more easily come here, or on rare occassions to actually buy the book. Who said that illegal downloads can’t also be a mutual relationship?
Here’s what I’ve been posting to “warez” and “free ebooks” websites offering downloads or download links of my book:
My Response on Illegal Download Sites
I’m Steffen Itterheim, author of the Learn iPhone and iPad Cocos2D Game Development book.
I see that my book is offered here for download illegally, either directly or via linking to an externally hosted file. I wanted to share my thoughts on this matter.
1) I’m not offended, disappointed or furious.
Why should I be? It’s to be expected. I’ve been working long enough in the software industry to have come to accept piracy as something that shouldn’t affect you at all.2) I don’t judge you.
A lot of people download(ed) things from the Internet that they shouldn’t have. For some, it’s part of their culture. For others, it’s the only way to take part in a world that they couldn’t otherwise afford to join. For a few, it’s simply a hobby, or a habit. Some claim it’s for research and trying things out before buying, but quite honestly I think they fall in one of the aforementioned categories. Or they’re merely being pragmatic about their spendings, cutting corners where they can.3) I won’t lecture you either.
Piracy is a fact. It’s not even a market because if piracy wouldn’t exist, most pirated products wouldn’t be selling noticeably better anyway. Only very few pirates would ever buy a product they downloaded.Those are my convictions on piracy. I think it’s pointless to complain about piracy, and it would be especially stupid of me if I did so in the lion’s den, so to speak.
I’m a realist. I understand that some percentage of you will download the book just to have it. You’re the collectors, you may skim over the book before you set it aside in your amazingly well-assorted, categorized archive of eBooks. Enjoy it. Then there’s a percentage of you who download the book on a hunch that you might need it soon, or that it might spark your interest (again) in game development or programming for iOS devices. You probably wouldn’t buy it either. Except for a select few for whom the book did spark a flame - but how could you know beforehand?
To everyone else who truly want to read the book, I can only encourage you to buy the book in hindsight, after the fact. I know it costs quite an effort to pay for something you have already used, or read in this case. I still hope some of you will, I’d be grateful for that.
And what I’d really like you to do, regardless of where you got the book from and what your intentions are, is to stop by and visit my website Learn & Master Cocos2D Game Development:
I also want to make it very convenient to those who *might* consider buying the book, to actually do so. I know that one aspect of piracy that shouldn’t be neglected is merely convenience. So for that reason I’ll give you the links that lead you to Amazon and other websites all around the world which carry the book, as well as links to eBook versions of the book The Learn iPhone and iPad Cocos2D Game Development:
Purchase the print book via Amazon:
Amazon.com (United States)
http://www.amazon.com/Learn-iPhone-iPad-Cocos2D-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=books&qid=1284664414&sr=8-1Amazon.ca (Canada)
http://www.amazon.ca/Learn-iPhone-iPad-Cocos2D-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=books&qid=1284664526&sr=8-1Amazon.co.uk (United Kingdom)
http://www.amazon.co.uk/Learn-iPhone-iPad-Cocos2D-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=books&qid=1284664462&sr=8-1Amazon.de (Germany)
http://www.amazon.de/Learn-Iphone-Ipad-Cocos2d-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=books-intl-de&qid=1284664401&sr=8-1Amazon.fr (France)
http://www.amazon.fr/Learn-Iphone-Ipad-Cocos2d-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=english-books&qid=1284664539&sr=8-1Amazon.co.jp (Japan)
http://www.amazon.co.jp/Learn-iPhone-iPad-Cocos2D-Development/dp/1430233036/ref=sr_1_1?ie=UTF8&s=english-books&qid=1284664550&sr=8-1Purchase the eBook:
From Apress (PDF): http://apress.com/ecommerce/cart?act=add&bid=1524
NOTE: the Apress PDF eBook has no DRM, it is not copy-protected or password-protected. It’s probably the exact same file that is being shared here.From Amazon (Kindle): http://www.amazon.com/Learn-iPhone-Cocos2D-Development-ebook/dp/B004E0Z4YY
I hope you understand that if you offer my book for download illegally, it’s just fair to reply to that with promotion of my websites and making it a bit more convenient for the few people who tend to download books exactly because it’s convenient. At least this way I’m getting something positive out of it.
Thank you for your time and for allowing this message to be posted.
Steffen Itterheim
Mike Kasprzak has been a full-time indie game developer for five years now. He quit his job as Technical Director at Canadian game company Big Blue Bubble, with the words “being too ambitious for my own good”. What followed were 5 years of attempting to strike big as an Indie but, well, not doing so well after all in the XNA space. But things turned for the better when the iPhone SDK came along. In 2008 he created and released the puzzle game Smiles, it grew in popularity over time and from the lessons learned Mike began to make ports of the game, including Windows Phone 7. The game even won him a car!
Read Mike’s recap of his past five years being a full-time indie game developer.
Make sure you also check out his blog tooNormal ?! where you can learn a few more things about Mike. He is also running the Ludum Dare game competition and he wrote a chapter about writing portable code in the iPhone Games Projects book published by Apress.
Add your link to the Cocos2D Linkvent Calendar
Do you have something to share with the Cocos2D community? I haven’t received enough submissions to fill all the days until Xmas, although I do have enough links to post one each day, I’d rather post a link to your website or blog post.
Just today I was informed that the eBook version of Learn iPhone and iPad Cocos2D Game Development is now available in its final form!
UPDATE: the source code download (also on the book’s page, left side, under Book Resources) now includes all of the source code.
The print edition will follow sometime soon, hopefully within the next ~3 weeks.
On a related note, Ray Wenderlich joined forces with Rod Strougo to help finish Rod’s Cocos2D book, due to an oddly scheduled release date whose publisher apparently feels impossible to postpone. By that I mean to say: Rod’s wife is having a baby. Congratulations to that, and the book!
The winners of the Learn Cocos2D book contest are …
On Xmas day I started a Book contest where you could win 5 copies of the print version of my Cocos2D book. Now here are the winners!
Three Winners for outstanding contributions
These are the winners that I picked because of what they said in their comments respectively other contributions they made:
Marcotronic for his stunning adaptation of the Beatles’ song “Let it be”. He wrote new lyrics, then re-recorded the song with his own voice. It made me laugh and gave me goosebumps at the same time. I promote this to be the official Learn Cocos2D book hymn! 😀
Let it be: Learn Cocos2D
Dad of Geek And Dad for his heartwarming story about his neighbor being laid off. Things like that shouldn’t happen so undeservedly and I hope his neighbor finds renewed spirit when he receives the book as a gift.
The G man for being so passionate about Cocos2D besides his situation. He only has a dialup connection and the country he lives in doesn’t even allow him to register a domain or join the iOS Development program. I just hope there aren’t any import regulations for programming books.
G also posted this funny reimagination of the Cocos2D logo:
Those are the outstanding commentors that I simply could not resist gifting a book to because of their comments. Congratulations!
Three Lottery Winners
I still had two more winners to pick but couldn’t decide, so I chose to do a lottery to give everyone else a fair chance. I also decided I can spare one additional copy, so there are now 3 lottery winners chosen randomly from the remaining 22 unique commentors with the help of Excel’s RANDBETWEEN() function.
Without further ado, the three lottery winners are:
Dani
Tom
dzk34
Congratulations to all winners! I will contact you by email shortly.
I also wish everyone a Happy New Year 2011! May your code compile and your games sell.