Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
63,544
30,852


Michael Johnson released Corridor, dubbed "the first 3D game for the iPhone".

Beyond that, Johnson's game also supports the iPhone's accelerometer as the controller for the game.


corridor_300.png


The instructions are a bit hard to follow without seeing the game, but makes sense when you start playing.
1. If you see protrusions on the left and right, hold the iPhone in portrait mode.
2. If you see protrusions on the top and bottom, hold the iPhone in landscape mode.
3. Do NOT change the orientation of the iPhone while you are in a section with protrusions. This will cause you to crash.



Article Link
 

darwen

macrumors 6502a
Apr 12, 2005
668
13
California, US
Lets start a high score page... 4921 is the best I have done, I have just played it twice. I might try to get a better score later.
 

bdj21ya

macrumors 6502a
Sep 13, 2006
559
0
Again, I want to reiterate, this program does not rely on the accelerometer. It relies on the width of the safari viewport.
 

benspratling

macrumors 6502
Jan 16, 2006
417
136
random bug, or didn't have a chance from the start?

If you have to hold the iPhone one way in verticals and another way in horizontals and you can't change it while in either, then there's no possible way to handle a vertical immediately following a horizontal - which is where my game ended.

It's a cool idea, but it illustrates why developers need an actual application not just javascript: 3D graphics are not 3D at all, and animations are sadly slow and jerky. My javascirpt experiments are leaving my own animations much to be desired. This phone can do cover flow, but with javascript it can't smoothly move so much as a text field smoothly off screen without either running out of run time first, or moving so much that it appears jumpy!

Come on Steve, what happened to "Cocoa is the premeire language for Mac OS X Development?"
 

bdj21ya

macrumors 6502a
Sep 13, 2006
559
0
If you have to hold the iPhone one way in verticals and another way in horizontals and you can't change it while in either, then there's no possible way to handle a vertical immediately following a horizontal - which is where my game ended.

It's a cool idea, but it illustrates why developers need an actual application not just javascript: 3D graphics are not 3D at all, and animations are sadly slow and jerky. My javascirpt experiments are leaving my own animations much to be desired. This phone can do cover flow, but with javascript it can't smoothly move so much as a text field smoothly off screen without either running out of run time first, or moving so much that it appears jumpy!

Come on Steve, what happened to "Cocoa is the premeire language for Mac OS X Development?"

I agree, this is pretty lame. At least give us some sort of dashcode environment for heaven sakes. Have you tried using .gif animations and stepping through the frames with javascript?

Also, developers could do some really cool stuff, even with javascript, if Apple would just explain how to get data from the accelerometer
 

Bemused

macrumors newbie
Mar 19, 2004
3
0
Tip: Quick way to start a new game

while this isn't the most exciting game I've ever played its entertaining.

I'm no expert but I believe that you have time to switch the orientation before a new protrusion. So the last couple comments are overly critical. The game works on the iphone you're either moving the orientation too quickly or waiting too long - thus sploding your head. I think that's the whole point of the game.

Here's a tip. To start a new game quickly, instead of waiting for the new game window to load just hit your safari forward arrow and it will start you right at a new game.
 

emjayiam

macrumors newbie
Jul 13, 2007
2
0
can you speed it up = maybe twice?

Unfortunately, JavaScript just doesn't execute terribly fast on the iPhone. The only way to speed it up is by dropping frames at this point. I may be able to make some code tweeks but I don't expect to be able to do much about the speed.

On a side note, you start out moving along z-axis at 30 pixels per frame. Every 'cube' of the map you make it through adds 1 pixel to that speed. So as you progress, you speed up.
 

emjayiam

macrumors newbie
Jul 13, 2007
2
0
If you have to hold the iPhone one way in verticals and another way in horizontals and you can't change it while in either, then there's no possible way to handle a vertical immediately following a horizontal - which is where my game ended.

Actually, there is never a horizontal and a vertical section back to back. I took that into consideration when coding things. You are guaranteed to have at least 1 open section between orientation changes.
 

guzhogi

macrumors 68040
Aug 31, 2003
3,740
1,831
Wherever my feet take me…
"YOUR HEAD A SPLODE!":eek:


If I had a nickel for evertime I...er...nevermind.

Yeah, I know. Especially when there's only 1 section between having to turn. I keep thinking "Can I turn now? Can I turn?" Plus, sometimes I get that immediately b/c I'm holding my iPhone in one way and it starts out in the other way.
 

air-ick

macrumors member
Jul 15, 2007
38
0
I think this game was created to make you drop your i phone thus creating more sales.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.