Gameprogrammeren: Edit states

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

Je gebruikt will of going to als je het over de toekomst hebt. I will phone you tonight. Next week we will know the results.
Thursday, 16 April 2015 donderdag 16 april 2015 Click Klik.
Lesson 6. Today’s lesson Homework Top 5s Grammar: past perfect & future perfect Bonus Assignment Linking words Vocabulary.
11 Reaction Timer Game Session 8.1. Session Overview  Find out how an XNA program can measure the passage of time and trigger events at certain points.
COMPUTER PROGRAMMING 2 Chapter 7 Sound. Objectives Find out how to prepare sounds for inclusion in Microsoft XNA projects. Incorporate sounds into XNA.
1/03/09 De 89 à 98. 1/03/09 De 89 à 98 1/03/09 De 89 à 98.
2D Graphics in XNA Game Studio Express (Modeling a Class in UML) Game Design Experience Professor Jim Whitehead February 5, 2008 Creative Commons Attribution.
2D Graphics in XNA Game Studio Express (Plus, Random numbers in C#) Game Design Experience Professor Jim Whitehead January 16, 2009 Creative Commons Attribution.
Het leven als schipper is niet altijd Roze geur & manen schijn.
Roger Boesch Developer Technical Specialist Developer and Platform Group.
Display 480x800 QVGA 320x480 HVGA Capacitive touch 4 or more contact points Camera 5 mega pixels or more Dedicated camera button Hardware buttons.
Computer Science – Game DesignUC Santa Cruz CMPS 20: Game Design Experience January 14, 2010 Arnav Jhala.
AI & 2D Development COSC 315 Fall 2014 Bridget M. Blodgett.
Using QuickSilver to mock-up Web 3.0 Krzys Ostrowski.
CSE 380 – Computer Game Programming Sprite Animation
COMPUTER PROGRAMMING 2 Timers. Game Idea: Mob Reaction Timer Use a timer variable to keep track of time and a variable for each player to measure the.
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.
1 Useful Tools for Making Video Games Part V An overview of.
9.3. P ARTICLE S YSTEMS Development of a particle system.
User Input and Collisions COSC 315 Fall 2014 Bridget M. Blodgett.
Rob Miles. Creating a Working MoodLight We know that colours in XNA are stored as values which represent the amount of red, blue, green and transparency.
CHAPTER 10 Using C# Methods to Solve Problem XNA Game Studio 4.0.
11 Working with Images Session Session Overview  Find out more about image manipulation and scaling when drawing using XNA  Start to implement.
Object Oriented Design COSC 315 Fall 2014 Bridget M. Blodgett.
XNA Game Studio 4.0 Keyboard and Mouse Controls + more on Animated Sprites.
11 Making a Sprite Session 4.2. Session Overview  Describe the principle of a game sprite, and see how to create a sprite in an XNA game  Learn more.
Rob Miles. How does an XNA game program work? Programs tell computers what to do A program is written in a programming language – C# is a programming.
Where Do Frogs Come From Comprehension Game Directions: 1. Read your story. 2. Cut out playing cards. 3. Sort the playing cards into two piles or columns:
Indirect speech What did your neighbour say?? He/She said…..
2.3. A RCHITECTURAL D ESIGN I Example approach for game screen management.
Aaron Yuen 1 Outline 9.1Storyboarding & Charting Method for Game Design 9.2Game State in Game Development 9.3Game State Management 9.4GUI Assets for Gameplay.
CHAPTER 3 Getting Player Input XNA Game Studio 4.0.
CHAPTER 6 Multiplayer XNA Game Studio 4.0. Objectives Discover how to detect and use individual button-press events in a game. Learn how to create and.
Vaughan Knight Vaughan Knight Bit
CHAPTER 2 The Game Loop - Variables, Types, Classes and Objects in XNA XNA Game Studio 4.0.
(2.2) Hallo één klasse...met één methode...met acht opdrachten accolades begrenzen klasse en methode using Android.OS; using Android.App; using Android.Widget;
11 Writing Text Session 5.1. Session Overview  Show how fonts are managed in computers  Discover the difference between bitmap fonts and vector fonts.
Playing with Sprites. XNA Game Lifecycle In the faceBall demo program we bounced a smiley face around the graphical display against a background image.
pictures_slideshow/article.htm.
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.
Rob Miles. Using data in an XNA game program An XNA game program Draw and Update methods that are called to run the game Colours are held in XNA as four.
11 Adding Vibration Effects Session Session Overview  Describe how the vibration feature of the gamepad works  Show how an XNA program can control.
XNA Sound Effects. float volume, pitch, pan; SoundEffect boing1; SoundEffect boing2; boing1 = Content.Load ("boing1"); boing2 = Content.Load ("boing2");
Rob Miles. Creating a Broken MoodLight An XNA game contains game data which is used by the Draw and Update methods – Update updates the game data – Draw.
。 33 投资环境 3 开阔视野 提升竞争力 。 3 嘉峪关市概况 。 3 。 3 嘉峪关是一座新兴的工业旅游城市,因关得名,因企设市,是长城文化与丝路文化交 汇点,是全国唯一一座以长城关隘命名的城市。嘉峪关关城位于祁连山、黑山之间。 1965 年建市,下辖雄关区、镜铁区、长城区, 全市总面积 2935.
CHAPTER 5 Text XNA Game Studio 4.0. Objectives Discover how text is drawn using Microsoft XNA. Add some font resources to your XNA program. Draw some.
Start the Quiz Show the answer Check the answer Time’s up! Timer
FUTURE IN THE PAST.
XNA 4.0 Side Scrolling.
Primes Andere joker – andere achterzijde Jan Pelssers.
Lecture 4 Using SpriteFonts
Sprite Sheets, Game States
Using and Creating Sprites
Gameprogrammeren: Klassen en objecten in Painter
Gameprogrammeren: Menu’s in Penguin Pairs
المبادئ والهياكل الإدارية العليا والإدارية
Collision Detection.
Animated Sprites.
Side Scrolling Game Development.
2.3. Architectural Design I
Gameprogrammeren: Interactie in Penguin Pairs
Player preferences, Loading Scenes, Activating and Enabling
SWEET MERCIES (David Ruis)
Gameprogrammeren: Game states
MTA-4201 Game Programming Chapter 8 : Scrolling Background & Font
Click on a number block to go to a question. Blocks 1, ,4, 5, 8, 10, 12, 15, 16, 17, 19, 21, 23, 24, 25 will.
Development of a particle system
Collisions with Static Objects
Presentation transcript:

Gameprogrammeren: Edit states Arjan Egges Paul Bergervoet Wouter van Toll

Level finished Overlay

‘Edit states’ Een edit state is een game state die gebruikt maakt van andere game states Voorbeelden: Game over state Level finished state …

Plaats de overlay in het midden LevelFinishedState class LevelFinishedState : GameObjectList { protected IGameLoopObject playingState; public LevelFinishedState() GameStateManager gm = GameEnvironment.GameStateManager; playingState = gm.GetGameState("playingState"); SpriteGameObject o = new SpriteGameObject(“spr_welldone"); o.Position = new Vector2(GameEnvironment.Screen.X, GameEnvironment.Screen.Y) / 2 - o.Center; this.Add(o); } … Plaats de overlay in het midden van het scherm.

LevelFinishedState public override void HandleInput(InputHelper inputHelper) { if (!inputHelper.KeyPressed(Keys.Space)) return; GameEnvironment.GameStateManager.SwitchTo("playingState"); (playingState as PlayingState).NextLevel(); } public override void Update(GameTime gameTime) { playingState.Update(gameTime); public override void Draw(GameTime gameTime, SpriteBatch s) { playingState.Draw(gameTime, s); base.Draw(gameTime, s);

Level afgemaakt? public bool Completed { get SpriteGameObject exitObj = this.Find("exit") as SpriteGameObject; Player player = this.Find("player") as Player; GameObjectList w = this.Find("waterdrops") as GameObjectList; if (!exitObj.CollidesWith(player)) return false; foreach (GameObject d in w.Objects) if (d.Visible) return true; } Speler heeft de uitgang nog niet bereikt Alle waterdruppels zijn nog niet verzameld

Update-actie van Level public override void Update(GameTime gameTime) { TimerGameObject timer = Find("timer") as TimerGameObject; Player player = Find("player") as Player; // check if we died … // check if we ran out of time // check if we won base.Update(gameTime); }

Update-actie van Level // check if we died if (!player.IsAlive) timer.Running = false; // check if we ran out of time if (timer.GameOver) player.Explode(); // check if we won if (this.Completed && timer.Running) { player.LevelFinished(); }

public void Explode() { if (!isAlive || finished) return; isAlive = false; exploded = true; velocity = Vector2.Zero; position.Y += 15; this.PlayAnimation("explode"); } public void LevelFinished() { finished = true; velocity.X = 0.0f; this.PlayAnimation("celebrate"); GameEnvironment.AssetManager.playSound("snd_player_won");