Presentation is loading. Please wait.

Presentation is loading. Please wait.

11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover.

Similar presentations


Presentation on theme: "11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover."— Presentation transcript:

1 11 Computers, C#, XNA, and You Session 1.1

2 Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover how C#, XNA, and Microsoft Visual Studio fit together to allow you to make games  See how to set up a development environment to create game programs  Run our first-ever XNA game  Find out what computers are all about ...and what makes a great programmer  Discover how C#, XNA, and Microsoft Visual Studio fit together to allow you to make games  See how to set up a development environment to create game programs  Run our first-ever XNA game Chapter 1: Computers, C#, XNA, and You2

3 COMPUTERS AND PROGRAMS  A program is a list of instructions that tell a computer what to do  When you write a program you have to do two things: 1. Figure out how to solve the problem 2. Express your solution in a form the computer can understand  If you can’t do it, neither can the computer!  A program is a list of instructions that tell a computer what to do  When you write a program you have to do two things: 1. Figure out how to solve the problem 2. Express your solution in a form the computer can understand  If you can’t do it, neither can the computer! Chapter 1: Computers, C#, XNA, and You3

4 Learning to Program  To be able to program you must be able to do two things: 1. Solve problems 2. Explain your solution to something very stupid (the computer)  There is actually a step 0 as well: 0.Find out what the customer wants  This is the most important step in real-world applications  To be able to program you must be able to do two things: 1. Solve problems 2. Explain your solution to something very stupid (the computer)  There is actually a step 0 as well: 0.Find out what the customer wants  This is the most important step in real-world applications Chapter 1: Computers, C#, XNA, and You4

5 Becoming a Great Programmer  Great Programmers are:  Knowledgeable – they know a lot about how to tell computers what to do and what computers are capable of doing  Creative – they enjoy finding new ways to do things  Good Company – they have to work with other programmers, and sometimes find out what the customer wants, even if the customer doesn’t actually know themselves  Persistent – they will keep working at a problem until they find a way to solve it  Great Programmers are:  Knowledgeable – they know a lot about how to tell computers what to do and what computers are capable of doing  Creative – they enjoy finding new ways to do things  Good Company – they have to work with other programmers, and sometimes find out what the customer wants, even if the customer doesn’t actually know themselves  Persistent – they will keep working at a problem until they find a way to solve it Chapter 1: Computers, C#, XNA, and You5

6 How You Will Learn  You are going to find out how to write C# programs by creating games  You are also going to learn how games themselves are made to work, based on your experience with the XNA Framework  There will be lots of game examples along the way which you can make, play, and modify  There will presentations like this, practical sessions, and hands on practical activities  Along with the odd test....  You are going to find out how to write C# programs by creating games  You are also going to learn how games themselves are made to work, based on your experience with the XNA Framework  There will be lots of game examples along the way which you can make, play, and modify  There will presentations like this, practical sessions, and hands on practical activities  Along with the odd test.... Chapter 1: Computers, C#, XNA, and You6

7 Three Things To Learn  The C# programming language  Used to tell the computer what to do  The XNA game development framework  A set of resources to help you make games  Visual Studio  A tool used to create, run, and debug programs  The C# programming language  Used to tell the computer what to do  The XNA game development framework  A set of resources to help you make games  Visual Studio  A tool used to create, run, and debug programs Chapter 1: Computers, C#, XNA, and You7 GAME C#XNA Visual Studio

8 The C# Programming Language  Lets you tell the computer how to do something  You write programs as a sequence of simple steps  A thing called a compiler converts your C# into computer instructions  Lets you tell the computer how to do something  You write programs as a sequence of simple steps  A thing called a compiler converts your C# into computer instructions Chapter 1: Computers, C#, XNA, and You8 GAME C#XNA Visual Studio

9 The XNA Framework  A framework for creating games  XNA Game Studio provides resources for game programmers  XNA also runs the “game loop”  A framework for creating games  XNA Game Studio provides resources for game programmers  XNA also runs the “game loop” Chapter 1: Computers, C#, XNA, and You9 GAME C#XNA Visual Studio

10 Microsoft Visual Studio  An “Integrated Development Environment” (IDE)  Where you write, run, and debug C# programs  A “word processor” for software  An “Integrated Development Environment” (IDE)  Where you write, run, and debug C# programs  A “word processor” for software Chapter 1: Computers, C#, XNA, and You10 GAME C#XNA Visual Studio

