Windows Phone 7 Game Development using XNA

Similar documents
Using WPF for Computer Graphics

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Web Based 3D Visualization for COMSOL Multiphysics

Cross-Platform Game Development Best practices learned from Marmalade, Unreal, Unity, etc.

ipad, a revolutionary device - Apple

ANDROID DEVELOPER TOOLS TRAINING GTC Sébastien Dominé, NVIDIA


GPU Profiling with AMD CodeXL

Mobile Phones Operating Systems

Lecture Notes, CEng 477

An Easier Way for Cross-Platform Data Acquisition Application Development

Beginning Android 4. Games Development. Mario Zechner. Robert Green

L20: GPU Architecture and Models

Computer Graphics Hardware An Overview

Computer Graphics. Computer graphics deals with all aspects of creating images with a computer

Android Development: Part One

Introduction to Computer Graphics

Crosswalk: build world class hybrid mobile apps

Game Development in Android Disgruntled Rats LLC. Sean Godinez Brian Morgan Michael Boldischar

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

Here to take you beyond Mobile Application development using Android Course details

TI Linux and Open Source Initiative Backgrounder

Optimizing AAA Games for Mobile Platforms

How To Get Started With Windows Phone

Full and Para Virtualization

Using Mobile Processors for Cost Effective Live Video Streaming to the Internet

Lecture 1 Introduction to Android

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Mashup Development Seminar

GPU Usage. Requirements

Mobile Game and App Development the Easy Way

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Getting Started with CodeXL

A little code goes a long way Cross-platform game development with Lua. Ivan Beliy, Software Engineer

The Future Of Animation Is Games

Take full advantage of IBM s IDEs for end- to- end mobile development

Performance Optimization and Debug Tools for mobile games with PlayCanvas

How To Develop For A Powergen 2.2 (Tegra) With Nsight) And Gbd (Gbd) On A Quadriplegic (Powergen) Powergen Powergen 3

Game-Making Software. Created by. in support of

01. Introduction of Android

Hardware design for ray tracing

Intel Media Server Studio - Metrics Monitor (v1.1.0) Reference Manual

Multi-GPU Load Balancing for Simulation and Rendering

evm Virtualization Platform for Windows

TEACHING GRAPHICS PROGRAMMING ON MOBILE DEVICES

1) SETUP ANDROID STUDIO

Windows Presentation Foundation: What, Why and When

International Engineering Journal For Research & Development

System Requirements G E N E R A L S Y S T E M R E C O M M E N D A T I O N S

Programming models for heterogeneous computing. Manuel Ujaldón Nvidia CUDA Fellow and A/Prof. Computer Architecture Department University of Malaga

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

What is GPUOpen? Currently, we have divided console & PC development Black box libraries go against the philosophy of game development Game

Getting Started with the LabVIEW Mobile Module Version 2009

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

Computer Layers. Hardware BOOT. Operating System. Applications

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Preparing a SQL Server for EmpowerID installation

Virtualization Technology (or how my Windows computer gave birth to a bunch of Linux computers)

NVIDIA CUDA GETTING STARTED GUIDE FOR MICROSOFT WINDOWS

Introduction to Android

An Introduction to Android

RIA DEVELOPMENT OPTIONS - AIR VS. SILVERLIGHT

Windows Phone Programming in C# Rob Miles Version 1.0 January 2011

Building an Android client. Rohit Nayak Talentica Software

Data Visualization Using Hardware Accelerated Spline Interpolation

Developing and deploying mobile apps

ECE 455/555 Embedded System Design. Android Programming. Wei Gao. Fall

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Introducing PgOpenCL A New PostgreSQL Procedural Language Unlocking the Power of the GPU! By Tim Child

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Homeschool Programming, Inc.

Publishing to TIZEN Using the Automated Conversion/Repackaging of Existing Android Apps. Hyeokgon Ryu, Infraware Technology, Ltd.

Base One's Rich Client Architecture

Equalizer. Parallel OpenGL Application Framework. Stefan Eilemann, Eyescale Software GmbH

IOS110. Virtualization 5/27/2014 1

