CompSci 4 12.1 Video Game Package Design Design of the Video Game Package.

Slides:



Advertisements
Similar presentations
Chapter 18 Building the user interface. This chapter discusses n Javas graphical user interface. n Swing: an enhancement of a library called the Abstract.
Advertisements

1.1 Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. Al-Azhar University
Component Oriented Programming 1 Chapter 2 Theory of Components.
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.
Programming Basic Concepts © Juhani Välimäki 2003.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
1 Early GUIs with Java As presented in Java: Complete Course in Programming and Problem Solving by Lambert and Osborne.
CompSci Applets & Video Games. CompSci Applets & Video Games The Plan  Applets  Demo on making and running a simple applet from scratch.
Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Programming What is a program? –A set of instructions –Understood by a computer.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 CS1007: Object Oriented Design and Programming in Java Lecture #23 April 13 Shlomo Hershkop
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Programmable Logic Controllers (PLCs) This course deals with PLCs, Programmable Logic Controllers. PLCs are the industrial computer/controllers that are.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
Java How to Program, 9/e Instructor: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
Introduction 01_intro.ppt
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
MVC pattern and implementation in java
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Applets & Video Games 1 Last Edited 1/10/04CPS4: Java for Video Games Applets &
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Inheritance & Interfaces. The Plan ● Motivate Inheritance ● Motivate Interfaces ● Examples ● Continue Practice on Observer/Observable.
Software Prepared By: Sir Mazhar Chapter No 5.
11 C H A P T E R Artificial Intelligence and Expert Systems.
Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Java Tutorial Ethan New York University.
Swing and MVCS CompSci 230 Software Construction.
Simulation with Open Source Physics Butch DeBerry Advisor: Dr. Bruce Mason.
Introduction to Object Oriented Programming CMSC 331.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Object-Oriented Design CSC 212. Announcements This course is speeding up and we are starting new material. Please see me if you feel this is going too.
Object Oriented Design David Talby. Welcome! n Introduction n UML u Use Case Diagrams u Interaction Diagrams u Class Diagrams n Design Patterns u Composite.
Foundation year Lec.3: Computer SoftwareLec.3: Computer Software Lecturer: Dalia Mirghani Year: 2014/2015.
Event Driven Programming. Event-driven Programming In the early days of computing communication with the outside world was accomplished using a technique.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
CS 4244: Internet Programming User Interface Programming in Java 1.0.
Chapter 14 Applets and Advanced GUI  The Applet Class  The HTML Tag F Passing Parameters to Applets F Conversions Between Applications and Applets F.
Iteration 1 Looping Structures. Iteration 2 The Plan While not everyone understands: 1.Motivate loops 2.For loops 3.While loops 4.Do-while loops 5.Equivalence.
QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz.
Ch 1. A Python Q&A Session. Why do people use Python? Software Quality Developer productivity Program portability Support Libraries Component integration.
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
Chapter 7 What Can Computers Do For Me?. How important is the material in this chapter to understanding how a computer works? 4.
CompSci Introduction to Jam’s Video Game Package.
Creating a Java Application and Applet
Motivates, interests and engages. Teaches problem solving skills. Allows for creativity and imagination. Demonstrates project design. Encourages teamwork.
Simple algorithms on an array - compute sum and min.
Video Game Package Intro 1 Last Edited 1/10/04CPS4: Java for Video Games Introduction.
CompSci 44.1 Game Package Introduction to Jam’s Video Game Package.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
Class Diagrams, MVC and Design Patterns CS153P Session 4.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
CompSci Inheritance & Interfaces. CompSci Inheritance & Interfaces The Plan  Motivate Inheritance  Motivate Interfaces  Examples  Continue.
CS 501: Software Engineering Fall 1999 Lecture 23 Design for Usability I.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Unified Modeling Language
Getting Started ARCS Lab..
Learn… Create… Program
Learn… Create… Program
(Computer fundamental Lab)
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Learn… Create… Program
Learn… Create… Program
Presentation transcript:

