Game Maker's Garage Forum

Game Maker's Garage => Trash Talk => Topic started by: Gan on October 20, 2010, 03:55:44 PM

Title: Now is the time to learn Obj-C!
Post by: Gan on October 20, 2010, 03:55:44 PM
Any of you guys seen the Mac OS Lion keynote?
Looked pretty awesome. (http://www.apple.com/apple-events/october-2010/)

They are planning on releasing a Mac App Store. I bet there will be a gold rush just like with the original app store.
I'm going to be jumping on that wagon, it's quite a bit easier to make a mac game. I think the chance of making nice money is quite high.

So why Obj-C to get on the app store? If the Mac App Store is similarly set up like the iPhone App Store then there are going to be bundle IDs and such that Obj-C compiles into your app.

So I propose that any who want to learn post here. I'll do my best to teach.
I secondly propose that Sc should ready itself for the inevitable. For (A) To make apps that can get up on the Mac App Store and (B) Get itself up on the Mac App Store.
I'm pretty sure if Sc were to be coded in Obj-C that not only would it be tons faster but getting it on the Mac App Store would make it's popularity sky rocket.



-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Gnome on October 20, 2010, 05:55:59 PM
Oh my god yes.

Indie Development is about to get a huge gain.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 20, 2010, 06:05:06 PM
I hatehatehate Objective C. Really... this isn't just my rebellion complex speaking here, I think it's syntactically ugly and confusing as hell.
Title: Re: Now is the time to learn Obj-C!
Post by: Gnome on October 20, 2010, 06:07:10 PM
Just a thought, does it have to be Obj-C? I mean the iphone app store opened for some other languages, I don't see why this one can't.
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 20, 2010, 07:24:30 PM
Fuck Objective-C.

Fuck it to hell.

What a fucking pile of shit. Over one hour and I can't make a fucking app that shows a fucking hello world messagebox.

FUCK Objective-C and FUCK Xcode.
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 20, 2010, 07:33:37 PM
I agree with Mike on this one.

Objective C is too much to deal with. RB is simple and cross platform. Tick a box for Windows and you're reaching a wider audience (although it's generally better to design the interfaces separately, at least that's what I learned after MemoNet which bombed because it looked and acted like a PC application).
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 20, 2010, 08:45:08 PM
Quote
Just a thought, does it have to be Obj-C? I mean the iphone app store opened for some other languages, I don't see why this one can't.
The app stores are native to Obj-C, that is Apple's main language.
The other tools have figured ways to compile apps with IDs and provisioning profiles to look like Obj-C native apps. Those other tools just need to be made to support Mac as they do iPhone and bingo.

Quote
I hatehatehate Objective C. Really... this isn't just my rebellion complex speaking here, I think it's syntactically ugly and confusing as hell.
That's so strange. You're repulsed by it and I find it beautiful and elegant. To me it is so much easier than any other language I've ever used. Even better than Sc, Java, Vb.net, and Haskell.

Going down memory lane I realize I tried learning Obj-C right after I learned Sc. No dice. Tried learning after Tnt, no go. Then after Vb.net, no success. It wasn't till I did Java that I was able to grasp at something other than straws. How I learned Obj-C was by going for the iPhone first. It's 10x easier to learn by iPhone than by Mac. Everything's just simpler, then when you switch from iPhone back to Mac you understand and things click.

Quote
Mike's Comment
You can sit in front of a book full of latin words and try to write "Mary Had a Little Lamb" in Latin though you aren't gonna get anywhere. You need a coherent dictionary. Sadly Apple's docs were made for the people in the know. They are incomprehensible to normal human beings. If you want to look you gotta google for beginner friendly tutorials and examples that do what you want to do. Then you study that code, experiment and try to replicate the success. Eventually you'll start understanding and connecting the dots.

Quote
I agree with Mike on this one.
 
Objective C is too much to deal with. RB is simple and cross platform. Tick a box for Windows and you're reaching a wider audience (although it's generally better to design the interfaces separately, at least that's what I learned after MemoNet which bombed because it looked and acted like a PC application).
Yeah you are right. RB certainly is much more learner friendly. Xcode expects you to understand. Though Xcode's power exceeds RB's. There are trade offs though in the long run Obj-C is a great language to learn.

So Mike, you want a 5 min hello world message box application tutorial.
Anyone else want a tutorial explaining something?


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 20, 2010, 09:21:55 PM
I've written client/server systems in Java and a multi-million dollar grossing advertising system in PHP/MySQL - and I couldn't intuitively figure out how to make a gotdamn button display a gotdamn message box in Objective-C.

I had this figured out in REALbasic in 5 minutes. When I was 12.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 20, 2010, 09:29:44 PM
All I see when I look at obj-c syntax are those ugly hard brackets everywhere.

obj-c:

Code: [Select]
Thing *myThing = [Thing new]; 

AHH SO CRYPTIC

java:

Code: [Select]
Thing myThing = new Thing();

Ahhhh :)
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 20, 2010, 10:19:11 PM
I <3 those brackets.
To you they look useless. Once you get into it you realize what they're actually for and you realize that they work miracles.

@Mike
That sounds impressive. It's too late right now, I'll post a video and source of what you need tomorrow.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 06:04:39 AM
Seriously man, there's a fine line between showing off and genuinely wanting to help people.

Quote
I <3 those brackets.
To you they look useless. Once you get into it you realize what they're actually for and you realize that they work miracles.