OPERATING SYSTEM SERVICES

MobileLite Wireless G2 5-in-1 Mobile Companion User Manual

Building Applications Using Micro Focus COBOL

GPU System Architecture. Alan Gray EPCC The University of Edinburgh

Android Virtualization from Sierraware. Simply Secure

How To Write A Cg Toolkit Program

NVIDIA GRID OVERVIEW SERVER POWERED BY NVIDIA GRID. WHY GPUs FOR VIRTUAL DESKTOPS AND APPLICATIONS? WHAT IS A VIRTUAL DESKTOP?

Issues of Hybrid Mobile Application Development with PhoneGap: a Case Study of Insurance Mobile Application

.NET Overview. Andreas Schabus Academic Relations Microsoft Österreich GmbH

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

Introduction GPU Hardware GPU Computing Today GPU Computing Example Outlook Summary. GPU Computing. Numerical Simulation - from Models to Software

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Chapter 1: Introduction. What is an Operating System?

Transcription:

University of Kentucky Engineering Day Windows Phone 7 Game Development using XNA Tamas Nagy Department of Computer Science University of Kentucky Saturday Feb. 25, 2011

Free Renegade 25.02.2012 Tamas Nagy Univ. of Kentucky 2

Overview Background Introduction to Game Programming Pitfalls Platforms Software Needed Introduction to SLXna and XNA Sample 2d game 25.02.2012 Tamas Nagy Univ. of Kentucky 3

Programmer Programmer (n) An organism that converts caffeine into code I tried to change the world, but I couldn t find the source code 25.02.2012 Tamas Nagy Univ. of Kentucky 4

So you want to make a game? You have many options. Platform Genre Graphics (2D vs 3D) Language Connectivity Choose your team wisely and draw up a contract for revenue at the start. It will avoid conflicts later. Be flexible and motivated. It will take a lot of willpower to finish a project this size. 25.02.2012 Tamas Nagy Univ. of Kentucky 5

Pitfalls Over complication Not using libraries Skipping on Design Phase Rigid code Not prototyping enough 25.02.2012 Tamas Nagy Univ. of Kentucky 6

Platform Which platforms to support? Xbox Windows Phone 7 Android ios Linux Windows, etc How difficult/time consuming will it be to deploy? 25.02.2012 Tamas Nagy Univ. of Kentucky 7

Windows Phone 7 as a Platform Robust and powerful OS based on Windows CE Kernel Lots of Incentives for students DreamSpark Microsoft-sponsored competitions Smaller market leads to more visibility Up and coming Shares most of codebase with Windows and Xbox so most tutorials are cross compatible 25.02.2012 Tamas Nagy Univ. of Kentucky 8

Software Needed Microsoft Visual Studio 2010 Express for Windows Phone 2D Graphical Software Inkscape 3D Graphical Software Wings3D MSDN Dev Net 25.02.2012 Tamas Nagy Univ. of Kentucky 9

Introduction to XNA and SLXna Silverlight XNA (WP7 7.1+ Mango ) Convenience Expression Blend Animations Application blends in with WP7 UI 25.02.2012 Tamas Nagy Univ. of Kentucky 10

Introduction to XNA and SLXna Pure XNA 4.0 Refresh (WP7 7.0+, Windows, Xbox) not used in combination with Silverlight Portability Compatibility Speed Resource amount 25.02.2012 Tamas Nagy Univ. of Kentucky 11

XNA and SLXna Games Have a set structure across all platforms (N/A to SLXna) Uses C# or VB C++ will be added with Apollo Convenience framework SpriteBatch Model, Mesh, etc Content Processing 25.02.2012 Tamas Nagy Univ. of Kentucky 12

Drawbacks to conventional XNA Complexity XNA/C# coding is much more complex than alternatives such as GameMaker. Overkill for simple 2D games Lack of in-game menu creation All of the menus have to created manually Difficult to make look nice at first Incompatibility with frameworks outside of.net 25.02.2012 Tamas Nagy Univ. of Kentucky 13

