2- SimpleGame - Simple Game Animation iPhone Programming...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 5/7/11 Simple Game Animation – iPhone Programming CSE 390 Fall 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Putting the pieces together In the past few lectures we’ve covered a lot of ground. We learned how to create animation blocks, and move objects around in the view based on variable values generated by a random number generator. We learned how to load sounds. We learned how to populate an array of images using a for loop and to
Background image of page 2
5/7/11 The Grave Game In honor of Halloween I decided to make a demo that would involve a character moving through a graveyard and jumping over tombstones, and maybe dodging flying bats. In other words, a simple “dodging” game. From this basic structure more complex games could be built, where, say, the character moves back and forth and collects tokens as well as avoids hazards. For my demo, I envisioned a character that would stay in place, while the background moved behind him, and the obstacles moved toward him. In the film industry, if the camera travels along with the actor, it is called a “trucking shot”. The character does not move in the frame, but the background appears to move. In the game industry this is common in traditional “side-scrolling” games.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Game design I had to think of the elements I would need A spooky sky background picture Background elements like a scary tree or a mound of tombstones Obstacles and hazards to avoid, like a tombstone to jump over, or an animated bat to duck I needed a character who could
Background image of page 4
5/7/11 Creating the game assets The character’s different behaviors were animated using the Poser 3D animation tool, and rendered as a sequence of .png images with transparent (alpha) backgrounds. They were rendered at much larger scale than needed for the game (about 200%). The image sequences were further cropped, edited, and scaled using the video layer tools in Photoshop. The other elements were also created in Photoshop, and I set up a mock view of the game to help me get the proper scale for the elements. The view was 460 X 320 (the aspect ratio of the iPhone screen in landscape mode.) Frame from the jumping sequence Frame from the bat animation Mock view of the game
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Setting up the Xcode project I chose the Utility Application project template because it provides two views – the main view (for the game) and the flipside view (for the game over screen). I imported the folders of my graphics assets by dragging and dropping them on the Resources folder in the Xcode project window.
Background image of page 6
5/7/11 The header file The header file for the main view ( MainViewController.h ) is where the objects I needed were created, their properties declared, and custom methods were declared. This was a necessary first step so that I could make connections between objects and methods in Interface Builder. I also had to import the
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 31

2- SimpleGame - Simple Game Animation iPhone Programming...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online