11 Getting Started Creating Games  To get started you need to:  Install Visual Studio 2010  Install XNA Game Studio 4.0  Both these items are available for free  They will run on most modern Windows PCs which support Windows XP or Vista  You don’t need a massively powerful computer to learn to program with XNA  You can even use a NetBook  To get started you need to:  Install Visual Studio 2010  Install XNA Game Studio 4.0  Both these items are available for free  They will run on most modern Windows PCs which support Windows XP or Vista  You don’t need a massively powerful computer to learn to program with XNA  You can even use a NetBook Chapter 1: Computers, C#, XNA, and You11

12 Installing Microsoft Visual Studio 2010  Visual Studio 2010 must be on your machine if you want to write XNA games  There are a number of versions; you can use the free “Express” version: http://www.microsoft.com/express/download/  You can install this on a PC running Windows XP, Vista, or Windows 7  This is the first step in building a place you can write games  Visual Studio 2010 must be on your machine if you want to write XNA games  There are a number of versions; you can use the free “Express” version: http://www.microsoft.com/express/download/  You can install this on a PC running Windows XP, Vista, or Windows 7  This is the first step in building a place you can write games Chapter 1: Computers, C#, XNA, and You12

13 Installing XNA Game Studio 4.0  The XNA Framework is installed after Visual Studio  It installs “on top” of it  XNA Game Studio 4.0 is a free download from: http://creators.xna.com  It adds game project types to Visual Studio 2008, along with some extra tools you can use to manage the games that you write  There are also some sample games, but these are quite complicated  The XNA Framework is installed after Visual Studio  It installs “on top” of it  XNA Game Studio 4.0 is a free download from: http://creators.xna.com  It adds game project types to Visual Studio 2008, along with some extra tools you can use to manage the games that you write  There are also some sample games, but these are quite complicated Chapter 1: Computers, C#, XNA, and You13

14 The XNA Creators Club  Only Trial and Premium members of XNA Creators Club can send their games programs to an Xbox  Only Premium members of the XNA Creators Club can sell their games on Xbox Live  Trial membership is available to students  Premium membership costs $99 a year  You don’t need to join the Creators Club to run your game programs on a Windows PC or Zune  Creators Club Web site: http://creators.xna.com  Only Trial and Premium members of XNA Creators Club can send their games programs to an Xbox  Only Premium members of the XNA Creators Club can sell their games on Xbox Live  Trial membership is available to students  Premium membership costs $99 a year  You don’t need to join the Creators Club to run your game programs on a Windows PC or Zune  Creators Club Web site: http://creators.xna.com Chapter 1: Computers, C#, XNA, and You14

15 Linking a PC and an Xbox 360  The PC sends XNA games into the Xbox 360 via the network connection  The PC and the Xbox must be “bonded” together so they know about each other  You do this once and both devices then remember the connection  The XNA Game Studio Device Center program manages this for you  XNA game programs are stored on the hard disk inside the Xbox, so you can play them later  The PC sends XNA games into the Xbox 360 via the network connection  The PC and the Xbox must be “bonded” together so they know about each other  You do this once and both devices then remember the connection  The XNA Game Studio Device Center program manages this for you  XNA game programs are stored on the hard disk inside the Xbox, so you can play them later Chapter 1: Computers, C#, XNA, and You15

16 Linking a PC and a Zune  The Zune portable music device can also run XNA programs  You do not need to be in the XNA Creators Club to send game programs to your Zune  The Zune is connected to the Windows PC using its USB cable  The Zune and the Windows PC are “bonded” using XNA Game Studio Device Center  XNA games are stored on the Zune hard disk  The Zune portable music device can also run XNA programs  You do not need to be in the XNA Creators Club to send game programs to your Zune  The Zune is connected to the Windows PC using its USB cable  The Zune and the Windows PC are “bonded” using XNA Game Studio Device Center  XNA games are stored on the Zune hard disk Chapter 1: Computers, C#, XNA, and You16

17 XNA Game Studio Device Center  Used to manage the connection between devices  You can run it from within Visual Studio, or as a free-standing program  Used to manage the connection between devices  You can run it from within Visual Studio, or as a free-standing program Chapter 1: Computers, C#, XNA, and You17

18 Running Your First Game Program  A game contains lots of content. This is the stuff that is not program code:  Graphics, sounds, level designs, scripts, help text  This must all be managed as part of the game so that when it is sent to the Xbox 360 it is all available for use  XNA Game Studio provides a Content Manager to look after this  Works with Visual Studio to create a project that contains everything the game needs to run  A game contains lots of content. This is the stuff that is not program code:  Graphics, sounds, level designs, scripts, help text  This must all be managed as part of the game so that when it is sent to the Xbox 360 it is all available for use  XNA Game Studio provides a Content Manager to look after this  Works with Visual Studio to create a project that contains everything the game needs to run Chapter 1: Computers, C#, XNA, and You18

