1. What was planned?
- Finish the iPhone tutorial
- Build a prototype of the conference game (this week and next week)
- Begin work on the Dance Tool?
2. What was done?
- Worked on iPhone tutorial - added 3D transitioning views, multi-touch zooming, and a single tap changes the color of the cube. Also added a light source.
- Developed and pitched an iPhone/iPod Touch game idea for the conference. The working title is Co-op Table Tilt Game. The pitch and screen mockups will be posted soon to the Codendi Game Ideas Wiki.
3. Problems encountered?
- Ran into trouble with registering multiple touches on the iPhone - wasn't sure if it was an error with the simulator or the math. The simulator seems to register the first touch as the origin and then calculates the second touch as a distance ratio based on the first touch's position. This led to wrapping issues near the edges of the window, and unexpected behavior when not zooming on a diagonal from the origin. The math for determining whether to zoom in or out simply takes the two touch points and runs them through the distance formula, and depending on whether the distance between the two points is growing or shrinking, the image is scaled up or down, respectively. However, when we deployed the app to the iPhone, the problem was actually exacerbated, so it probably isn't a problem with the simulator. The math seems sound, so it must have something to do with the registration of the touch positions. Perhaps using the distance formula is the wrong approach, given the way touches are registered?
- I originally planned to have each face of the cube be a different color, and when the user tapped a face, it would change that face's color. Unfortunately, although I could get the screen coordinates of the tap, it is not possible to select a particular pixel and get its color on the iPhone. Unless I cast a ray and intersected it with the face, I wouldn't be able to determine the location of the tap. Since ray casting seemed like overkill, I opted to just make the cube one color, and tap on the cube to change the entire cube's color.
- Lighting was very problematic, mostly because the iPhone does not allow most of the typical OpenGL methods for drawing. I enabled GL_LIGHTING, a light, and set the shader model to GL_SMOOTH (as opposed to FLAT). I calculated all of the surface normals and set the material properties, but the cube was still in grayscale. After a lot of hunting around, I found that I had not enabled GL_COLOR_MATERIAL! After that was set, lighting worked as expected.
4. What did you learn this week? (esp. computer science, or anything surprising or interesting)
- Learned about the touch interface for the iPhone
- Learned a lot about lighting in OpenGL, and some of the limitations of the iPhone's implementation of OpenGL
- Increased familiarity with Objective C
5. What's planned for next week?
- Learn about the capabilities of the iPhone accelerometer and build a limited prototype of the table tilt game
- Begin work on the Dance Tool
6. Hours worked.
~46
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment