Basic Concept of 2D Game Design and Development: David Botzenhart, Kathrin Krisch

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

Introduction

Analysis
Modeling
Events and Collision Detection
Basic concept of 2D game design and
development
David Botzenhart, Kathrin Krisch
19th January 2007
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Analysis
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Modeling
The Game class.
Animations and Sounds(The moving pictures)
Events and Collision Detection
Events
Collision Detection
Good Bye
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
The Idea
Beside the fact that a good programming is in not the only key
to a successful game, we will focus on thinking of how to
develop a game in a technical approach.
The most important thing ,of course is the Idea, closely followed
by good design (audio and video) and a stable realization. Keep in
mind that games are made for entertainment.
But also, games can be a source for powerful ideas. . .
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game
What does appear in a game? Let us think about it. . .

Screen.

Frame or Status Bar.

Credits (Points, Score).

Status.

Chat Screen, Maps, etc.

Game Window.

Dynamic Objects (Items).

Cursor.

Mouse Over Texts.

Background.

Sounds.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Recognizable parts of a 2D game (continued)
GAME WINDOW
FRAME
Score
Status
Mouse Over
Items
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation of the Design Analysis into a Software
Model.
What do we need?

A game class.

Should be something like a thread.

Should have access to graphic and/or audio interface.

Should contain, control and care for all items.

Should manage or delegate user inputs and events.

Should be time based (game loop).

Should contain the game logic.

A basic item class.

Should have a dened status (over time).

Should have a position.

Should have a dimension (area, for collision detection, etc.).

Should be able to draw itself.

Should play its sounds.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
What makes a 2D Game?
Transformation of the Design Analysis into a Software Model.
Transformation from Design Analysis to Software Model
Dynamic Items
Map
Status
etc.
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The Game class states.
stopped
run
game loop
play
initialize game components
clear up components
start
stop
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The Game Classs basic methods
run()
::Game
paint()
GameItems[]
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The Games GameItem Collection
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
run()
::GameItem
update( long timestamp)
::Game
paint()
::GameItem
update(long timestamp)
GameItems[]
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The update iteration (loop)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
run()
::GameItem
update( long timestamp)
::Game
paint()
::GameItem
update(long timestamp)
GameItems[]
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The paint iteration (loop)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
run()
::GameItem
update( long timestamp)
::Game
paint()
::GameItem
update(long timestamp)
GameItems[]
paint(graphic context)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Time based global values (statics)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
run()
::GameItem
update( long timestamp)
::Game
paint()
::GameItem
update(long timestamp)
GameItems[]
paint(graphic context)
static SINE
static SAW
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Time based global values (contd)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
run()
::GameItem
update( long timestamp)
::Game
paint()
::GameItem
update(long timestamp)
GameItems[]
paint(graphic context)
static SINE
static SAW
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Time based global values (contd)
run()
::Game
paint()
GameItems[]
static SINE
static SAW
t
T
1.000
0.000
t
T
1.000
0.000
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Time based global values (contd)
run()
::Game
paint()
GameItems[]
static SINE
static SAW
t
T
0xFFh
0x00h
t
T
0xFFh
0x00h
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The GameItem as Container
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::GameItem
::Animation
update(long timestamp)
paint(graphic context)
getImage(frame)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::Sound
playSound(Sound Context)
getImage(timeIndex)
*Array[] *Sounds
*Array[] *Animations
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
The GameItem as Container contd
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::GameItem
::Animation
update(long timestamp)
paint(graphic context)
getImage(frame)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::Sound
playSound(Sound Context)
getImage(timeIndex)
*Array[] *Sounds
Lightweight objects.
*Array[] *Animations
::Game
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Animation
Animation
image
framerate
getImage(timeIndex)
loadImage(FileName)
getImage(frame)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Animation (contd)
Animation
image
framerate
getImage(timeIndex)
loadImage(FileName)
getImage(frame)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Animation (contd)
Animation
image
framerate
getImage(timeIndex)
Frame
loadImage(FileName)
1 0 2 3 4 5 6 2 7
getImage(frame)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
The Game class.
Animations and Sounds(The moving pictures)
Animation (contd)
Animation
image
framerate
anyAnimation.getImage(4)
getImage(timeIndex)
Frame
loadImage(FileName)
1 0 2 3 4 5 6 2 7
getImage(frame)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Types of Events

The Internal Events.

Timer Event (internal).

GameItem Event (shoots at other Item).

Collision Detection.

External Events (System Events).

Events caused by User (Input Device Event).

Mouse Event.

Keyboard Event.

Joystick etc.

Other System Events.

Forced Repaint.

Forced Shutdown.

Set to Background, Timer Event (external) etc.


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Event processing
::Game
Any::GameItem
System
Any::GameItem
User Input
::GameWindow
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Collision detection
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
checkForCollision()
::Game
paint()
::GameItem
isCollided(::GameItem)
GameItems[]
run()
eventHandler(Event)
::GameItem
update( long timestamp)
::GameItem
update( long timestamp)
::GameItem
isCollided(::GameItem)
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Collision detection (contd)
This basic algorithm would have the complexity:
C =
n (n 1)
2
O(n) = n
2
n. . . number of GameItems which may collide. Of course this can
be Improved, but that is a dierent story. . .
David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development
Introduction
Analysis
Modeling
Events and Collision Detection
Events
Collision Detection
Good Bye
Farewell

Thank you for your participation. . .


David Botzenhart, Kathrin Krisch Basic concept of 2D game design and development

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy