CSCI 1106 Introduction to Game Architecture

Scratch in a nutshell a scratch program consists of a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: hen it is hit by a laser –  The stage is updated a3er 1/30th of a second –  The stage is populated when the game starts up •  The “something” are called events The Event- Driven Paradigm •  Idea: Game code simply responds to events •  Possible events: –  External events •  Player movement (mouse, keyboard, kinect, etc) –  Internal events •  •  •  •  Start of game Frame (stage update every 1/30th of a second) Timer expired Sprites cloned •  Each event is handled by an event handler •  The game code simply consists of event handlers that handle all aspects (behaviours) of the game! The Main Loop •  All you need to do is –  generate events and –  write the event handlers! ct obje Mod ify –  Event (ac2on) occurs –  Handle (respond to) event –  Update (modify) object(...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online