Applets & Video Games 1 Last Edited 1/10/04CPS4: Java for Video Games Applets &

Slides:



Advertisements
Similar presentations
CSci 1130 Intro to Computer Programming in Java
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
Client-Side Processing
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CompSci Applets & Video Games. CompSci Applets & Video Games The Plan  Applets  Demo on making and running a simple applet from scratch.
Intro to Threading CS221 – 4/20/09. What we’ll cover today Finish the DOTS program Introduction to threads and multi-threading.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
ACTIVE X By Ethan Huang. OUTLINE What is ActiveX? Component of ActiveX Why ActiveX? ActiveX and Java Security Issue.
1 Applets Chapter 1 To understand:  why applets are used to extend the capabilities of Web pages  how an applet is executed and know about the restrictions.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
The Internet & The World Wide Web Notes
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Multimedia and the Web Chapter Overview  This chapter covers:  What Web-based multimedia is  how it is used today  advantages and disadvantages.
Dynamic Web Pages (Flash, JavaScript)
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
WIDAR Prototype Testing User Interface Software Kevin Ryan NRAO-DRAO Face-to-Face Meeting April 3, 2006.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
CHAPTER FOUR COMPUTER SOFTWARE.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
NATIONAL INSTITUTE OF SCIENCE & TECHNOLOGY Presented by: Santosh kumar Swain Technical Seminar Presentation by SANTOSH KUMAR SWAIN Roll # CS
Midterm Review WEB DESIGN. FLASH What is Flash? –Flash is a multimedia graphics program specifically for use on the web –Flash enables you to create interactive.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Tutorial 7 Working with Multimedia
Tutorial 7 Designing a Multimedia Web Site
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Java Tutorial Ethan New York University.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Multimedia ITGS. Multimedia Multimedia: Documents that contain information in more than one form: Text Sound Images Video Hypertext: A document or set.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
Java Portals and Portlets Submitted By: Rashi Chopra CIS 764 Fall 2007 Rashi Chopra.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Chapter 14 Applets and Advanced GUI  The Applet Class  The HTML Tag F Passing Parameters to Applets F Conversions Between Applications and Applets F.
Chapter 8 Frameworks. Frameworks Framework is a set of cooperating classes and interface types that structures the essential mechanisms of a particular.
CompSci Introduction to Jam’s Video Game Package.
1 Applets. 2 What is an applet? Applet: a Java program that can be inserted into a web page and run by loading that page in a browser brings web pages.
Website Design, Development and Maintenance ONLY TAKE DOWN NOTES ON INDICATED SLIDES.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
HTML Overview Part 8 – Java Applets 1. Applets 2  A Java applet is a small application embedded in your HTML document which runs in the browser window.
Client-Server applications Introduction to Java Applets Client-server architectures Why do Applets exist? What can an Applet do?
Video Game Package Intro 1 Last Edited 1/10/04CPS4: Java for Video Games Introduction.
A computer contains two major sets of tools, software and hardware. Software is generally divided into Systems software and Applications software. Systems.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Applications Active Web Documents Active Web Documents.
Introduction to Operating Systems
Introduction
How java is better than other languages according to history and uses.
Tutorial 7 Working with Multimedia
WinMax v9 Features September 10, 2012 Paul J. Gray Manager
Distributed Computing, M. L. Liu
Distributed Computing, M. L. Liu
Web animation Brad Hurley.
Computer Science I CSC 135.
Introduction to Operating Systems
Java Applets.
Java applets 1/3/2019.
Introduction to Operating Systems
Introduction to computers
Teaching slides Chapter 6.
Applet in Java.
Chap 1. Getting Started Objectives
Presentation transcript:

Applets & Video Games 1 Last Edited 1/10/04CPS4: Java for Video Games Applets & Video Games

Applets & Video Games 2 Last Edited 1/10/04CPS4: Java for Video Games The Plan Applets –Demo on making and running a simple applet from scratch –Demo on making and running a simple application from scratch Video Games –Measurements –Frame rates –Threads

Applets & Video Games 3 Last Edited 1/10/04CPS4: Java for Video Games Applets Definition Differences from applications Download process Use of html Use of jar files Example

