iSimulate a must-have for iOS developers

I’m working on a new game that depends on the accelerometer, which makes testing in the simulator difficult. I asked on Twitter about a hack to use the accelerometer in the simulator and was pointed to iSimulate.

iSimulate is a brilliant application that runs on your iPhone, along with a library that needs to be linked into simulator builds of your application. The iSimulate application connects to your computer over your wireless network and lets you send accelerometer, compass, and multi-touch events to the iSimulate-enabled application running in the simulator.

After you finish developing your app, you can then use iSimulate to record video trailers & demos of your app.

Spam is killing Twitter

Twitter’s spam problem has been getting steadily worse, despite claims that they’re taking steps to stop the spam. It has reach the point where any time I mention a device whose name begins with ‘i’, I get as many as 10 spam replies. These spammers all follow a typical pattern and are very easy to identify.

 

Twitter spammers are easy to recognize

These spammers almost always have a generic icon, no followers, aren’t following anyone, and almost all of their tweets are @replies.

Twitter should be able to identify them and automatically block them. Until they do that, Twitter’s usefulness is severely limited.

Links for 2011-03-04 through 2011-03-07

Links for 2011-03-04 through 2011-03-07:

  • 4 Golden Rules of iPhone Game Design | Ezone.com App News – At the core of your game you need a simple, fun game mechanic. And I stress simple. In this A.D.D. world if you don’t grab players in the first 10 seconds, you’ve probably lost them. Unlike a console game they haven’t invested $50 (in all likelihood it’s $0.99 or nothing), so they have not made a big commitment to your game. If they don’t get it in the first 10 seconds, then they are going to hit the home button and launch something else.
  • Onramps | eliolhan – Luckily* I have techniques to get back on track when I feel blocked or unmotivated. Without adding any new code, I’ll clean things up:

    Conform code indentation to my house style
    Fix whitespace and tabs
    Remove stray blank lines
    Delete superfluous comments
    Remove commented-out NSLog() statements
    Group and label related methods

  • Fatal Distractions | eliolhan – I want to talk about what I’ve learned in the last few months about Distractions and how to fight them.
  • The 3 Ingredients of Successful iPhone Apps | Tapity – To me, say I put in 300 hours to make an app; I’ll call it a success if I make over $23,000 in the first year.
  • He Thinks Many People Will Like To Read It

Posted by Postilicious

Beware of [self init]

In a new app I’m working on, I created a series of lightweight cocos2d sprite subclasses which simply call the superclass init with some parameters. As soon as I called it I ended up crashing with a weird looking stack trace showing lots of nested calls to init methods.

Screen shot 2011-03-06 at 2.18.44 PM.png

My init methods were pretty simple:


@implementation Gummybear

-(id)init {
    return [super initWithName: @"gummybear.png"];
}

@end

My superclass’s init method used CCSprite’s initWithSpriteFrameName: method.


- (id)initWithName: (NSString*)name
{
    self = [super initWithSpriteFrameName:name];
    if (nil != self) {
		// do some more initialization here
    }
    return self;
}

It ultimately ends up calling initWithTexture:, which is where the problem lies. It turns out initWithTexture: is calling [self init]. Guess which init method was getting called?


-(id) initWithTexture:(CCTexture2D*)texture rect:(CGRect)rect
{
	NSAssert(texture!=nil, @"Invalid texture for sprite");
	// IMPORTANT: [self init] and not [super init];
	if( (self = [self init]) )
	{
		[self setTexture:texture];
		[self setTextureRect:rect];
	}
	return self;
}

The fix was to simply change the name of my init method to something else.

Links for 2011-02-28 through 2011-03-04

Links for 2011-02-28 through 2011-03-04:

  • Legendary game maker Graeme Devine on iPad game development pitfalls – Even seasoned, large iOS developers have dropped into the unfortunate habit of simply scaling up the graphics in their games but leaving interface and other game elements untouched – and from Devine’s perspective, this is a huge mistake. — this is a mistake we made with Removr.
  • APP ICON TEMPLATE – Photoshop template & actions to create iOS icons
  • Aperture Presets
  • How to Make Anything Signify Anything – Detail from a photograph of World War I cryptographers trained by William and Elizebeth Friedman, Aurora, Illinois, early 1918. By facing either forward or sideways, the soldiers formed a coded phrase utilizing Francis Bacon’s biliteral cipher.
  • Jeybee – Taking the Advantage with App Store Screenshots – Forget your app description for now, because 90% (80? 70?) of viewers will be doing the same. Apple knows this, and it is evident in the iTunes store. They only show a single line of your description, keeping the screenshots in view on any resolution. You see a similar thing in the iPad store. I suspect the only reason the iPhone store is any different is that the current setup is familiar to millions of people.

