Collision Theory and Logic

Slides:



Advertisements
Similar presentations
5 Collision Theory and Logic © Goodheart-Willcox Co., Inc. Permission granted to reproduce for educational use only. Use game design software to create.
Advertisements

Programming Paradigms and languages
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Video Game Design Lesson 1. Game Designer Person involved in the development of a video game Person involved in the development of a video game Usually.
Events Chapter 7. Interactivity The real world is interactive User determines order of actions instead of programmer.
Events Chapter 7. Interactive Real world is interactive User determines order of actions instead of programmer.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Computers: Tools for an Information Age
Program Development and Programming Languages
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Adding Automated Functionality to Office Applications.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
Unit Six Assignment 1 Chris Boardley.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
V Avon High School Tech Club Agenda Old Business –Delete Files New Business –Week 16 Topics: Intro to HTML/CSS –Questions? Tech Club Forums.
Programming Languages: Telling the Computers What to Do Chapter 16.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Study Guide For Test Chapter 5, 6,& 7 Test is Friday, May 15th.
Review For Test Chapter 4 & 5 Test is Wednesday, January 27th.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Designing and Debugging Batch and Interactive COBOL Programs Chapter 5.
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
By the end of this session you should be able to...
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
5 Event Handling Interactive Programming Suggested Reading Interaction: Events and Event Handling, Supplemental Text for CPSC 203 Distributed this term.
1 Overview of Programming Principles of Computers.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
7 - Programming 7J, K, L, M, N, O – Handling Data.
Software Development.
Large-Scale Design Process
Programming & Scratch.
Collision Theory and Logic
Event-driven programming
Topics Introduction to Repetition Structures
DDC 1023 – Programming Technique
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Introduction to Events
An Introduction to Visual Basic .NET and Program Design
Chapter 5 Structures.
Computer Programming.
Software Programming J. Holvikivi 2014.
Chapter 10 Programming Fundamentals with JavaScript
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Using Functions
Programs as Directions
ICT Gaming Lesson 3.
ICT Gaming Lesson 2.
Understand the interaction between computer hardware and software
Basic Concepts of Algorithm
CHAPTER FOUR VARIABLES AND CONSTANTS
Programming Logic and Design Eighth Edition
Presentation transcript:

Collision Theory and Logic Chapter 5 Collision Theory and Logic

Objectives Use game design software to create a playable video game. Integrate animated objects into a video game. Create sound and music effects in a video game. Describe basic computer logic. Build applied mathematics logic statements. List features of object-oriented programming.

Logic The first concept of designing and programming a video game is an action– reaction relationship Programmers use logic statements to break down these action–reaction relationships You will need to understand the five basic operators of a programming language: IF, THEN, AND, OR, and ELSE

Logic (Continued) A logic statement tests a condition and determines an action based on the result An IF…THEN statement is the most basic example of a logic statement When programming a video game, the formal term for an action is a condition An event is a change that occurs when a condition is met

Logic (Continued) Programming for the user interface uses listeners and triggers A listener is programming that directs the computer to check or listen for a mouse click, key press, or other input from the user A trigger is programming for when a condition is met that a series of actions will begin In a logic statement, the trigger is the IF and the actions it initiates are the THEN

Logic (Continued) Goodheart-Willcox Publisher

Logic (Continued) Goodheart-Willcox Publisher

Logic (Continued) The next step in basic programming is to add multiple actions or multiple reactions to logic statements This is done using the AND and OR operators The AND operator will join two or more outcomes for a given condition or action The OR operator allows multiple results to take place under a given condition or event

Logic (Continued) The ELSE operator describes what will happen if a certain action or reaction does not take place The ELSE operator works like a true/false test If the condition is true, the THEN events are initiated If the condition is false, the ELSE events are initiated

Collision Theory Collision theory deals with an object running into or hitting another object When objects collide in a game, the movements, animations, and events must provide an illusion of reality Interactivity is how one object behaves when it encounters another object A collision statement must exist for each object the player touches for interaction

Programming with Collision Theory When the computer recognizes a collision, it sets into action the events programmed by logic statements Games Factory 2 is an object-oriented, game development software that can be used to program a collision condition and events To make objects appear solid, the programmer needs to add some realistic effects to the collision Collision theory controls almost every interaction in video game action

Programming with Collision Theory (Continued) Goodheart-Willcox Publisher

Writing a Logic Statement Pseudo code is similar to computer code It helps by breaking down the interactions into the logical steps Another benefit of pseudo code is that it can be used as the structure for many different computer languages The programming words and symbols and their arrangement is called syntax

Pseudo code

Writing a Logic Statement (Continued) Most high-level programming languages use syntax that reads like a regular sentence Definition subroutines are called objects Objects are defined by their attributes and properties Actions are how an object reacts to input or interacts with other objects Methods are the actions or verbs used in syntax

Writing a Logic Statement (Continued) Variables are small information storage containers Text stored in a variable is called a string Arrays are a common data structure used to store and manipulate data There are four different loop commands common to most languages: LOOP, FOR, DO WHILE, and DO UNTIL

Writing a Logic Statement (Continued) Programmers create the names for the objects, actions, methods, and variables used Persistence means that something continues to exist after the event that caused it has ended Modules are separate units of programming that perform one function and contain all the information needed to execute that function

Writing a Logic Statement (Continued) The programming language used to code the game will do nothing on the computer until it is compiled into machine code The choice of programming language used has more to do with a programmer’s likes and dislikes than functionality To create a module within a game, it is important to plan all the parts of the operation using a flowchart or other organizational tool

Writing a Logic Statement (Continued) An algorithm is a computer script that performs the steps needed to solve a problem Structure is the syntax and logic form of the programming language Sequence is the predetermined order or steps the computer program will follow An iteration is a single run through a programming loop

The Games Factory 2 The Games Factory 2 (TGF2) is a powerful game engine that uses object-oriented programming to make two-dimensional video games Two extremely beneficial features of TGF2 are that the game engine Runs very well on a standard PC Is very user friendly

Think about a video game you like to play Think about a video game you like to play. What type of user inputs does the game accept? Describe a collision you have seen in a video game that did not seem realistic. How might the game be changed to make the collision seem more realistic?