CompSci Video Game Package Design Design of the Video Game Package

CompSci Video Game Package Design Design of Video Game Package Animation Canvas Keyboard Mouse GameLoop JFrame Or Applet Tracker Sprite Tracker Sprite Tracker Sprite

CompSci Video Game Package Design The Plan  Basic principles of design  Motivate why MVC is needed  Model/View/Controller (MVC) overview  Model (today)  View (when we get to Graphical User Interfaces)  Controller (when we get to Event Handling)

CompSci Video Game Package Design Basic Principles of Design We want our programs to be  simple  functional  fast (to code and to execute)  correct  easy to modify  easy to extend  capable of reuse

CompSci Video Game Package Design Why Simple?  Simple is easy to understand and therefore easier to reuse, modify, and extend.  Simple has less likelihood for program errors and is therefore more likely to be correct.  Simple may be faster than complex, certain to code and perhaps in execution time.

CompSci Video Game Package Design Why functional?  It has to work.  How well it works is negotiable considering:  speed to release  cost to release  lifetime of code

CompSci Video Game Package Design Why fast?  Who wants to wait?  Works better on slower, more out-of-date machines.  Sometimes crucial to application’s purpose  air control  nuclear plant facilities  weather prediction  stock prediction

CompSci Video Game Package Design Why correct?  In some cases, incorrect execution is unacceptable  access control  online sales  In some cases, incorrect execution can be remedied by re-execution  operating system locks up, so just reboot  database goes down, just restart  impacts time coding

CompSci Video Game Package Design Why easy to modify?  Users rarely can tell you exactly what they want  Even if they could tell you, what users want changes  Changes in hardware and software mandate code modification (think Y2K)

CompSci Video Game Package Design Why easy to extend?  Why not make a good thing better?  Enables multiple releases of functional programs  Windows 3.1, 95, 98, 2000, NT, etc.  Java 1.0, 1.1, 1.2, 1.3, 1.4 and now 1.5 (5.0)  Keep up with increasing competition and demand

CompSci Video Game Package Design Capable of Reuse  No need to reinvent the wheel  Easier to build with tools than starting from scratch  C was used to make C++ compiler, C++ used to  make Java, Java used to make Java compiler!  Reduce, reuse, recycle is good for coding too!

CompSci Video Game Package Design Why we need MVC? MVC assists in achieving design principles:  simple idea  fast to code with a clear ready-made design  structure makes reuse, modification and extension simple  MVC design easy to test for correctness

CompSci Video Game Package Design What is MVC?  Model  representation of the data  has no visual component  View  visual display of the data  Controller  specifies ways in which the model can be changed  between model and view

CompSci Video Game Package Design Simplified 1D Model  Recall collision detection simulation.  We’re going to apply MVC to solve the problem more generally.  Were going to use Object Oriented Programming  what are the objects?  what value do they have?  how do the values change?  how are the values accessible?

CompSci Video Game Package Design What are our objects? We’re going to model 1D particles and segments.  Particle (similar to the Sprite class)  Segment (similar to extending the Sprite class)  Tracker1D (similar to Tracker)  VelocityTracker (similar to ProjectileTracker)  ModelTest (similar to our JFrame)

CompSci Video Game Package Design class Particle Attributes  double position  Tracker1D Behavior  double getPosition()  void setPosition(double)  Tracker1D getTracker()  void setTracker(Tracker1D)

CompSci Video Game Package Design class Segment extends Particle Attributes  double position  double width  Tracker1D Behavior  double getPosition()  void setPosition(double)  double getWidth()  void setWidth(double)  Tracker1D getTracker()  void setTracker(Tracker1D)

CompSci Video Game Package Design interface Tracker1D Attributes  none Behavior  double getPosition()  void advanceTime(double)

CompSci Video Game Package Design class VelocityTracker Attributes  double velocity  double position Behavior  double getPosition()  void advanceTime(double)

CompSci Video Game Package Design class ModelTest Attributes  none Behavior  public static void main(String[] args)

CompSci Video Game Package Design More to come….