Posted by Postilicious

Links for 2011-02-22 through 2011-02-26

Links for 2011-02-22 through 2011-02-26:

  • OS X Lion Walkthrough: Versions and Auto Save – Two new features that have found their way in the first Lion developer preview but might seem too complicated or “hidden” as only Apple applications support them right now are Versions and Auto Save. With auto-saving capabilities for documents and a proper versioning system in place, Apple is aiming at simplifying the workflows of many users that have to deal with dozens of documents on a daily basis but often forget to save changes and are inevitably forced to start over. To put it simply, Lion will let you work on your documents without having to worry about saving anything. If you do want to save a specific version of a document, however, you can do so in order to access it later from a Time Machine-esque interface that will let you revert to a previous version of a document at any time. Let’s see how it works.
  • Tiny Wings – Huge Success [Stefan Sorin Nicolin, Spielhaus] – With all these AAA titles coming out for the iOS platform (and elsewhere) there are still some games who pop out of nowhere and climb the charts in no time as if there is nothing easier in the world to accomplish.
  • [devel] OpenGL ES 2.0 support « cocos2d for iPhone – The idea is to use this thread to discuss how to implement OpenGL ES 2.0 support without the need to write a shader for each CCNode.
    The idea is that if the CCNode contains a shader, then it should use it, otherwise it should continue rendering itself using the GL ES 1.0 code.
  • Django Reinhardt: A Look Behind the Namesake of WordPress 3.1 | Blogging, WordPress, Social Media, Web Publishing – WordCast – With the release of WordPress 3.1 and announcement that this version was named Django Reinhardt, WordPress fans around the world are now learning about Django Reinhardt, the legendary and often overlooked jazz guitarist and composer.
  • Cocoa Samurai: Practical Design Patterns with Blocks and Grand Central Dispatch – When Mac OS X 10.6 was introduced, the Mac got a very powerful duo of developer tools that made development on a lot easier. With iOS 4.0 developers finally got access to these tools as well. These tools are known as Blocks & Grand Central Dispatch.
  • Does the world *really* need yet another Twitter client, RSS reader, ToDo list or backup application? « Successful Software – My heart sinks every time I hear a would-be-entrepreneur announcing they have written yet another Twitter client, RSS reader, ToDo list or backup application. Haven’t we got enough of those already? There are more than 1,900 Twitter apps already (possibly a lot more). Somebody probably released another one while I was writing this post. We have passed the Twitter app event horizon, where it is probably quicker to write your own custom app than it is to try and work out if any of the existing apps fulfils your requirements.

Posted by Postilicious

MacBook Pro disappointment

When Apple introduced the MacBook Air late last year, they called it The Next Generation of MacBooks. I was really hoping the new MacBook Pro would inherit many of its attributes, such as the thin profile, light weight, and standard SSD. Although the new models are a nice improvement over the old MacBook Pro, with faster processors & improved graphics, they’re still just as big and heavy.

After using the 3 pound 13″ MacBook Air, I will never go back to a big laptop that weighs 5 pounds or more. I would have preferred to see much thinner MacBook Pros with no optical drive and a standard SSD drive. Despite the slower processor, I find my MacBook Air to be almost as fast as my old 15″ MacBook Pro thanks to the much faster SSD. I would still love to see a “super MacBook Air”, with the fastest CPU & graphics from the MacBook Pro and 8GB RAM, but without too much extra size & weight by keeping the SSD and eliminating the optical drive.

Links for 2011-02-15 through 2011-02-22

Links for 2011-02-15 through 2011-02-22:

Posted by Postilicious

Echo Chamber Effect

I’m sure you’ve heard the stories that Steve Jobs has “6 weeks to live”. I’m not sure if it’s true or not – I certainly hope it isn’t, but I don’t consider it a credible news story. It’s still just a rumor.

The original source of that story is the National Enquirer based on a few photos and a doctor who diagnosed his condition and predicted how long he has left based only on looking at a photo without having any direct knowledge of Steve’s medical history. This is not good journalism.

The story was picked up by 9to5Mac and developed a life of its own as other sites reported it as fact. Until Steve Jobs himself or his representative makes a statement, it’s still just a rumor.