SPRITES - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

SPRITES

Description:

... looking on how to create a HUD (Heads-up-display) for my current game project. ... 'Two dimensional image or animation that is integrated into a larger scene. ... – PowerPoint PPT presentation

Number of Views:105
Avg rating:3.0/5.0
Slides: 13
Provided by: IIT89
Category:
Tags: sprites

less

Transcript and Presenter's Notes

Title: SPRITES


1
SPRITES
  • By Jaime Gamarra
  • CS 536

2
Motivation
  • I stumbled upon the sprite concept while looking
    on how to create a HUD (Heads-up-display) for my
    current game project.
  • A HUD is one way to transmit game, character or
    miscellaneous information on the screen to the
    player.
  • Possible information to display on a HUD
    players score, health, lives left, etc

3
HUD Sprite Relationship
  • HUDs are frequently rendered with a 2D look,
    often using sprites.
  • OK, so what are sprites??
  • Sprite Two dimensional image or animation that
    is integrated into a larger scene.
  • Sprites originated in 2D games, they can be both
    hardware or software generated.

4
Sprites on 3D games
  • Here is an example of sprite usage on a 3D game,
    notice the cloud and the three plants in this
    scene are actually textured flat planes.

5
Sprites and 3D
  • Sprites used on modern 3D games are animations in
    the form of textured planes, these planes are
    always facing the camera.
  • Additionally, they can be scaled, occluded and
    moved two dimensionally.
  • This approach is also known as billboarding (As
    seen in class notes).

6
When to use sprites
  • Because of its two-dimensional nature, sprites
    are better used when appearing for short periods
    of time in a game (If used to simulate a 3D
    effect).
  • Camera rotation can easily give away the fact
    that a sprite is not three dimensional.
  • Effectively used when applied to mimic an
    spherical-like object or an object whose
    appearance is constant regardless of view.

7
Another Sprite Example
  • Sprite usage featured on the game Viewtiful Joe
    for gamecube. The sprite used depicts a hit with
    a number value.

8
More On Sprites
  • Sprites can be created from pre-rendered CGI, 3D
    graphics, vector art and text (Mostly as
    backgrounds that are rendered in the production
    stage as opposed to while real game-play takes
    place). It is done mainly to improve performance.
  • Performance boost Most 3D engines can process
    sprites much faster than 3D objects.

9
Animated Sprites
  • I found a project that used animated sprites
    (www.codesampler.com). It can be taken as a good
    reference point for those of you thinking on
    using a HUD as an advanced feature for your game.
  • It can also be seen as a method to apply a
    good-looking effect at a relatively low
    performance cost.

10
Background Information Rendering Sprites
  • Set 3D projection and draw 3D objects first (Do
    this on one projection matrix).
  • Have a second projection matrix to render the
    sprites.
  • In this site and this discussion post, the
    rendering of a HUD is done using glOrtho()
  • http//osdl.sourceforge.net/OSDL/OSDL-0.3/src/doc/
    web/main/documentation/rendering/SDL-openGL.html
  • http//www.gamedev.net/community/forums/topic.asp?
    topic_id388298

11
Sprites data structure
  • Sprites, like 3D models, have to posses some kind
    of data structure that will hold all pertinent
    information on the sprite, examples of sprites
    classes or structures can be easily found on the
    web.
  • Such structure generally contains coordinates,
    width, height, number of frames, texture info and
    any other data that may be application-specific.

12
Now on to a demo
  • Definitions and sources taken from
    http//en.wikipedia.org/wiki/Sprite_28computer_gr
    aphics29
Write a Comment
User Comments (0)
About PowerShow.com