Editor's Note: iPhone and Game

iPhone and Game

This week, The Escapist takes a closer look at the iPhone, the object of game developers' affection and hardcore gamers' cynicism.

Read Full Article

I've thought about becoming an iPhone game developer, until I realised that I would have to learn the excremental Objective-C language:

- (void)drawView {

const GLfloat triangleVertices[] = {
0.0, 1.0, -6.0,
-1.0, -1.0, -6.0,
1.0, -1.0, -6.0
};

[EAGLContext setCurrentContext:context];
glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
glViewport(0, 0, backingWidth, backingHeight);

// -- BEGIN NEW CODE

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glVertexPointer(3, GL_FLOAT, 0, triangleVertices);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_TRIANGLES, 0, 3);

// -- END NEW CODE

glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
[context presentRenderbuffer:GL_RENDERBUFFER_OES];

[self checkGLError:NO];
}

even though the indentation has been removed you can tell that this is as clear as mud.

I'm browsing your site and posting from my iPhone right now, which I do from time to time. Speed is okay when I have wifi, otherwise the site is cumbersome on the iPhone screen. How about a mobile version like google news or GameSpot?

 

Reply to Thread

Log in or Register to Comment
Have an account? Login below:
With Facebook:Login With Facebook
or
Username:  
Password:  
  
Not registered? To sign up for an account with The Escapist:
Register With Facebook
Register With Facebook
or
Register for a free account here