Lecture 5 Sounds & Sound Effects

Slides:



Advertisements
Similar presentations
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
Advertisements

GAME:IT Junior Ping Pong Objectives: Review skills from previous lessons Create a 2-player game Create a scoring display system Using old and new skills,
Constructor and New Fields // Don't synch draw() with vertical retrace of monitor graphics.SynchronizeWithVerticalRetrace = false; IsFixedTimeStep = true;
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
COMPUTER PROGRAMMING 2 Chapter 7 Sound. Objectives Find out how to prepare sounds for inclusion in Microsoft XNA projects. Incorporate sounds into XNA.
GameSalad Fundamentals. Introduction to Game-Authoring System  Objectives  Define game-authoring system.  Understand the components of logic and assets.
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
When you click the forever button, then whatever is in it does its thing to make flappy go. All of these buttons make flappy go and die. When you press.
Extending the Pong Example Barb Ericson Georgia Tech June 2011.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
PING PONG (Table Tennis)
PING PONG (Table Tennis)
Table Tennis Commonly known as Ping Pong. Historical Facts  First played in 1864 as a quiet parlor game.  It has been called several names:  “indoor.
Super Pong Andrew Dunsmore CSC436. Overview Purpose Design Specification Software Engineering.
CHAPTER 4 Images XNA Game Studio 4.0. Objectives Find out how the Content Manager lets you add pictures to Microsoft XNA games. Discover how pictures.
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Getting Started. XNA Game Studio 4.0 To download XNA Game Studio 4.0 itself, go to XNA Game.
Developing the Game User Interface (UI) Lesson 5.
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
XNA Game Studio 4.0 Keyboard and Mouse Controls + more on Animated Sprites.
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Scratch pong challenge Pong is a classic 1970s video game  Open the pongv1.sb2 file in Scratch  Click the.
Game Maker Galactic Mail Advanced Group: Complete Galactic Mail, then start developing an independent project.
Olympic.org Allabouttabletennis.com. History  It is thought that upper-class Victorians in England invented table tennis in the 1880s as an alternative.
AD 305 Electronic Visualization I : School of Art and Design : University of Illinois at Chicago : Spring 2007 Intro to Action Script 12 "The games of.
11 Writing Text Session 5.1. Session Overview  Show how fonts are managed in computers  Discover the difference between bitmap fonts and vector fonts.
XNA Tutorial 1 For CS134 Lecture. Overview Some of the hard work has already been done for you. If you build and run your game now, the GraphicsDeviceManager.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
XNA Sound Effects. float volume, pitch, pan; SoundEffect boing1; SoundEffect boing2; boing1 = Content.Load ("boing1"); boing2 = Content.Load ("boing2");
Tank Game Part 2 of 6. Firing Shells Coming up… Players Scores Large Explosions Small Explosions Damage Health Bars Parent Shell Destructible Walls Reappear.
9. Media (sound effects, music, video) Let’s Learn Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
DAY 4. MAKING SOMETHING ‘JUMP’ Simple! Move it a certain amount ‘up’ Glide back to your original spot.
Ping Pong.
By Victoria Israël and Daphnée Labrecque
XNA 4.0 Side Scrolling.
Rule 4 Ball In Play, Dead Ball, Out of Bounds
15. Media (sound effects, music, video)
PICKLEBALL.
Stage 1 Before you start to script the game you need to create the assets. Stage 1 will help you to create your background image, score zones, paddles.
Variables.
Tetherball Object: Be the last person to get out How do I play:
Lecture 11.
Pickle-Ball Rules & Terminology
Soccer.
Team custom space pong By: Dorean and Frankie.
Bennett’s Biggest Fans
Fight Game Brian Kessler.
EEL 3705 / 3705L Digital Logic Design
Lacrosse.
VHS Lacrosse Penalty Clock Guide.
Collision Detection.
The One Where You Scratch
Side Scrolling Game Development.
A Vocabulary Review Activity
Lecture 2 - Building a Monogame Windows Project
Tank Game Part 2 of 6.
How To Import A New Jury List In TnCIS
iMovie basics What is the purpose of iMovie?
MTA-4201 Game Programming Chapter 8 : Scrolling Background & Font
Dribbling Technique Practice 1.2 teams of 5 in their own channel
The game is played by moving the cursor along the red arteries and clicking on the various pieces of your patient’s anatomy that are ailing him to remove.
Making) Melody timer.
Do you have a soccer ball?
How well do you KNOW your 2 times table ?
The game is played by moving the cursor along the red arteries and clicking on the various pieces of your patient’s anatomy that are ailing him to remove.
Online Pogo Game Customer Service
Pogo Game Customer Care Helpline Number

Call Pogo Contact Phone Number and Enjoy Pogo Game
This Photo by Unknown Author is licensed under CC BY-NC-ND
Presentation transcript:

Lecture 5 Sounds & Sound Effects King Pong

Splash Screen While splash screen is being displayed King Pong plays "Lets get Ready to Rumble...with You ready for this?..."

