Playtesting Reminders. Don t give hints or instructions Watch your playtesters: more useful than their feedback Turn in handwritten signatures

Similar documents
Level Editor. Should be stable (as of Sunday) Will be updating the source code if you want to make tweaks to it for your final

No more engine requirements! From now on everything you work on is designed by you. Congrats!

This is the last lecture!

Digital Audio Basics

ADDING MUSIC TO YOUR itunes LIBRARY

Amazing Audacity: Session 1

CIS 121 Data Structures and Algorithms with Java Spring 2018

the gamedesigninitiative at cornell university Lecture 15 Game Audio

JAVA MOCK TEST JAVA MOCK TEST II

Skill Area 214: Use a Multimedia Software. Software Application (SWA)

Lesson 5: Multimedia on the Web

Optimizing Audio for Mobile Development. Ben Houge Berklee College of Music Music Technology Innovation Valencia, Spain

AAMS Auto Audio Mastering System V3 Manual

UNDERSTANDING MUSIC & VIDEO FORMATS

Java Sound API Programmer s Guide

Multi-Room Music Servers

CHAPTER 10: SOUND AND VIDEO EDITING

Export Audio Mixdown

Completing the Multimedia Architecture

Lesson 5: Multimedia on the Web

Media Computation. Lecture 15.2, December 3, 2008 Steve Harrison

Data Structures (list, dictionary, tuples, sets, strings)

ipod shuffle User Guide

Introduction into Game Programming (CSC329)

Lecture #3: Digital Music and Sound

3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.

Object-Oriented Programming (OOP) Basics. CSCI 161 Introduction to Programming I

About sounds and Animate CC

Lecture 19 Media Formats

CS 177 Week 15 Recitation Slides. Review

Media player for windows 10 free download

CS 231 Data Structures and Algorithms, Fall 2016

Lecture 6. COMP1006/1406 (the OOP course) Summer M. Jason Hinek Carleton University

Adding content to your Blackboard 9.1 class

History of Audio in Unity

WaveLab Pro 9.5 WaveLab Elements 9.5

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures

Compressed Audio Demystified by Hendrik Gideonse and Connor Smith. All Rights Reserved.

Audio for Everybody. OCPUG/PATACS 21 January Tom Gutnick. Copyright by Tom Gutnick. All rights reserved.

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

Arrays. COMS W1007 Introduction to Computer Science. Christopher Conway 10 June 2003

Mid-Semester Feedback

Introduction to Programming Using Java (98-388)

Game Design From Concepts To Implementation

CONTENTS CHAPTER I: BEFORE USE I. BEFORE USE

Tail Calls. CMSC 330: Organization of Programming Languages. Tail Recursion. Tail Recursion (cont d) Names and Binding. Tail Recursion (cont d)

Next week will be great!

Creating a short stop motion animation with Adobe Photoshop CC. Open Adobe Photoshop CC. A note about embedding

Logistics. Homework 9 due tomorrow Will post Homework 10 over the next few days. No class/recitation on Wednesday

SoundBridge Helpful Tips. For customers who want to use Roku SoundBridge with the SlimServer music server

Lab 8: Introduction to Scala 12:00 PM, Mar 14, 2018

Introducing working with sounds in Audacity

Compression; Error detection & correction

About this exam review

Avigilon Control Center Player User Guide. Version 6.2

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

_APP B_549_10/31/06. Appendix B. Producing for Multimedia and the Web

Properties of an identifier (and the object it represents) may be set at

Creating an Encoding Independent Music Genre. Classifier

HTML 5 and CSS 3, Illustrated Complete. Unit K: Incorporating Video and Audio

Call Reporter Pro Software

WaveLab Pro 9.5 WaveLab Elements 9.5

Important tips. N91 and N91 8GB common. File Management. Nokia PC Suite (especially Nokia Audio Manager)

CSE 143, Winter 2013 Programming Assignment #8: Huffman Coding (40 points) Due Thursday, March 14, 2013, 11:30 PM

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented

Skill Area 325: Deliver the Multimedia content through various media. Multimedia and Web Design (MWD)

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

SERIOUS ABOUT SOFTWARE. Qt Core features. Timo Strömmer, May 26,

Manual Version: V1.15. Video Management Software Guard Station User Manual

Understand digital audio production methods, software, and hardware.

Lecture 12: Compression

Multimedia on the Web

jetcast Manual Table of Contents

Chapter 5.5 Audio Programming

CS61B Lecture #13: Packages, Access, Etc.

ITP 342 Mobile App Dev. Audio

COURSE 2 DESIGN PATTERNS

B. What strategy (order of refactorings) would you use to improve the code?