The brackets are just a syntax difference.
Title: Re: Now is the time to learn Obj-C!
Post by: Teruri on October 21, 2010, 07:10:38 AM
I tried using Xcode to make a simple program to help me write better stories. Simple stuff like calculating average word length and highlighting long and short sentences. I couldn't figure it out, though. The code looks very confusing.
The upside to Xcode is the easy to use interface builder. So I do have a nice interface with clickable buttons, but they don't do anything (except for a rest button, that one actually works).
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 10:11:53 AM
Quote
Yeah you are right. RB certainly is much more learner friendly. Xcode expects you to understand. Though Xcode's power exceeds RB's. There are trade offs though in the long run Obj-C is a great language to learn.

Yeah, RB's more learner friendly and because of that, more powerful that Objective C. If a class doesn't exist on RB, you can make it. It's a system that allows you to write in parts of the language if it doesn't exist.

The problem with Xcode is the elitist crap that comes with it. Somehow, by using RB, we're "lesser developers". How? Because we're not using Apple's SDK? I'm still making software for a platform which has less available software than Windows, so why is there a problem?
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 12:50:44 PM
Quote
Seriously man, there's a fine line between showing off and genuinely wanting to help people.
I'm just kinda excited. :)

Quote
I tried using Xcode to make a simple program to help me write better stories. Simple stuff like calculating average word length and highlighting long and short sentences. I couldn't figure it out, though. The code looks very confusing.
The upside to Xcode is the easy to use interface builder. So I do have a nice interface with clickable buttons, but they don't do anything (except for a rest button, that one actually works).
It is quite hard to just learn by playing with it. If you Googled for some tutorials it'd help immensely.
If you still have that program I can make a video on connecting the interface to the code. Also made code to do some stuff.

Quote
Yeah, RB's more learner friendly and because of that, more powerful that Objective C. If a class doesn't exist on RB, you can make it. It's a system that allows you to write in parts of the language if it doesn't exist.
Learner friendly doesn't necessarily mean it's more powerful. It can be spread to a larger crowd though the performance isn't as powerful.
Obj-C works similarly. You can create classes and such.

Quote
The problem with Xcode is the elitist crap that comes with it. Somehow, by using RB, we're "lesser developers". How? Because we're not using Apple's SDK? I'm still making software for a platform which has less available software than Windows, so why is there a problem?
Obj-C is a lower level programming language. It's a tiny step above C. C is right above machine code. I think machine code is the base. RB is kinda slow and clunky. It's like a programming language on a programming language. It layers it's runtime over different languages which allows portability but decreases performance significantly.
Programmers who program in RB aren't any lesser. They just aren't making programs as high performance as natively made programs. Such as C#, C, and Obj-C programmers.

