L11_Sprites - GameBoyAdvance Programming Sprites Recall....

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

View Full Document Right Arrow Icon
GameBoyAdvance Programming Sprites
Background image of page 1

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

View Full DocumentRight Arrow Icon
Recall… Atari computers and video games used the concept of players and missiles. Built in to the hardware Could instantly position at any column Row movement required moving data What technology!!! So why aren’t we all using Atari computers today?
Background image of page 2
The Commodore 64!
Background image of page 3

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

View Full DocumentRight Arrow Icon
With Sprites!!!
Background image of page 4
With Sprites!!! Row, Column The sprite image data is stored in a separate are of memory. It is rendered by the hardware wherever specified without disturbing the underlying background image The sprite image data is stored in a separate are of memory. It is rendered by the hardware wherever specified without disturbing the underlying background image
Background image of page 5

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

View Full DocumentRight Arrow Icon
With Sprites!!! Row, Column Simply changing a few memory locations will change the sprites location. Simply changing a few memory locations will change the sprites location.
Background image of page 6
With Sprites!!! Row, Column Simply changing another can change the sprites image Simply changing another can change the sprites image
Background image of page 7

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

View Full DocumentRight Arrow Icon
Time passes…
Background image of page 8
Sprites Sprites is a generic term for images which can be placed into a larger scene. Originally sprites were images that could be inserted without disturbing the scene. In this sense, they are implemented with hardware. Gameboy sprites fall under the original definition. In the gameboy, sprites are often referred to as objects. The two terms will be mixed in the following presentation because everyone uses the term sprite and some of the GBA documentation uses the term object.
Background image of page 9

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

View Full DocumentRight Arrow Icon
GBA Sprite Overview Standard component of games Ball, paddle, selection cursor, etc Composed of 8x8 tiles like tile backgrounds Hardware supported movement and drawing that doesn't change background GBA supports up to 128 sprites ranging from 8x8 to 64x64 pixels
Background image of page 10
Visualization If this is a pixel This is the smallest sprite If this is the smallest sprite This is the largest sprite This is the screen size
Background image of page 11

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

View Full DocumentRight Arrow Icon
Essential Sprite Steps Load sprite palette into palette memory Load sprite graphics into OVRAM (Object Video Random Access Memory) Set sprite attributes in OAM (Object Attribute Memory) Enable sprite objects and select correct mapping mode in REG_DISPCNT Note: Implementation will be slightly more complicated and involve a kind of “double buffering” for sprites.
Background image of page 12
Video Memory CBB0 CBB1 CBB2 CBB3 CBB4 CBB5
Background image of page 13

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

View Full DocumentRight Arrow Icon
Video Memory CBB0 CBB1 CBB2 CBB3 CBB4 CBB5 Tile Palette: 0x5000000
Background image of page 14
Video Memory CBB0 CBB1 CBB2 CBB3 CBB4 CBB5 Sprite Palette 0x5000200
Background image of page 15

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

View Full DocumentRight Arrow Icon
Video Memory CBB0 CBB1 CBB2 CBB3 CBB4 CBB5 Character Blocks 4 for tile images and maps 0x6000000 16kb 2kb
Background image of page 16
CBB0 CBB1 CBB2
Background image of page 17

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

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

This note was uploaded on 02/07/2012 for the course CS 1372 taught by Professor Smith during the Spring '07 term at Georgia Institute of Technology.

Page1 / 64

L11_Sprites - GameBoyAdvance Programming Sprites Recall....

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

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