19 Making an Empty Project  Visual Studio will make you an empty game project  This is like giving a sculptor a block of clay  You select the target device when you make the project  You then add your program code and your content to make your game  Visual Studio will then use this project to build the game and send it to your target device  All XNA games start from the same empty project  Visual Studio will make you an empty game project  This is like giving a sculptor a block of clay  You select the target device when you make the project  You then add your program code and your content to make your game  Visual Studio will then use this project to build the game and send it to your target device  All XNA games start from the same empty project Chapter 1: Computers, C#, XNA, and You19

20 Running a Game Project  Visual Studio provides commands to run and stop a game program  Visual Studio compiles the game program from C# into instructions the target can understand  The game program runs alongside Visual Studio  You can think of Visual Studio as the “Remote Control” for your game program  The game can also run “free standing” without Visual Studio  Visual Studio provides commands to run and stop a game program  Visual Studio compiles the game program from C# into instructions the target can understand  The game program runs alongside Visual Studio  You can think of Visual Studio as the “Remote Control” for your game program  The game can also run “free standing” without Visual Studio Chapter 1: Computers, C#, XNA, and You20

21 1. Creating an Empty XNA Game Project Chapter 1: Computers, C#, XNA, and You21  It is very easy to create an empty XNA game project  It will even run  However, it won’t do much  It is very easy to create an empty XNA game project  It will even run  However, it won’t do much

22 Using Multiple Hardware Platforms  XNA is a framework which is designed to be independent of the actual game hardware  Can run on a Windows PC, a Zune, or an Xbox 360  Might even be new XNA devices in the future  When you create a game, you can consider running it on any one or all three of these platforms  Now you are going to find out how run the same game on a different device  XNA is a framework which is designed to be independent of the actual game hardware  Can run on a Windows PC, a Zune, or an Xbox 360  Might even be new XNA devices in the future  When you create a game, you can consider running it on any one or all three of these platforms  Now you are going to find out how run the same game on a different device Chapter 1: Computers, C#, XNA, and You22

23 XNA Project as Containers  People create projects to manage all the aspects of a job  A director of a play will have scripts, costume designs, sound effects, tickets, etc.  Visual Studio creates a project to keep all the items together for a particular game  The Content Manager looks after the game assets  A particular project is targeted at a particular XNA device  People create projects to manage all the aspects of a job  A director of a play will have scripts, costume designs, sound effects, tickets, etc.  Visual Studio creates a project to keep all the items together for a particular game  The Content Manager looks after the game assets  A particular project is targeted at a particular XNA device Chapter 1: Computers, C#, XNA, and You23

24 Making Multiple Projects in Solutions  A solution is a container for projects  Think of it as a filing cabinet that we can put plays in if you like  A solution can hold multiple projects so that a single game development can be aimed at different hardware  They can share the same program code, but perhaps use different asset files to match the target device  Visual Studio can copy projects from one device to another  A solution is a container for projects  Think of it as a filing cabinet that we can put plays in if you like  A solution can hold multiple projects so that a single game development can be aimed at different hardware  They can share the same program code, but perhaps use different asset files to match the target device  Visual Studio can copy projects from one device to another Chapter 1: Computers, C#, XNA, and You24

25 2. Making Multiple XNA Projects Chapter 1: Computers, C#, XNA, and You25  You can copy a Windows PC project to run on either a Zune or an Xbox

26 Summary  Programs tell computers what to do  People write programs in a programming language (we use C#) to provide these instructions  XNA is a framework for writing computer games  Visual Studio is a tool for program (and game) creation  You can target a Windows PC, Xbox 360, or Zune with XNA games  To target Xbox 360 you need to be a “Trial” member of the Creators Club  To sell games you need to be a “Premier” member  Programs tell computers what to do  People write programs in a programming language (we use C#) to provide these instructions  XNA is a framework for writing computer games  Visual Studio is a tool for program (and game) creation  You can target a Windows PC, Xbox 360, or Zune with XNA games  To target Xbox 360 you need to be a “Trial” member of the Creators Club  To sell games you need to be a “Premier” member Chapter 1: Computers, C#, XNA, and You26

27 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You27

28 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You28

29 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You29

30 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You30

31 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You31

32 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You32

33 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You33

34 True/False Pop Quiz  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles  Computers write their own programs  XNA is a programming language  Visual Studio is used to write C# programs  You have to have a huge brain to write games  You need to be in the Creators Club to write XNA games  C# is just for writing games  XNA stands for Xbox is Nicer than All other consoles Chapter 1: Computers, C#, XNA, and You34


Download ppt "11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover."

Similar presentations


Ads by Google