Show HN: Build an iPhone Game in your Browser
makegameswith.us
makegameswith.us
Sorry for being this person...
Your init selector should return 'instancetype' and not 'id' if it is an instance of the class you're returning (which init should!)
Not much of a benefit here, but it's a good habit to get into.
The benefit comes once you do protocols for multiple classes that could return an instance of the class.
@protocol SHReversing <NSObject>
-(instancetype)SH_reversedObject;
@end
@interface NSArray (SHReversing)
<SHReversing>
@end
@interface NSOrderedSet (SHReversing)
<SHReversing>
@end
The clang link seems to confirm that it doesn't even make a difference to throw @protocols into the mix, it only seems to consider the method name.
I assume building a faster build service is on the roadmap though. Cool stuff!
Looked for the red exclamation mark, didn't find one.
I'm a developer, I've done some C but I've never wrote an iphone application in Objective-C.
Seeing "Your game will be written in Objective-C, the language that is used to write all native iPhone apps" I first assume that your target is people that want to learn how to code an iphone game with no programming knowledge (I think I can safely assume that every programmer knows that you are using objective-c to develop native iphone applications).
From this point of view, there a lot of things that I find bothering: On the first screen: "Go ahead and create a class-scope variable int screenHeight; right above the line @implementation GameplayLayer but below the #import lines. ". But why here ?? What is "#import" ?? And what "@implementation GameplayLayer" does ?? Then you explain what "[CCDirector sharedDirector]" is but not why I have to put a second level of '[' around this.
Later: "Notice the asterisk. We will cover later why you MUST declare anything that isn't a primitive with an asterisk, for now just take our word for it". Again...I want to learn how to code, but I'm told to write something without asking too much questions about it...
Then finally I see a "Basic Syntax" section...is there anybody still around?
So after these few pages, I really don't understand who you want to get to use your application:
- Developer with basics knowledges of programming? I'm one but when I'm trying to learn something and I see "Write this things, we'll cover it in the chapter 35, section F", I don't really want to continue. I want to learn and understand what I'm doing.
- Developers with basics knowledges in Objective-C that want to specifically learn how to make a game? Well, when you explain at the first page what Objective-C is, your are going to lose them all.
- Non-developers that want to learn? Do you really think that they can learn by writing code and executing it without understanding anything ??? I don't. It's too complicated to make them understand without basics knowledge? Then, send them to a tutorial that covered the necessary basis and thell them to come back after.
I also thought that the goal wasn't too learn to code anything but just to "build an iPhone Game in your browser", but then why even bother myself to write code? Could I just have a nice interface when I can drag & drop my ships please?
So, I'd like to know what is the profile of a typical user that would do the entire tutorial, and get some benefit from it: ie you give him xCode and he gives you back a game (or even something that works).
Thanks
I think the target is more likely to be people who don't have Macs (given that you can only use XCode with a Mac, not a windows PC or Chromebook).
It would seem a android emulator is far easier to build but i may be wrong.
Edit: Cocos2d port Cocos2dx is also available for android.
In terms of revenue, Android may be catching up, but iOS will remain significantly more profitable for the forseeable future. Also, support for Android is a nightmare.