5/29/2006. Announcements. Last Time. Today. Text File I/O Sample Programs. The File Class. Without using FileReader. Reviewed method overloading.

Data Representation. Reminders. Sound What is sound? Interpreting bits to give them meaning. Part 4: Media - Sound, Video, Compression

Abstract Classes and Interfaces

Collaboration policies!

Long term Planning 2015/2016 ICT - CiDA Year 9

Inf1-OP. Inf1-OP Exam Review. Timothy Hospedales, adapting earlier version by Perdita Stevens and Ewan Klein. March 20, School of Informatics

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018

Improving the Crab more sophisticated programming

digitization station DIGITIZING VINYL RECORDS 120 West 14th Street

COPYRIGHTED MATERIAL. chapter 1. How Do I Configure My iphone? 2

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

Inf1-OOP. OOP Exam Review. Perdita Stevens, adapting earlier version by Ewan Klein. March 16, School of Informatics

COMP6700 Introductory Programming

Exploiting Vulnerabilities in Media Software. isec Partners

References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 10/14/2004 1

Java Threads and intrinsic locks

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.

audiocd Rik Hemsley Benjamin Meyer

QUIZ Friends class Y;

NoteBurner Spotify Music Converter for Windows. Tutorial of NoteBurner Spotify Music Converter for Windows

Manual Version: V1.01. ISS Manager Video Management Software User Manual

Transcription:

Deadline Approaching Course policy: you must turn in a working version of all projects Deadline for incomplete projects is December 19 Same day as Final V

Playtesting Reminders Don t give hints or instructions Watch your playtesters: more useful than their feedback Turn in handwritten signatures

Announcements QUESTIONS?

Sound in Games In the real world, computers have sound Background music Sound effects Can be an important part of gameplay Listening for footsteps Dramatic music

Sound File Formats Many ways to encode and store sound Open standards Ogg Vorbis FLAC Closed standards mp3 m4a wav

Sampled Audio mp3, wav, etc. Recordings of live sounds Samples of sound wave at regular intervals Can be any sound that exists in real life, but must create & record it More common in today s games 1100100110101011011101011001000110101

Generated Audio MIDI Instructions for computer to play music Sound cards have tables of note sounds Can instruct computer to play something even if you can t play it Used to be popular to save space, not as common now

Compressed vs. Uncompressed Compressed Sound Files Lossy or Lossless? Lossy remove least important parts of sound wave Lossless just use smart compression on raw wave Smaller file size (esp. lossy) Lossy is lower quality Slower to decode and play Used for music Uncompressed Sound Files Record as much as possible of sound wave Much larger file size Usually high quality Faster to decode and play Used for sound effects

Buffering Decompressing and decoding is slow Read sound into buffer, play back from buffer Size of buffer depends on speed of system Playback delay while buffer is filled Sound device Buffer Decoding Sound file

Sound in Java Lines, DataLines, and Clips Sources of audio for software audio mixer Clip is preloaded samples, DataLine is streaming audio from buffer AudioSystem Provides factory methods for loading audio sources AudioInputStream stream = AudioSystem.getAudioInputStream(new File( mysound.wav )); Clip clip = AudioSystem.getClip(); clip.open(stream); clip.start(); AudioFormat format = stream.getformat(); SourceDataLine line = AudioSystem.getSourceDataLine(format); line.open(format); int nread=0; byte[] data=new byte[4096]; while(nread > -1) { nread = stream.read(data, 0, data.length); line.write(data, 0, nread); }

Sound in Java Sequencer plays MIDI sounds MidiSystem is like AudioSystem for MIDI files Sequence song = MidiSystem.getSequence(new File( mysong.mid )); Sequencer midiplayer = MidiSystem.getSequencer(); midiplayer.open(); midiplayer.setsequence(song); midiplayer.setloopcount(0); midiplayer.start();

Sound QUESTIONS?

Settings User profile Game settings Game state Progress through level Various styles of saving What to Save

Data Persistence SETTINGS

Custom controls Player name Considerations Saving User Settings Need to save per user Should be able to export between game instances Ideally put in cloud sync

Saving Game Settings Preferred resolution Graphics detail level Considerations Need to save per installation of game Should not go in cloud storage machinespecific, can t sync

Serialize a Java object Java properties file XML/JSON file Easy for humans to read Harder to parse Custom text format Can be more concise, easy to parse Strategies

User probably doesn t need to know file location Still make it easy to find so user can back it up Don t save automatically, revert graphics changes if no response User Interface

Data Persistence GAME STATE

When to Save Game Only at checkpoints Easier to implement Each checkpoint is a level, reload level when player dies More frustrating for player Ensure they re frequent enough

