Archive for OpenGL

Saving Battery Power in a turn-based game

Posted in Uncategorized with tags , , , , , on August 2, 2010 by bersaelor

I got inspired by a post on the toucharcade-forums by ed_welch who describes how he throttles FPS manually to the minimum value any animation needs to run.

Now I figured, I could render my game with 1 FPS as long as nothing happens, so I changed my code the following way:

  • I start the game with a frameInterval of 60.
  • Once I get a “touchesBegan” I go up to 2, that is 30FPS.
  • Once I get a “touchesEnded”, I check whether there is any animation going on (the spinning arrows above a selected unit for example) or whether there is still another touch going on. This was pretty straight forward, since I store the points each finger started touching at in a CFDictionary, so I just needed to get its count and check if it’s zero. Then I set the frameInterval to 60 again
  • My games main logic-class conforms to a “AnimationResponder” -protocol and the drawing classes store it as a “id<AnimationResponder> delegate”. So once an animation ended, I send this information to the main class and it throttles the FPS back to 1.

The result was so good, I could even feel a difference in the heat of my iPod!

Thank you Ed Welch!

Advertisements

To VBO or not to VBO ?

Posted in Uncategorized with tags , , , , , , , , on August 2, 2010 by bersaelor

As I mentioned in the last post, a friend lend me an iPod 3G to test its hardware. I already compared CPU for its performance in filling the interleaved vertex array.

Now I’m going to have a look at the GPU, specifically the advantages of using Vertex Buffer Objects on the new PowerVR SGX chip.

Continue reading

OpenGL ES performance outline

Posted in Uncategorized with tags , , , , , on July 23, 2010 by bersaelor

For comparison against other 3D Engines, I wanted to publish my frames per second and triangles per second results.
I just want to be sure I didn’t miss any important trick I could have used to speed everything up.

Continue reading

Preview of the 1.5 Graphic Improvements

Posted in Uncategorized with tags , , , , , on July 12, 2010 by bersaelor

I just felt like jumping around in the library because I got the new multisampling (Antialiasing!) feature in iOS4 working, here’s a life screenshot from my iPod 3Gen:

Continue reading

Speeding up vertex-array fillrates: Sequential Loop vs. vDSP

Posted in Uncategorized with tags , , , , on July 4, 2010 by bersaelor

Recently I saw the WWDC presentation on the Accelerate-framework Apple provides for the iPhone.

Now I thought to myself: “My, one very big part of my 3D-Engines code is dedicated to putting 3D geometry information into interleaved arrays, maybe I could speed that up?”

Continue reading

thinking about the iPad

Posted in Uncategorized with tags , , , , , on February 22, 2010 by bersaelor

Well, the tech blogs are overflowing with information, so I guess everything important is said somewhere else.

Yet I just watched Evan Dolls lecture in the CS193p Lecture.

Mockup of Tactica like it could look on an iPad:

Continue reading

weird ways of using OpenGL ES on the iPhone

Posted in Uncategorized with tags , , , , on February 6, 2010 by bersaelor

This is a post explaining and describing my 3D Engine and the way I use OpenGL. I’m open for suggestion, call me an amateur for using it in this strange way, but it seems to be the right thing for my purpose 🙂

In a Thread at the iDevGames Forums I realized that my way of using OpenGL is probably a bit unconventional. So I thought I’d lay my reasoning out here in the open. Continue reading