Applets & Video Games 4 Last Edited 1/10/04CPS4: Java for Video Games Definition From the Java API An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application. The name Applet is derived from the name Application.

Applets & Video Games 5 Last Edited 1/10/04CPS4: Java for Video Games Applet vs. Application Applets Run in web browser Often downloaded from untrusted site Restricted from file system access Restricted from outside network communication Applications Run independently Typically obtained through trusted source Allow creation and modifications of files Allow outside network communication

Applets & Video Games 6 Last Edited 1/10/04CPS4: Java for Video Games Running an Applet 1.Load a web page with an tag embedded in the HTML 2.Load the compiled applet from website to local machine 3.Run the compiled applet on the local machine

Applets & Video Games 7 Last Edited 1/10/04CPS4: Java for Video Games HTML for Applet code is the name of the class that extends JApplet archive is the name of the jar file containing all classes

Applets & Video Games 8 Last Edited 1/10/04CPS4: Java for Video Games Jar files Jar is short for Java Archive Compresses files and directories into a single file Can be executed in compressed format Files and directories can be extracted Can contain any combination of source code, byte code, and other files

Applets & Video Games 9 Last Edited 1/10/04CPS4: Java for Video Games Demo Applet Demo Make an applet in Eclipse Make the html in composer Save both to network drive View from the web Application Demo Make an application in Eclipse Run in Eclipse

Applets & Video Games 10 Last Edited 1/10/04CPS4: Java for Video Games Video Games Simulation Measurement units Discrete/Continuous Monitor frame rate limitation Model frame rate limitation User interaction rate Threads overview

Applets & Video Games 11 Last Edited 1/10/04CPS4: Java for Video Games Video Game as Simulation Video games are simulations of the real world and worlds that do not exist. These simulations are built for our pleasure, but may serve other purposes as well. Examples Flight simulator Oregon trail Pinball

Applets & Video Games 12 Last Edited 1/10/04CPS4: Java for Video Games Measurement Units Initial setup in coordinate system with origin at top left and (1, 1) at bottom right –Allows simple scaling to varying screen resolutions –Can be done hierarchically Distances in pixels Time in seconds Velocity in pixels/second

Applets & Video Games 13 Last Edited 1/10/04CPS4: Java for Video Games Discrete vs. Continuous Time Discrete Used to approximate continuous Simple conceptually for good rough estimates Causes problems when modeling continuous functions with too coarse grain estimates Continuous Requires abstract representation or infinite precision Requires analytical reasoning Conceptually difficult to model directly

Applets & Video Games 14 Last Edited 1/10/04CPS4: Java for Video Games Monitor Frame Rate Why Hz (Frames/second)? Because we don’t actually visually process continuously Smooth fast movement? Consider a rate of 1 pixel a second would take more than 8 seconds to move across the screen. For fast movement there must be jumps in location.

Applets & Video Games 15 Last Edited 1/10/04CPS4: Java for Video Games Model Frame Rate Model is continuous. Frame rate is discrete. The granularity of frame rate is too coarse for our continuous model. How do we solve this problem? Two separate rates: –Monitor frame rate –Model frame rate

Applets & Video Games 16 Last Edited 1/10/04CPS4: Java for Video Games User Interaction Rate Devices such as the keyboard and mouse must also be polled at regular intervals. At what rate should they be polled? Depends on: Available compute power –In contention with monitor frame rate –In contention with model frame rate Which thread has priority

Applets & Video Games 17 Last Edited 1/10/04CPS4: Java for Video Games How it happens “all at once” Threads! Threads are like programs within programs Seem to run all at once, but typically share resources, primarily the processor Cost overhead for switching the thread running

Applets & Video Games 18 Last Edited 1/10/04CPS4: Java for Video Games Summary User interaction, model frame rate, and monitor frame rate all contend for the processor. Threads enable programs to behave as if several sub-programs (threads) were running at once. Continuous events can be modeled discretely. Careful selection of measurement units can simplify program modifications. Video games can be viewed as simulations.

Applets & Video Games 19 Last Edited 1/10/04CPS4: Java for Video Games Summary Applets are like small applications run from a web browser. have security restrictions. require HTML code to be executed are downloaded from a remote site and executed locally use jar files to compress and combine all compiled code and supporting files