iPhone SDK in February!

Moderator
Posts: 771
Joined: 2003.04
Post: #16
Taxxodium Wrote:Correct, iPhone nor iPod Touch support Flash. But who needs Flash anyway?

You can perfectly make games in Javascript that are both fun and visually appealing. Don't worry about the speed. Safari's Javascript is one of the best I've seen, and I speak from experience.

I think you *should* worry about the speed:
http://furbo.org/2007/08/15/benchmarking-in-your-pants/

Code:
Let’s run some benchmarks comparing the iPhone to my iMac running Safari 3 on a 1.83 Ghz Intel Core Duo processor:
Test     iMac     iPhone     Slower by
100,000 iterations     0.041 secs.     3.209 secs.     78x
10,000 divisions     0.005     0.413     82x
10,000 sin(x) calls     0.009     0.709     79x
10,000 string allocations     0.010     0.777     78x
10,000 function calls     0.010     0.904     90x

And...
Code:
Let’s see how Javascript compares to native code running on the iPhone:
Test     Native     Javascript     Slower by
100,000 iterations     0.015 secs.     3.209 secs.     214x
10,000 divisions     0.004     0.413     103x
10,000 sin(x) calls     0.105     0.709     7x
10,000 string allocations     0.085     0.777     9x
10,000 function calls     0.004     0.904     226x
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #17
Let's stay focused here OK. Ofcourse making a game that uses a lot of math, and especially sin and cos functions, will be slower in Javascript than on any other language.

Javascript is not the solution for that. Instead of thinking of making a DOOM game for the iPhone, concentrate on a simple game like Tic-Tac-Toe or even a Tetris clone would do.

Strange that the guy who did the benchmarks didn't mention the connection speed.

At work I tested the iPod Touch on a website that heavily uses JavaScript (my own scripts) and it worked acceptable using a WiFi (ADSL) connection. Lots of Ajax and lots of playing with the DOM and doing effects like fades etc..

Ofcourse a desktop computer will outperform an iPhone, but that's not the point. Even if somehow Apple decided to make the SDK C based with OpenGL support, it will still be slower than the desktop.

"When you dream, there are no rules..."
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #18
The second test compares iPhone's JavaScript code vs. iPhone's native code: function calls are 226 times slower.
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2007.02
Post: #19
Wait, this doesn't look so good anymore - the only thing we're going to be allowed to run on an iPhone is Widgets ? And without flash too you say ? Cry Puh. My excitement now seems misplaced - we aren't going to be getting our native 3D games on iPhone Sad I guess it was quite fanciful to think that it would be allowed..? Wacko
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #20
Where are you reading that?
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2007.02
Post: #21
Well, this email from ADC, "Introducing the iPhone Dev Center". It says "..your single source for information on desiging, coding and optimizing web applications for iPhone and iPod touch."

Then there are sections like "Web development guidelines", "Safari Compatibility" and "Web App Submission".

This leads me to assume it means Widgets only Sad
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #22
I'm thinking the current iPhone dev center has little or nothing to do with the SDK that's being released in February. It's just an expansion of what they already had for developing web applications for the iPhone.

...but then, I'm an optimist, so who knows. Smile
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2007.02
Post: #23
Oho! That's good - now I can be happy again! Smile
Quote this message in a reply
Post Reply