An example simple 2D game Features Game State Management Support for pause/resume etc Player controlled by accelerometer Tap to fire Random enemy spawning Rudimentary particle system http://msdn.microsoft.com/en-us/hh641313 25.02.2012 Tamas Nagy Univ. of Kentucky 14

Questions? 25.02.2012 Tamas Nagy Univ. of Kentucky 15

University of Kentucky Engineering Day High Performance Graphics using XNA (WP7/8, XBOX, Windows) Tamas Nagy Department of Computer Science University of Kentucky Saturday Feb. 25, 2011

Before we begin Premature optimization is the root of all evil -Donald Knuth XKCD: http://imgs.xkcd.com/comics/the_general_problem.png 25.02.2012 Tamas Nagy Univ. of Kentucky 17

High Performance Graphics (HPG) OpenGL Khronos Group Open-Source Low-level Platform-Independent Direct3D/DirectX & XNA Microsoft Closed-Source Direct3D low level, XNA high level Platform-Independent 25.02.2012 Tamas Nagy Univ. of Kentucky 18

Hardware Acceleration with HPG Utilizes power of the graphics card Hundreds of parallel processors Super-speed VRAM Dedicated FPUs, etc Many different companies/protocols Nvidia, AMD, ARM, Qualcomm, etc OpenGL 1.0-4.2, Direct3D 5-11.1, XNA 1.0-4.0R XNA abstracts all this away; no boilerplate code 25.02.2012 Tamas Nagy Univ. of Kentucky 19

3D Graphics The screen is still two dimensional but the game world itself has three dimensions. Two coordinate systems Left-handed (+z going into the screen) Right-handed (+ z coming out of screen) ß XNA default 25.02.2012 Tamas Nagy Univ. of Kentucky 20

Example graphics pipeline http://http.developer.nvidia.com/cgtutorial/cg_tutorial_chapter01.html http://what-when-how.com/wp-content/uploads/2011/08/ tmpd73_thumb1.jpg 25.02.2012 Tamas Nagy Univ. of Kentucky 21

Introduction to Primitives, Vertex Arrays and VBOs Primitives A basic building block for constructing complex 3D shapes LineList LineStrip TriangleList TriangleStrip Vertex Arrays vs. Vertex Buffer Objects http://what-when-how.com/xna-game-studio-4-0- programmingdeveloping-for-windows-phone-7-and-xbox-360/let-the-3drendering-start-xna-game-studio-4-0-programming-part-1/ http://what-when-how.com/wp-content/uploads/2011/08/tmpd81_thumb.jpg http://what-when-how.com/wp-content/uploads/2011/08/tmpd96_thumb2.jpg 25.02.2012 Tamas Nagy Univ. of Kentucky 22

Complex 3D Objects Represents as Models in XNA Examples An animal A car An entire level Made up of ModelMeshes that represent a single physical object Examples A door Tires Has a ModelMeshPart that contains all same material triangles Reflective for car windows Shiny for car hood ModelBone How the ModelMesh is positioned relative to the rest of the object 25.02.2012 Tamas Nagy Univ. of Kentucky 23

Content Processing Allows you to precompile all of your resources into a binary format (.xnb) so that you will not have to do it at runtime Custom Content Processors are easy to write Easy level creation via XML 25.02.2012 Tamas Nagy Univ. of Kentucky 24

State machines Graphics card are state machines Excellent at performing same operations many times. State changes are expensive PCI-E (and equivalent) interfaces are slow 25.02.2012 Tamas Nagy Univ. of Kentucky 25

A Performance Detour Do not be misled by the functions; the GPU will be rendering while the CPU is running your update and render functions. CPU-bound vs GPU-bound Miller et al. XNA Game Studio 4.0 Programming 25.02.2012 Tamas Nagy Univ. of Kentucky 26

Object Pooling Essential for games written in a managed language Basically, keeping references to all game objects so that none of them are deallocated into the heap. Artifacts Full reset required otherwise an object might retain qualities across instances 25.02.2012 Tamas Nagy Univ. of Kentucky 27

Questions? 25.02.2012 Tamas Nagy Univ. of Kentucky 28