MTA-4201 Game Programming Chapter 8 : Scrolling Background & Font

Slides:



Advertisements
Similar presentations
2000 Prentice Hall, Inc. All rights reserved. 1 Outline 3.1Introduction 3.2Game Loop Components 3.3How to Implement in C# 3.4Adding Image to XNA Project.
Advertisements

2D Platform Games: Tiles & Scrolling
XS - Platform What is XS – Manager ?
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
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.
Dan Waters, Academic Relations Manager, Microsoft.
Macromedia Director 8 Foundation Level Course. What is Director? Director is a challenging program for creating animation and multimedia productions for.
COMPUTER PROGRAMMING 2 Chapter 7 Sound. Objectives Find out how to prepare sounds for inclusion in Microsoft XNA projects. Incorporate sounds into XNA.
BlackBerry Game Development Challenges Jeff Bacon, Sr. Smartphone Product Manager Simon Dale, Smartphone Services Team Lead J15.
2D Graphics in XNA Game Studio Express (Modeling a Class in UML) Game Design Experience Professor Jim Whitehead February 5, 2008 Creative Commons Attribution.
DEngine A C# XNA (CTP) 2D Game Engine. Websites Main page High-level explanation of ants navigation
Windows 8 Windows Phone 8 Web Mobile … and WakeUpAndCode.com.
UFCEKU-20-3Web Games Programming Tile-based and Isometric Worlds.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
I can haz gamez?. Bret Stateham Microsoft Developer Evangelist Blog:
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
Finishing 2D COSC 315 Fall 2014 Bridget M. Blodgett.
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.
Go to the MTSD Home Page In the URL add “/admin”
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.
Rob Miles Microsoft MVP University of Hull Fun Programming with Visual Studio.
Getting Started. XNA Game Studio 4.0 To download XNA Game Studio 4.0 itself, go to XNA Game.
Using Namepsaces  This section lists the namespaces that the application will be using frequently. Saves the programmer from specifying a fully qualified.
InteractiveMedia’s Imagine Software Platform When user clicks on the Imagine desktop icon or installed app. This is the first thing the user will see full.
Using Tiled. What is Tiled? It’s a level editor It allows game programmers to create their 2D game world with ease.
Text. DO NOW Login to your computer. Go to your Google Docs document for DONOW, put todays date below where you finished last time. Make a list in order.
Developing the Game User Interface (UI) Lesson 5.
1 Useful Tools for Making Video Games Part V An overview of.
 graphic organizers in the form of illustrations or images displayed in sequence for the purpose of pre-visualizing a motion picture, animation, motion.
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.
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.
XNA An Introduction. What XNA is… Microsoft® XNA™ is composed of industry- leading software, services, resources, and communities focused on enabling.
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.
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
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.
3D Models and Meshes Asst. Prof. Rujchai Ung-arunyawee COE, KKU.
CHAPTER 3 Getting Player Input XNA Game Studio 4.0.
XNA Basic Displaying Image & Collision Detect. What’s format image that XNA support? XNA support only.bmp.png and.jpg image..PNG have transparent region.
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.
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.
11 Using the Keyboard in XNA Session 9.1. Session Overview  Discover more detail on how the XNA keyboard is implemented  Find out how to use arrays.
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.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 22 Game Graphics.
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.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Windows App Studio.
Computer Science – Game DesignUC Santa Cruz Tile Engine.
Unity Application Generator How Can I… Export variables of a Control module with all parameters, modify the some of the parameters like Initial values.
2D Graphics CMT3311. This covers... How to make a transparent sprite How to add a sprite to your project and draw it Properties of sprites and how to.
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.
XNA 4.0 Side Scrolling.
Lecture 4 Using SpriteFonts
Week 2 - Monday CS361.
Using and Creating Sprites
Microsoft Access 2007 – Level 2
CS 134 More Graphics.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1st Assignment Use this template Open Offical Course Syllabus or adlib
Side Scrolling Game Development.
Lecture 2 - Building a Monogame Windows Project
Web programming and advanced development techniques
Game Programming Algorithms and Techniques
Collisions with Static Objects
Presentation transcript:

MTA-4201 Game Programming Chapter 8 : Scrolling Background & Font Outline 8.1 Sprite Font 8.2 Type of Scrolling Background 8.3 Tile-based Scrolling Background 8.4 2D Camera Movement 8.5 2.5D Isometric Map

There are Three ways to output text in XNA games: 8.1 Sprite Font There are Three ways to output text in XNA games: Xml based spritefont (For English) To draw text on screen : http://msdn.microsoft.com/en-us/library/bb447673.aspx

8.1 Sprite Font The following list of fonts are installed by XNA Game Studio and are redistributable: Kooten.ttf, Linds.ttf, Miramo.ttf, Bold Miramob.ttf, Peric.ttf, Pericl.ttf, Pesca.ttf, Pescab.ttf

8.1 Sprite Font

(2) Bitmap Font (For English) (3) Customized Content Pipeline (For Asian Language) http://msdn.microsoft.com/en-us/library/bb447751.aspx

8.2 Types of Scrolling Background Scrolling Background games allow game Developers to present a much larger world To the game player because things could Be outside of the view of the immediate game Screen. Layers of scrolling backgrounds to Improve the quality of the game screens. (1) Side-Scrolling Background (2) Vertical-Scrolling Background (3) Parallax-Scrolling Background

8.3 Horizontal / Vertical Scrolling In the project, add the images, and the library files : Sprite.cs and HorizontallyScrollingBackground.cs . (2) Add the new variable //Create a Horizontally scrolling background HorizontallyScrollingBackground mScrollingBackground; (3) Modify the LoadContent() method to look like this. protected override void LoadContent() { mScrollingBackground = new HorizontallyScrollingBackground(this.GraphicsDevice.Viewport); mScrollingBackground.AddBackground("Background01"); mScrollingBackground.AddBackground("Background02"); mScrollingBackground.AddBackground("Background03"); mScrollingBackground.AddBackground("Background04"); mScrollingBackground.AddBackground("Background05"); // Load the content for the Scrolling background mScrollingBackground.LoadContent(this.Content); }

8.3 Horizontal Scrolling (4) Modify the Update() method to look like this. protected override void Update(GameTime gameTime) { //Update the scrolling backround. mScrollingBackground.Update(gameTime, 160, HorizontallyScrollingBackground.HorizontalScrollDirection.Left); } (5) Modify the Draw() method to look like this. spriteBatch.Begin(); // Draw the scrolling background mScrollingBackground.Draw(spriteBatch); spriteBatch.End(); Detailed Explanation of Horizontal Scrolling : http://www.xnadevelopment.com/tutorials/scrollinga2dbackground/ScrollingA2DBackground.shtml

8.3 Tile-based Scrolling / Parallax Scrolling A sprite class is added to provide extra features for the sprite uses in the game.

8.3 Tile-based Scrolling / Parallax Scrolling A sprite class is added to provide extra features for the sprite uses in the game.

8.4 2D Camera Movement It supports a large world / level, and the game controls the camera to show proportion of the world.

8.5 Isometric View