When to Save Game Any time at save stations Like checkpoints, but user can go back and resave Better for nonlinear games Need to save level state/ progress, but not exact positions (save room usually empty)

When to Save Game Whenever user wants Harder to implement, need a snapshot of current game state Good for difficult games with frequent failure Can still restrict when user can save (e.g. not during combat)

Automatic Saving Always a good idea, even when user can choose when to save Just because saves are available doesn t mean user will use them Don t set user too far back when they fail

Strategies Serialize and restore entire game world Save some info about player progress and reload level Concise save file that can be unmarshaled into game world

Save slots Easy, simple, annoying Native file browser Easy way to allow arbitrary saves Doesn t mesh well with game, unprofessional User Interface

Custom save-file browser Harder to implement, but most flexible/featureful Features Screenshot of saved game Show only current player s saves User Interface Sort by time & type of save

Data Persistence QUESTIONS?

Gameplay is Important Implement most of your game logic this week Playtest early and often Use the feedback you re getting

Tips for Final III JAVA TIP OF THE WEEK

The Many Uses of final Did you know? final can be applied to: Instance variables Local variables Method parameters Classes Methods

Final Instance Variables Value never changes Can be set in constructor or initializer block Must be set by the time an instance is created Can be different between instances of same class public class Example { } private final float mass; private final String name; private final int[] values = {1, 2, 3, 4, 5}; public Example(String name, float mass) { } this.name = name; this.mass = mass;

Warning: final Objects Aren t Immutable final makes object reference constant, not object itself Can still change a final field if object is mutable Arrays are objects public class FinalContainer { } public final List<Integer> stuff; public final String[] things; public FinalContainer(List<Integer> stuff, String[] things) { } this.stuff = stuff; this.things = things; FinalContainer container = new FinalContainer(myList, myset); container.stuff.clear(); container.things[0]= oops ;

Final Instance Variables Denote fields that should never change over lifetime of object Safe(r) to make final fields public Useful for ensuring objects are immutable Useful for making structs public class Vec2f { } public final float x; public final float y; public Vec2f(float x, float y) public class Results { public final boolean collision; public final Vec2f point; public final Vec2f mtv; public Results(boolean collision, Vec2f point, Vec2f mtv) }

Final Local Variables Must be set immediately at declaration Value can t change Can assign new final variable with same name Same warning: Object references can t change, objects are still mutable public float dostuff(int[] nums) { } int sum = 0; for(final int num : nums) sum += num; final float ave = sum / (float) nums.length; //illegal: ave += 1; final List<Float> list = new ArrayList<Float>(); list.add(sum); list.add(ave); return ave;

Final Local Variables Help guarantee a value doesn t change after being computed Allow inner classes to access local variables Inner class saves state of local variables, only works if they don t change public void addshowfield(string text) { final TextField field = new TextField(text); field.setvisible(false); this.add(field); Button button = new Button( Click to show, new ButtonListener() { } }); public void onclicked() { field.setvisible(true); } this.add(button);

Final Parameters Special kind of local variable, same behavior Set by caller, can t change once in method Note that changing parameters wouldn t affect caller anyway public boolean contains(final String query, final int start, final int end) { } //illegal while(start < end) { } //legal start++; for(int i = start; i < end; i++) { } if(sequence.contains( stuff, 0, 5)) if(sequence.contains( things, 8, 60))

Final Parameters Guarantee that parameters always represent caller s values If you need to compute something, use a local variable Easier maintainability in long methods public void compute(final Vec2f point, final float dist) { } Vec2f endpoint = point.plus(dist, dist); float mag = Math.sqrt(dist); //many more computations //much later in the method float sqr = dist * dist; Vec2f extend = point.smult(sqr); //do more stuff

Final Classes Can t be extended Useful for designing libraries Ensures clients can t break other classes by changing expected behavior public final class Data { private int count; private float total; public float getaverage() { return total / count; } public void add(float datum) { total += datum; count++; } }

Final Methods Can t be overridden Selectively allow inheritance In a final class, all methods are final Abstract classes can have final methods abstract class Parser { //can t be overridden final void loadfile(file file) { //(read file into memory) } //can be overridden boolean validatefile() { boolean success = true; for(string line : filelines) success = success && validate(line); return success; } //must be overridden abstract boolean validate(string line); }

Final Methods Also useful for libraries Can even guard yourself against bad design Prevent subclasses from changing some behavior Guarantee important setup happens More useful if your code is modular public class Tree<E extends Element> { public final boolean add(e elem) { } Node<E> newnode = new Node<E>(elem); Node<E> parent = getparent(elem); parent.addchild(newnode); rebalance(parent); } public Node<E> getparent(e elem){ } public void rebalance(node<e> changed) { }

Tips for Final III QUESTIONS?