News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

Objective C

Farted by RomanClock, August 18, 2010, 12:58:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RomanClock

I am making some programs for iPhone. ObjC is kind of odd, mostly because of how different the syntax is. Anyone else tried programming in ObjC or would like help or get their foot in the door?
lemayo lol :soups:

AmberArachnidClock

I would love to be able to make some stuff for the iPhone (one of the reasons I got flash cs5 grumble grumble). Any tips for a complete beginner with experience in AS3?

RomanClock

Quote from: Unfinished Zombie Game;1778845I would love to be able to make some stuff for the iPhone (one of the reasons I got flash cs5 grumble grumble). Any tips for a complete beginner with experience in AS3?

It depends on how well you can pick up the syntax of another language really, here's some basic comparisons (also note its more similar to programming in C/C++ since you also use header files for classes):

Declaring an Object:

AS3:
var myObj:MyClass = new MyClass();

ObjC:
MyClass myObj = [MyClass init];
(note: might have to allocate memory)


Declaring a function:

AS3:
function myFunc(a:type, b:type, ...):returnType {...}

ObjC: (in the header file)
- (returnType)myFunc:(type)a:(type)b:...;
(can use also use a + [static])


Calling a function:

AS3:
myFunc(var1, var2, ...);

ObjC:
[myFunc a:var1 b:var2 ...];
(This was one of the weirdest things)
lemayo lol :soups:

screwdriver_clock

Hey Roman, did you sign up with Apple to be an iPhone developer? It's free to sign up for that, and you get loads of documentation on Obj-C that will teach you how to use it.

http://developer.apple.com


Once you feel comfortable, spend the $99 dollars on a liscense and maybe buy a Mac, then you can develop apps and use the Virtual iPhone software to test you stuff.

But yeah Objective C will let you make OS X apps as well so keep going.

Also: SageClock just released Proximity for the iPhone, so you could definitely ask him how he went about learning Obj C.

SageClock

Yep, I've learned quite a bit about Objective-C over the past six months. Right now I'm probably more comfortable programming in that than in anything else except maybe C# or C. If you have any questions, you can ask me. I've seen and figured out quite a few compiler and logic errors, and might be able to save people some time.

RomanClock

Quote from: Cap'N Crunch;1778914Hey Roman, did you sign up with Apple to be an iPhone developer? It's free to sign up for that, and you get loads of documentation on Obj-C that will teach you how to use it.

Ive been looking into making games on the iPhone for almost half a year, the problem was I didn't have a mac to program on! XD
lemayo lol :soups:

SageClock

Do you have one now? I've heard some people have been able to get started by using a PC with hackintosh, although it wasn't a good long-term solution.

Loki Clock

Before I learned C++ I accidentally programmed some Obj-C when making custom enemies and levels for Adanaxis. Now it's hardly comprehensible to me. So maybe the best way to learn is how one learns HTML - with view source, copy & paste, and trial & error.

SpongeClock SquarePants

i would like to compile my flash to android + iphone apps.

SageClock

for iphone, it's possible, but you won't have the app approved on the app store, because apple and adobe are no longer best friends.

Loki Clock

You only need a Macintosh to use Cocoa. Obj-C itself can be programmed on any OS.

DWARFINATORclock

Why not develop games for Android?

Loki Clock

Quote from: DWARFINATOR;1781621Why not develop games for Android?

There's no why not, there's just the system you have or have picked. It's the same way with any other kind of software. If you own a Windows you develop for Windows, because you can test the thing.

screwdriver_clock

Quote from: Loki;1781678There's no why not, there's just the system you have or have picked. It's the same way with any other kind of software. If you own a Windows you develop for Windows, because you can test the thing.

There is no why not, only Zuul

SageClock

Quote from: DWARFINATOR;1781621Why not develop games for Android?

If I get a job I interviewed for recently I'll be programming in Java a lot, so I might take the opportunity to port Proximity in my free time since Android also uses Java. I don't own an Android phone to effectively test on it, though (there's a simulator, but those aren't quite the same as the real thing. my brother has an old android phone, but i can only test it on there every once in awhile).

I've also heard that each phone has a limit to the maximum version of Android you can install, and that each version of Android OS has different, strange quirks to them, to the point where you almost need a separate device for each OS to properly test Android games, so that's weighing heavily against me learning how to make games for those devices as well. If they could get the OS'es relatively predictable to the point where you only need one device, it might be reasonable.

Plus with Apple, you don't need a $400-$600+ phone to develop for it. You only need a $200 iPod Touch. Much more reasonable. And a computer, but I needed a new one at the time anyway and just picked up a Macbook, which will run both Mac OS and Windows.

DWARFINATORclock

Quote from: SageClock;1781713I've also heard that each phone has a limit to the maximum version of Android you can install, and that each version of Android OS has different, strange quirks to them, to the point where you almost need a separate device for each OS to properly test Android games, so that's weighing heavily against me learning how to make games for those devices as well. If they could get the OS'es relatively predictable to the point where you only need one device, it might be reasonable.
I didn't know that.
Quote from: SageClock;1781713Plus with Apple, you don't need a $400-$600+ phone to develop for it. You only need a $200 iPod Touch. Much more reasonable. And a computer, but I needed a new one at the time anyway and just picked up a Macbook, which will run both Mac OS and Windows.
Are Android phones still that expensive? I have one but I got it when I renewed my plan a few months back so I never had to pay any extra money for it.

SageClock

They're probably cheaper if you're willing to sign up for an expensive 2-year contract :)

I get away with only spending ~$20/month on my crappy AT&T pay-as-you-go phone right now.

DWARFINATORclock

Quote from: SageClock;1781744They're probably cheaper if you're willing to sign up for an expensive 2-year contract :)

I get away with only spending ~$20/month on my crappy AT&T pay-as-you-go phone right now.

I pay 17 bucks a month, and that includes unlimited internet, 250 texts and 250 calling minutes. And it's a 2 year contract.

SageClock

With an Android phone, too? Really? Who do you use? I was under the impression that your plan level  (without internet) was $30/month minimum with most carriers.

PimpMasterKDOG

Roman, I recently got a cheap refurbished Dell Mini 10v to start compiling basic programs and haven't had any problems so far.  I'd recommend the hackintosh route if you want to give the interface builder and iPhone simulator a whirl.

Does anybody here have anything in the App store?  I'm trying to get a basic engineering calc tool built within the next 6-8 weeks to get a little exposure at the consulting firm I work at.

-->KDOG
{{ olskoo.cc }}