Here's the message box tutorial:
5 min long. (http://www.youtube.com/watch?v=_qFwYiQ-GxI)
Source:
Message Box Source (http://cl.ly/5b9299a7fd137d25c8fd)

If you guys want I can make a tutorial on how to make a game from scratch.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 01:04:37 PM
Alright here we go:

[size=15]Gandolf, please help me learn Objective C by writing a game tutorial![/size]

I hope you feel really warm and fuzzy now.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 01:11:25 PM
I do. I shall. I will.

Give me 30 min.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 01:20:48 PM
Heh.

Also:
Quote
Obj-C works similarly. You can create classes and such.

Lol.

Quote
Obj-C is a lower level programming language. It's a tiny step above C. C is right above machine code. I think machine code is the base. RB is kinda slow and clunky. It's like a programming language on a programming language. It layers it's runtime over different languages which allows portability but decreases performance significantly.
Programmers who program in RB aren't any lesser. They just aren't making programs as high performance as natively made programs. Such as C#, C, and Obj-C programmers.

Machine code -> Native assembly -> C level -> BASIC level -> SC / GM level

Machine code -> Native assembly -> Virtual machine -> C#/ Java Level

Basically.
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 01:25:29 PM
RB compiles binaries. So does Xcode. They're both native to the system already.

Personally I think you just take whatever Apple does as better than anything else.

I mean, if Apple decided that Xcode was rubbish and replaced it with RealBasic, you'd be calling Xcode a pos like you are RealBasic :\\
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 02:37:53 PM
Are you sure RB compiles binaries? Or does it already have precompiled binaries that is filled with it's libraries and that it inserts resources?
I believe RB takes already compiled binaries and fills it. Which creates another layer and lesser performance.

I like Xcode because it works for me. It's stable, simplistic interface, to me easy, and even free. I know that Obj-C due to it's low level has incredible performance that RB can't stack up against.

Here's an article that also helps sum it up:
http://forums.realsoftware.com/viewtopic.php?f=10&t=7075

Rb is nice with it's cross-platform and easy learning curve. Obj-C is nice with it's functionality and performance.

Neither are bad, it's all a matter of choice and what you need.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 02:45:42 PM
Quote
I do. I shall. I will.

Give me 30 min.
Sorry I took longer than 30 minutes but...

Scratch Game Making Obj-C Tutorial Part 1 (http://www.youtube.com/watch?v=0-bqDsPwh7o)
Scratch Game Making Obj-C Tutorial Part 2 (http://www.youtube.com/watch?v=V6VrnI63I5o)
Source (http://cl.ly/e7aa5ab603d04f9d8645)


-Gan
P.S. Here are the methods to fill the NSView:
Code: [Select]
-(void)awakeFromNib { 
      
}
- (void) timerTick: (NSTimer *) gameTimer {
      
      [self setNeedsDisplay:YES];
}
 
- (void)mouseDragged:(NSEvent*)theEvent{
      //CGPoint aMousePoint = CGPointMake([self convertPoint:[theEvent locationInWindow] fromView:nil].x, [self convertPoint:[theEvent locationInWindow] fromView:nil].y);
      
      [self setNeedsDisplay:YES];
}
- (void)mouseUp:(NSEvent*)theEvent{
      //CGPoint aMousePoint = CGPointMake([self convertPoint:[theEvent locationInWindow] fromView:nil].x, [self convertPoint:[theEvent locationInWindow] fromView:nil].y);
      
      [self setNeedsDisplay:YES];
}
 
- (void)keyDown:(NSEvent*)theEvent{
      unichar aKey = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
      if (aKey == NSUpArrowFunctionKey) {
            
      }
      if (aKey == NSDownArrowFunctionKey) {
            
      }
      if (aKey == NSLeftArrowFunctionKey) {
            
      }
      if (aKey == NSRightArrowFunctionKey) {
            
      }
}
- (void)keyUp:(NSEvent*)theEvent{
      unichar aKey = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
      if (aKey == NSUpArrowFunctionKey) {
            
      }
      if (aKey == NSDownArrowFunctionKey) {
            
      }
      if (aKey == NSLeftArrowFunctionKey) {
            
      }
      if (aKey == NSRightArrowFunctionKey) {
            
      }
}
 
- (BOOL)isFlipped{
    return YES;
}
- (BOOL)acceptsFirstResponder {
      return YES;
}
 
- (void)drawRect:(NSRect)dirtyRect {
    // Drawing code here.
      
}
 
-(void) dealloc {
      
      [super dealloc];
}
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 02:48:12 PM
What? RB programs run, they're carbon so they're backward compatible with everything since OS 9, they're fast, they're easy to make, they can be as powerful or resource-wasting as you like so what does it matter?

I give up.

Xcode is the next best thing since sliced bread and I'm going to swear an oath to Apple under a picture of the Queen.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 03:11:18 PM
Quote
What? RB programs run, they're carbon so they're backward compatible with everything since OS 9, they're fast, they're easy to make, they can be as powerful or resource-wasting as you like so what does it matter?
You're confused Tel. RB programs are just like normal programs. Though they're built using old carbon or still buggy cocoa libraries. Besides that RB sets a layer on top of the program. That layer allows RB to be in essence its own language. Though the layer also causes a decrease in performance. Anything made in Rb won't be as fast as Obj-C just for that reason.

Quote
Xcode is the next best thing since sliced bread and I'm going to swear an oath to Apple under a picture of the Queen.
Xcode isn't the next best thing since sliced bread but it is useful. It gets the job done and even though it requires a large learning curve the results are fantastic.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 03:40:36 PM
That layer deals with the GUI and letting it interact with the OS.

Just because Carbon is old doesn't make it worse than Cocoa. Carbon is far superior in its flexibility and Apple are stupid deprecating it.
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 21, 2010, 03:48:59 PM
REALbasic compiles real machine code. The code references a framework (runtime) which handles all of the built-in RB classes such as Window, Socket, etc.

The latest versions have beta Cocoa support. If you compile a Carbon app and a Cocoa app, they both compile the exact machine code - only the framework is different.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 03:53:53 PM
Quote
That layer deals with the GUI and letting it interact with the OS.

Just because Carbon is old doesn't make it worse than Cocoa. Carbon is far superior in its flexibility and Apple are stupid deprecating it.
The layer still causes a slowdown.
Want to know something? Compare a game made in Sc to a game made in RB. If they are the same game RB will run faster. Why? Sc adds an extra runtime layer. Same between RB and Obj-C.

As far as I know Apple went for Cocoa to make it not only easier on the programmers to program but to have a more efficient framework for developing applications.

@Mike
Quick question. Realbasic uses an actual compiler to compile the code or is the app already compiled and it just inserts resources? If it uses an actual compiler how does it compile for pc on a mac?


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 03:57:29 PM
This is a stupid argument. Different tools are best for different jobs. I would never think of writing a networking application in C++, I'd use something simpler like Java (Telstar would use RB) that hides the gory details. At the same time, no one would want to write something like a modern 3d graphics engine in RB. You need low-level access to the GPU to write optimized 3d and RB doesn't have that functionality.

Neither is better, they're just different and have different purposes.

Likewise, if you go on Tigsource (a major indie-gaming forum), there are plenty of developers that use only Gamemaker (not Al's ;)). They get along just fine with the C/C++ people; both groups realize that the tools are meant to do different things.

BTW Xcode is an IDE. Has nothing to do with a specific language.

EDIT - I assumed that RB was interpreted, I'm actually interested in how that works now.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 04:06:48 PM
Well said.

Quote
EDIT - I assumed that RB was interpreted, I'm actually interested in how that works now.
I've always thought it was interpreted as well.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 04:15:20 PM
Gandolf is the one suggesting that Mike ports SilverCreator to Objective C. He clearly doesn't want to, and you make a list of all the reasons as to why RealBasic sucks - mainly the gist of the argument is it's not an official Apple product OMG heathen get it out of my face etc and therefore is worth less than Obj C. At least that's what I gather from reading between the lines.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 04:42:19 PM
Gan's message with Apple propaganda removed: things get slower with every level of code above assembly, so SC would be faster if it was written in obj-c.

Personally I think that SC is doing just fine, while I'd like to see some extra functionality (especially being able to interrupt paint events, as we've discussed), it is more than fast enough for the types of games it is intended for.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 05:21:59 PM
Speed is nice but Sc is already pretty good.

My proposal was for Sc to get on the Mac App Store. Would be a huge popularity boost.

Though the Mac App Store regulations state:
Quote
2.1

Apps that crash will be rejected
2.2

Apps that exhibit bugs will be rejected
2.3

Apps that do not perform as advertised by the developer will be rejected
2.4

Apps that include undocumented or hidden features inconsistent with the description of the app will be rejected
2.5

Apps that use non-public APIs will be rejected
2.6

Apps that are “beta”, “demo”, “trial”, or “test” versions will be rejected
2.7

Apps that duplicate apps already in the App Store may be rejected, particularly if there are many of them
2.8

Apps that are not very useful or do not provide any lasting entertainment value may be rejected
2.9

Apps that are primarily marketing materials or advertisements will be rejected
2.10

Apps that are intended to provide trick or fake functionality that are not clearly marked as such will be rejected
2.11

Apps that encourage excessive consumption of alcohol or illegal substances, or encourage minors to consume alcohol or smoke cigarettes, will be rejected
2.12

Apps that provide incorrect diagnostic or other inaccurate device data will be rejected
2.13

Developers “spamming” the App Store with many versions of similar apps will be removed from the Mac Developer Program
2.14

Apps must be packaged and submitted using Apple’s packaging technologies included in Xcode – no third party installers allowed
2.15

Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations
2.16

Apps that download or install additional code or resources to add functionality or change their primary purpose will be rejected
2.17

Apps that download other standalone apps will be rejected
2.18

Apps that install kexts will be rejected
2.19

Apps that require license keys or implement their own copy protection will be rejected
2.20

Apps that present a license screen at launch will be rejected
2.21

Apps may not use update mechanisms outside of the App Store
2.22

Apps must contain all language support in a single app bundle (single binary multiple language)
2.23

Apps that spawn processes that continue to run after a user has quit the app without user consent will be rejected
2.24

Apps that use deprecated or optionally installed technologies (e.g., Java, Rosetta) will be rejected
2.25

Apps that do not run on the currently shipping OS will be rejected
2.26

Apps that are set to auto-launch or to have other code automatically run at startup or login without user consent will be rejected
2.27

Apps that request escalation to root privileges or use setuid attributes will be rejected
2.28

Apps that add their icons to the Dock or leave short cuts on the user desktop will be rejected
2.29

Apps that do not use the appropriate Mac OS X APIs for modifying user data stored by other apps (e.g bookmarks, Address Book or Calendar entries) will be rejected
2.30

Apps that do not comply with the Mac OS X File System documentation will be rejected

3. Metadata (name, descriptions, ratings, rankings, etc)

3.1

Apps with metadata that mentions the name of any other computer platform will be rejected
3.2

Apps with placeholder text will be rejected
3.3

Apps with descriptions not relevant to the application content and functionality will be rejected
3.4

App names in iTunes Connect and as displayed on Mac OS X should be the same, so as not to cause confusion
3.5

All app icons should be similar, so as to not to cause confusion
3.6

Apps with app icons and screenshots that do not adhere to the 4+ age rating will be rejected
3.7

Apps with Category and Genre selections that are not appropriate for the app content will be rejected
3.8

Developers are responsible for assigning appropriate ratings to their apps. Inappropriate ratings may be changed by Apple
3.9

Developers are responsible for assigning appropriate keywords for their apps. Inappropriate keywords may be changed/deleted by Apple.
3.0

Developers who attempt to manipulate or cheat the user reviews or chart ranking in the App Store with fake or paid reviews, or any other inappropriate methods will be removed from the Mac Developer Program
Check out 2.14 and 2.5.
Mike definitely showed interest in a popular Sc. Though Sc would have to be bundled by Xcode in Obj-C. So I'm willing to help out.


-Gan
P.S. No more complaining about these rules and the Mac App Store. There's nothing we can do about it and complaining gets in the way of making progress.
P.S.S.
Quote
reading between the lines.
Sometimes that actual meaning is in the text.
P.S.S.S.....

Quote
Sorry I took longer than 30 minutes but...

Scratch Game Making Obj-C Tutorial Part 1 (http://www.youtube.com/watch?v=0-bqDsPwh7o)
Scratch Game Making Obj-C Tutorial Part 2 (http://www.youtube.com/watch?v=V6VrnI63I5o)
Source (http://cl.ly/e7aa5ab603d04f9d8645)


-Gan
Video's back up. In 2 parts.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 05:38:00 PM
There is no way Apple would allow a development tool, no matter what it's programmed in.
Title: Re: Now is the time to learn Obj-C!
Post by: Gnome on October 21, 2010, 05:50:52 PM
Here's the Way I see it, C, and its variants, are pretty much the standard for Programming.

Obj-C, is a variant of that, which means learning it would be a huge step in Learning C.
Obj-C also supports many things, such as 3D graphics, etc...

Finally, apple definately is going away anytime soon. So if you plan to be an indie game maker, you'd have apple's full support.

Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 06:12:37 PM
Quote
Apps that encourage excessive consumption of alcohol or illegal substances, or encourage minors to consume alcohol or smoke cigarettes, will be rejected.
That does it. Installing Ubuntu.

Look at 2.15. MindVision and Stuffit are screwed.

Quote
P.S. No more complaining about these rules and the Mac App Store. There's nothing we can do about it and complaining gets in the way of making progress.
Yes sir, polish your shoes sir?
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 06:31:07 PM
Quote
There is no way Apple would allow a development tool, no matter what it's programmed in.
Why wouldn't they? It doesn't break any of the regulations.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 21, 2010, 06:36:16 PM
You could potentially make a program with it that would.
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 06:39:55 PM
Apps that use deprecated or optionally installed technologies (e.g., Java, Rosetta) will be rejected. - REALbasic uses Carbon at present, cocoa still in beta stage, games made with SC require user to learn SC's syntax.

Apps must be packaged and submitted using Apple’s packaging technologies included in Xcode; no third party installers allowed - SC distributed in a compressed archive.

Apps that use non-public APIs will be rejected - REALbasic.

Apps that present a license screen at launch will be rejected - LOL. That's Quicktime and iTunes rejected, then.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 06:46:33 PM
Quote
You could potentially make a program with it that would.
I doubt that'd be much of an issue. A user making a program in Sc that destroys their own computer.... Doesn't sound plausible.
I think it'd have a good chance of getting through.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 06:54:13 PM
[size=10]Apps that use non-public APIs will be rejected.[/size]

RB is proprietary; therefore SC is proprietary and anything built with SC is proprietary, so it will have some issues getting through.
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 21, 2010, 07:11:52 PM
Quote
I doubt that'd be much of an issue. A user making a program in Sc that destroys their own computer.... Doesn't sound plausible.
I think it'd have a good chance of getting through.


The whole point is that it shouldn't have to get through anything. We have a free and open platform with the Mac OS - why the hell would anyone consent to it being closed down like iOS?
Title: Re: Now is the time to learn Obj-C!
Post by: Gnome on October 21, 2010, 07:16:39 PM
Quote


The whole point is that it shouldn't have to get through anything. We have a free and open platform with the Mac OS - why the hell would anyone consent to it being closed down like iOS?


Mike, its not closed down. We can still download whatever we want.

The Mac App store is basically the equivalent of a flash games website.


On a side note:
I'd never thought I'd say this, but the Xcode interface is fun!
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 21, 2010, 07:19:22 PM
Quote
Mike, its not closed down. We can still download whatever we want.

The Mac App store is basically the equivalent of a flash games website.


I don't know. I just don't think it's a good sign going forward.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 07:23:06 PM
Everything's still the same as it use to be.
Only thing added is an easy and fast way to find great and reliable applications.
I would love to see Sc as one of them. The only roadblock would be converting Sc to Obj-C so it could get on the app store.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 21, 2010, 07:31:44 PM
Quote
We can still download whatever we want.

For now. That can change whenever Apple feels like making more money.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 21, 2010, 07:47:55 PM
Stop being so paranoid. The Queen's not going to be assassinated tomorrow, Bill Gates won't become poor, and Apple won't make a decision to lock down the Mac platform and in turn infuriating and destroying it's user base.

In the Keynote even Steve Jobs said that applications could be received the regular way despite the app store.

On a side note, for anyone going through the tutorials. Build often. Building shows possible bugs and updates the Interface Builder about outlets.


-Gan
P.S. Sorry for everyone following the scratch game tutorials. Here are the NSView methods:
Code: [Select]
-(void)awakeFromNib {
      
}
- (void) timerTick: (NSTimer *) gameTimer {
      
      [self setNeedsDisplay:YES];
}

- (void)mouseDragged:(NSEvent*)theEvent{
      //CGPoint aMousePoint = CGPointMake([self convertPoint:[theEvent locationInWindow] fromView:nil].x, [self convertPoint:[theEvent locationInWindow] fromView:nil].y);
      
      [self setNeedsDisplay:YES];
}
- (void)mouseUp:(NSEvent*)theEvent{
      //CGPoint aMousePoint = CGPointMake([self convertPoint:[theEvent locationInWindow] fromView:nil].x, [self convertPoint:[theEvent locationInWindow] fromView:nil].y);
      
      [self setNeedsDisplay:YES];
}

- (void)keyDown:(NSEvent*)theEvent{
      unichar aKey = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
      if (aKey == NSUpArrowFunctionKey) {
            
      }
      if (aKey == NSDownArrowFunctionKey) {
            
      }
      if (aKey == NSLeftArrowFunctionKey) {
            
      }
      if (aKey == NSRightArrowFunctionKey) {
            
      }
}
- (void)keyUp:(NSEvent*)theEvent{
      unichar aKey = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
      if (aKey == NSUpArrowFunctionKey) {
            
      }
      if (aKey == NSDownArrowFunctionKey) {
            
      }
      if (aKey == NSLeftArrowFunctionKey) {
            
      }
      if (aKey == NSRightArrowFunctionKey) {
            
      }
}

- (BOOL)isFlipped{
    return YES;
}
- (BOOL)acceptsFirstResponder {
      return YES;
}

- (void)drawRect:(NSRect)dirtyRect {
    // Drawing code here.
      
}

-(void) dealloc {
      
      [super dealloc];
}
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 22, 2010, 02:46:41 AM
Quote
I would love to see Sc as one of them. The only roadblock would be converting Sc to Obj-C so it could get on the app store.


I'm not converting it. If Apple won't take REALbasic programs in the store, then they can rot.
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 22, 2010, 05:04:41 AM
FIGHT THE POWER
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 22, 2010, 10:02:47 AM
Quote


I'm not converting it. If Apple won't take REALbasic programs in the store, then they can rot.
It's not that Apple won't, it's that they can't.
Apple can't take anything but Xcode made products cause anything not made by Xcode can't be analyzed. If Apple took any product from anywhere there'd be pirated games, applications that steal user data and other harmful products.
The Mac App Store may become a big deal 88 days from now when it launches. Ignoring it won't do anything but cause Sc to fall a little further into the void.
That game maker has done some incredible things, without it most of us wouldn't be where we are today. I'm willing to put a little effort into making Sc better. Why aren't you?


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 22, 2010, 10:13:08 AM
You've just killed any chance of a moderate and reasonable discussion.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 22, 2010, 11:48:47 AM
Quote
You've just killed any chance of a moderate and reasonable discussion.
I'm sorry you feel this way.

But I would like to continue a reasonable and productive discussion with anyone else that would like to do so.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 22, 2010, 11:59:29 AM
Quote
Apple can't take anything but Xcode made products cause anything not made by Xcode can't be analyzed. If Apple took any product from anywhere there'd be pirated games, applications that steal user data and other harmful products.

We've been using things not made with Xcode for years now. Sure you can analyse what programs do. You can look at what they read and write, where they store information, what packets they send and receive - they have testing labs specifically built for this purpose, truth is that Apple is just... well... cheap.

I don't know where this not-Objective C/pirated games and anarchy combination comes from. OS X is supposed to be secure and free from harm - Apple's words, not mine - is OS X somehow not what it's supposed to be? Should we all go out and panic buy Norton for Mac with that logic?
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 22, 2010, 01:17:15 PM
The App Store's #1 priority is safety. Apple doesn't want lawsuits so it has to restrict the kinds of apps that can get in.

There are 2 major scans Apple does. The first is the review. It's where a tester spends time playing with the application to see if it behaves appropriately. Though many things can be hidden from the tester.
Then 2nd test is where a computer analyzes the application in search of undocumented APIs. Undocumented APIs can give access to a program to potentially destroy a computer.

If Apple allows any program of any language then the second scan is worthless. They can't detect if the application uses potentially dangerous code.
The first scan by itself isn't good enough.
For example I could make an app in Java that is good in every sense and passes the first scan. Though in the code I hid a timer that after a week the app starts collecting personal data and sending it off to be sold to an advertising company.

If Apple allowed any program in then that example Java app could get in without detection. Then wreak havoc. Though with the second scan Apple can detect code in the program that accesses certain APIs and stop the app.
The second scan can only work because Apple made Obj-C.
That's one of the reason's what the Android store is so unreliable and a few studies have found many common apps that use personal data.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 22, 2010, 02:53:28 PM
:(

























get a life
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 22, 2010, 02:59:47 PM
You guys are so predictable.
Title: Re: Now is the time to learn Obj-C!
Post by: Silverwind on October 22, 2010, 05:31:31 PM
In fairness Tel, you seem quite Hell-bent on stating your opinion, and Gan's only doing the same thing with considerably less aggression. Don't start making personal remarks.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 22, 2010, 06:08:12 PM
Quote
get a life
Ok.

Quote
You guys are so predictable.
Yeah.

So I posted two tutorials, one on making a messagebox and the other on making a game from scratch. Anyone find them useful?


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Hendo on October 22, 2010, 06:19:09 PM
You guys are a bunch of whining babies. Programming isn't supposed to be easy. It's supposed to be powerful and flexible. You guys seem so afraid of a new challenge that can be EXTREMELY profitable.

Don't knock Obj-C just because you aren't intelligent enough to learn it.
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 22, 2010, 06:37:59 PM
take a joke, lighten up etc.

I just fail to see why Apple's gentrification of their own platform is a positive thing. Fine, goldrush etc, but what about the long term? Am I the only one that cares about SC and GM being cast even further into obscurity because Apple are about to turn the Mac into a walled garden where Objective C is realistically only allowed to exist? It just makes me ill.

I've spent nearly my entire teenage years telling people that Apple are awesome and that they care about developers; now it seems they only care about where the money comes from. It makes me sick that they would even consider imposing rules on what is going to be the primary distribution channel for - let's face it - 50% of all Mac software. Little communities like this are just going to be gone.

Sorry if my opinions seem to be a source of offence, it's just that the only platform that has ever catered to my principles is about to become everything I thought it wouldn't.

I now wonder where else there is left to go. I'm pretty sure that Apple don't deserve a single penny off me for anything ever again, and they certainly don't deserve my developer support off me if they tell me that I will never get anywhere with Mac development if I don't use their in-house tools - fine, that's not what they've said, but read between the lines.

Whatever happened to the Think Different company... sigh
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 23, 2010, 07:38:10 AM
Quote
they only care about where the money comes from
Apple's sitting on 50 billion and have barely touched it. They literally have no need for money.

Quote
It makes me sick that they would even consider imposing rules on what is going to be the primary distribution channel for - let's face it - 50% of all Mac software.
They have no choice. If anything could get in the Mac App Store it would be unreliable and anyone who downloaded anything destructive or privacy violating could sue.

Quote
read between the lines.
Sometimes the meaning is in the text.

Quote
Whatever happened to the Think Different company... sigh
It's still there and making new stuff. Seriously, a dedicated App Store that'll be on every Mac. This is definitely a first of it's kind for a computer platform. (Just wait till windows copies it)


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 23, 2010, 11:09:56 AM
Quote
Seriously, a dedicated App Store that'll be on every Mac. This is definitely a first of it's kind for a computer platform. (Just wait till windows copies it)

INSOLENCE

http://en.wikipedia.org/wiki/Advanced_Packaging_Tool

This tool is pretty much the new Mac App Store in command line form. There's a whole slew of package managers and reference servers - Damn Small Linux has one built right into the system and has done for years, as does Ubuntu and if I'm not mistaken, Haiku has one too. It's great. You connect to these servers, look through the packages - if there's one you want, you download it and the OS does the rest. It's the same concept as the App Store, except Apple have just put in more opportunities for you to spend money.

Quote
Sometimes the meaning is in the text.

No. Apple want to turn the Mac into a walled garden slowly - it's implied. 10.7, sure, you could download apps the old way. But in 10.8, will there be any need? Just insert a bit of code into Safari or the WebKit to stop you downloading any archives which might contain .app or .exe files freely and oh look, Apple's share price just went up $50.

The only reason the "protection of customers" meaning is in the text because that's what you'd like to see.

Quote
They have no choice. If anything could get in the Mac App Store it would be unreliable and anyone who downloaded anything destructive or privacy violating could sue.

again, no - the developer would get sued, it's not difficult to add a bit into the EULA that says "we accept no responsibility for the applications here - if they break your computer, talk to the developer, it isn't our problem". Also - seriously - when was the last time you downloaded any Mac app that was destructive? What's to say that an unscrupulous and incredibly naughty Objective C developer won't write an encrypted virus into an application that is set to deliver a payload after a few months? That's not very safe, and Apple wouldn't be able to check for it in that all of one half of ten minutes that they probably spend testing and checking an application.

Quote
Apple's sitting on 50 billion and have barely touched it. They literally have no need for money.

Irrelevant - their executives get paid bigger bonuses each time their revenue increases and their shareholders get paid bigger dividends. If you ask me I think Apple have chucked their principles because they've been corrupted by the evil dollar...
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 23, 2010, 01:03:12 PM
Found this on another forum, I completely agree with it:

Quote
Obviously, they're not going to accept applications which are likely to cease working in an OS version or two.  That's not good for the consumer.  I like to think of that, the "no private APIs" rule, etc. as a partnership between you and Apple -- you agree not to do a few things, and in return, they agree to do their very best to keep your app working across OS updates.

Re: Java, what they are prohibiting is not "using Java", but "relying on the presence of Java-the-optional-install".  If you can embed a JRE in your application, or use GCJ, Alchemo or similar to produce a native executable, you would appear to be in the clear...

Given an OS with a command prompt, interpreters for endless scripting languages, free and open-source development tools, etc. I can't really envisage a future where the App Store is the *only* way to get applications.  That would require locking down the OS in ways that consumers wouldn't accept (and that would make the OS useless to a significant number of the users, Apple internally not least).

I *can* envisage it being the only way to reach 90+% of users.  But then again, currently you have *no* way to reach most of those users.  They surf Facebook, write emails, make their iMovies and sort their iPhotos.  Soon they'll be buying apps too.

Disclaimer: I work for Apple, but do not speak for them.  These opinions are my own.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 23, 2010, 01:13:58 PM
OneSadCookie is a fantastic guy. Has helped me with a few programming related questions.

Though on topic, nice excerpt WarHampster. Basically sums up what I've been trying to get across.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 23, 2010, 01:24:18 PM
Yeah, I first ran across him on the iDev forums as well. That post is from TIG source, however.
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Mike on October 23, 2010, 03:55:19 PM
Quote
You guys are a bunch of whining babies. Programming isn't supposed to be easy. It's supposed to be powerful and flexible. You guys seem so afraid of a new challenge that can be EXTREMELY profitable.

Don't knock Obj-C just because you aren't intelligent enough to learn it.


What the hell? Programming is supposed to be hard? That's elitist bull.

Not everyone programs for profit.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 23, 2010, 04:14:55 PM
Quote
What the hell? Programming is supposed to be hard? That's elitist bull.
Programming is hard. It takes effort and hard work. At least for me it does...

Quote
Not everyone programs for profit.
Profit just means a gain in something.
I find Sc profitable because it has taught so many people how to program.
Everyone programs to gain something. Wether it's knowledge, satisfaction, or money.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 23, 2010, 05:08:44 PM
The point is that just because something is more difficult does not make it better.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 23, 2010, 05:14:02 PM
Quote
The point is that just because something is more difficult does not make it better.
True.


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: GMG Hendo on October 24, 2010, 03:59:06 PM
I honestly don't see what is so big and scary about Obj-C. Almost everyone here is only here to make games. Gandolf has great templates for game making anyway.

Obj-C is even dead easy for basic desktop software. It only gets complex, when you want do do something complex. Sure you have to type out extra code to do what seems to you a one liner. But it's because it's a trie subset of the C language, its very powerful and flexible, and it wants you to program it it to do EXACTLY what you want. For instance javascript doesn't even make you declare data types. Some people love it, I think it's just stupid.

Stop being so afraid to learn new skills. It's like the old evolution theory. Those that can't adapt, will fade, and perish. Get used to it, it's how technology works.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 24, 2010, 04:25:21 PM
Mmm, I think that C based languages are overkill for simple programs.

If I want to make a tile based RPG, I'd take like half an hour with SC and have a framework done, no need to delve into memory management or anything.

On the other hand the complexity of lower level languages is needed for other types of programs. Like I said before, use the right tool for the job. Don't waste time writing thousands of lines of C if an easier method works just as well.
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 24, 2010, 05:16:24 PM
Both of you guys are right.

Though there are ways to make a low level language have just as little complexity as a high level language.

Take OpenGl for example, if I want to draw a sprite to the screen it takes a ton of code. Dealing with the camera, perspective, bounds, viewport, textures, and all sorts of complex stuff.
It is not nice at all.

Now lets take Sc for example, one line and bam! Now that was easy.

They both accomplish the same thing. Sc was easier, though OpenGl is incredibly faster with a near unlimited speed at your fingertips.


I love amazing performance but don't like so much work. So I take Obj-C and downsize the complexity to that of Sc.
All the code it takes to draw a sprite I just stick in a method. That method is:
Code: [Select]
- (void)drawImage:(Image*)image AtPoint:(CGPoint)point

Therefore it takes me one line to draw a sprite in Sc and one line to draw a sprite in Obj-C. The only difference is the crazy performance. ;)


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 24, 2010, 05:28:14 PM
My point is that you don't need that performance for simple stuff.
Title: Re: Now is the time to learn Obj-C!
Post by: GabrielCA on October 24, 2010, 06:24:23 PM
Even lower than Objective-C, C++, C#, straight C : assembly.

Quote
My dad had to use Assembly all the time back in the days of Kobalt, Fortran and... well... Assembly. It's way too time consuming to be practical. It's a nightmare to do anything you could do simply in anything else.

I wouldn't build apps in assembly for efficiency anymore than I'd build a TV for efficiency.

Well if that's what drives you, let nobody stand in your way. :)

Just don't expect to finish your first app before you're 70! ;D Hehehe...
Title: Re: Now is the time to learn Obj-C!
Post by: Telstar5 on October 24, 2010, 09:21:52 PM
RealBasic was written by winners. Good capitalist folk who want to make money in a garden that needs no regulation or sunlight, because it basks in its own glow. When RealBasic is left to grow unrestricted, we all get to share its delicious capitalist fruit.

However, C in any form is a filthy communist language, written by the reds to corrupt our youth and destroy our purity of essence. Therefore Gan, I am afraid I have to arrive at the conclusion that you are a COMMIE

I have been in touch with the House Committee on Un-American Activities for this filthy socialist behaviour.
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 24, 2010, 09:45:20 PM
Comrades, the era of Real Basic oppression is over! Going forth we shall be united in government regulated and distributed Objective-C!
Title: Re: Now is the time to learn Obj-C!
Post by: Gnome on October 24, 2010, 09:51:18 PM
In soviet Russia, Objective-C Regulate you!
Title: Re: Now is the time to learn Obj-C!
Post by: Gan on October 24, 2010, 09:58:50 PM
GAH! I've been discovered!

Must hide...!


-Gan
Title: Re: Now is the time to learn Obj-C!
Post by: Silverwind on October 25, 2010, 11:35:07 AM
This thread is so deserving of a musical spinoff! Now lets see... I'm thinking something by Bob Dylan.
Title: Re: Now is the time to learn Obj-C!
Post by: GabrielCA on October 25, 2010, 08:59:10 PM
What about "The times, they are a-changin'" ?

EDIT: Or : "The times most commonly used programming languages, they are a-changin'"
Title: Re: Now is the time to learn Obj-C!
Post by: Silverwind on October 26, 2010, 03:43:49 PM
I was going with that, but it's quite long and I have precious little time. I went with Blowin' in the Wind instead: http://www.mediafire.com/?0i6nwomnntl65dm

EDIT:

Almost forgot:

Quote
Verse 1
C / F      C / Am      C / F      G / G7
How many codes must a man note down, before you can call him a man?
C / F      C / Am      C / F      G / G7
How many C's must a programmer learn, before he can truly program?
C / F      C / Am      C / F      G / G
How many times must a group project fail, before we stick to the plan?

Verse 2
C / F      C / Am      C / F      G / G7
How many years must a Mac fan exist, before he converts to PC?
C / F      C / Am      C / F      G / G7
How many tears must that man then resist, before he goes crazy?
C / F      C / Am      C / F      G / G
How many times can we just turn our heads, and pretend that we're fair referees?

Verse 3
C / F      C / Am      C / F      G / G7
How many times must a man look it up, before the command's memorized?
C / F      C / Am      C / F      G / G7
How many fears must that one man have, before he can see through the lies?
C / F      C / Am      C / F      G / G
How many times must the Mac win out, before we accept that they're right?

Chorus
F / G      C / E7 / Am
The answer my friend, is don't ask Silverwind.
F / G      C
The answer is don't ask Silverwind.
Title: Re: Now is the time to learn Obj-C!
Post by: GabrielCA on October 26, 2010, 04:41:27 PM
Quote
The answer my friend, is don't ask Silverwind.
lol
Title: Re: Now is the time to learn Obj-C!
Post by: WarHampster on October 26, 2010, 06:21:33 PM
@Silver -  :D
Title: Re: Now is the time to learn Obj-C!
Post by: Silverwind on October 27, 2010, 04:57:07 AM
This is the third topic I've turned into a musical parody, now I'd love to see someone go the extra mile and turn one into a movie! (especially if it starred Chow Yun Fat)
Title: Re: Now is the time to learn Obj-C!
Post by: Connors on November 04, 2010, 08:17:03 PM
I'll jump in for this one, it sounds intriguing. ALSO, Here's what I have found when trying different languages: SC is cool because it's easier to make certain kinds of games, but is limited outside that area. TNT is trickier but more useful for different things, and theres a trade off, i.e. arrays work better, you can change the resolutionm, you can make tile maps quickly etc. Basically,
more complex/challenging = more powerful