Splash Screen Audio Play Option The "rumble.wav" file is played automatically and only upon program launch. It is not replayed at the beginning of a new game... Since audio files must be loaded before they are played and we only want to play "rumble.wav" once we can place the call to Play the file at the end of the LoadContent( ) method. protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); crowd[0] = Content.Load<SoundEffect>("crowd1"); crowd[1] = Content.Load<SoundEffect>("crowd2"); crowd[2] = Content.Load<SoundEffect>("crowd3"); crowd[3] = Content.Load<SoundEffect>("crowd4"); crowd[4] = Content.Load<SoundEffect>("crowd5"); cheer[0] = Content.Load<SoundEffect>("cheer1"); cheer[1] = Content.Load<SoundEffect>("cheer2"); cheer[2] = Content.Load<SoundEffect>("cheer3"); rumble = Content.Load<SoundEffect>("rumble"); rockyou = Content.Load<SoundEffect>("rockyou"); buzzer = Content.Load<SoundEffect>("buzzer"); gogame = Content.Load<SoundEffect>("goball"); ping = Content.Load<SoundEffect>("ping"); pong = Content.Load<SoundEffect>("pong"); laugh = Content.Load<SoundEffect>("laugh"); : rumble.Play(); gamestart(); }

Crowd Sounds based on VollyCount & Score public void crowdsounds() { if (oldvolleycount != volleycount) if (volleycount == 0) crowd[0].Play(); if ((p1.Score == 10 || p2.Score == 10) && volleycount == 1) rockyou.Play(); if (volleycount == 2) crowd[1].Play(); if (volleycount == 4) crowd[2].Play(); if (volleycount == 6) crowd[3].Play(); if (volleycount == 10) crowd[4].Play(); if (volleycount > 11 && rnd.Next() > 0.98) crowd[rnd.Next(0, 4)].Play(); if (oldvolleycount > 8 && volleycount == 0) cheer[0].Play(); if (oldvolleycount > 12 && volleycount == 0) cheer[1].Play(); if (oldvolleycount > 16 && volleycount == 0) cheer[2].Play(); oldvolleycount = volleycount; } As the vollycount goes up the crowd sounds increase. When the score is 10 on either side the crowd begins to chant "We will, we will...rock you!"...

Sounds Associated with the Ball public void ballstuff() { if (b.Pos.Y <= 0 || b.Pos.Y >= bkg.Height - ball.Height) b.moveBall(false, true, 0); } else if ((Math.Abs(b.Pos.X - p1.Pos.X + ball.Width / 2) < ball.Height) && (b.Pos.Y + ball.Height > p1.Pos.Y) && (b.Pos.Y < p1.Pos.Y + p1.Leng)) b.moveBall(true, false, p1.spin()); ping.Play(); volleycount += 1; else if ((Math.Abs(b.Pos.X - p2.Pos.X) < ball.Height) && (b.Pos.Y + ball.Height > p2.Pos.Y) && (b.Pos.Y < p2.Pos.Y + p2.Leng)) b.moveBall(true, false, p2.spin()); pong.Play(); else b.moveBall(false, false, 0); if (b.Pos.X < 0) if (b.vY == 0 && volleycount == 0) laugh.Play(); b.Pos.X = bkg.Width / 2; b.vX = -ballspeed; curballspeed = -ballspeed; b.vY = 0; b.Pos = StartPos; buzzer.Play(); vollystart(); p2.Score += 1; if (b.Pos.X > bkg.Width) b.vX = ballspeed; curballspeed = ballspeed; p1.Score += 1; Play "ping" or "pong" sound when ball hits a paddle Play "laugh" if ball passes paddle when volley count ==0 Play "buzzer" when ball passes a paddle

Sound Stuff happening in the Update( ) Method if (keybrd.IsKeyDown(Keys.Space)) { if (gameover && start) gamestart(); else start = true; rumble.Dispose(); } if (!start) if (sb.Pos.X < 0 || sb.Pos.X > bkg.Width) sb.moveBall(true, false, 0); else if (sb.Pos.Y < 0 || sb.Pos.Y > bkg.Height) sb.moveBall(false, true, 0); sb.moveBall(false, false, 0); particleEngine.EmitterLocation = new Vector2(sb.Pos.X, sb.Pos.Y); particleEngine.Update(); if (countdown <= 0) ballstuff(); crowdsounds(); countdown -= 1; if (countdown == 0) gogame.Play(); When game is loaded both gameover and start are false so pressing the spacebar (Keys.Space) disposes of the "Let's get ready to Rumble..." audio and calls gamestart( ). At the end of a game, gameover is set to true so the next time the spacebar is pressed gamestart( ) is called. If game has started then the value of countdown is checked...if countdown<=0 then ballstuff( ) and crowdsounds( ) are called...otherwise countdown is decremented. The purpose of countdown is to give players a little time to get ready for the next volly. countdown starts at 50 and when it reaches 0 a beep called "gogame" is played and the volly starts. Note that while the volly is active countdown remains <= 0.