<< Chapter < Page
  Xna game studio     Page 3 / 16
Chapter >> Page >

General background information

A software framework

XNA is a very sophisticated C# application. It isn't simply a program in the sense of the programs that you have seen so far in this course or aword processor or a spread sheet. Instead, it is a software framework designed specifically to make it easier for you to create computer games using the C# programming language.

What is a software framework?

Here is part of what Wikipedia has to say about a software framework:

A software framework, in computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden orspecialized by user code providing specific functionality. Frameworks are a special case of software libraries in that they are reusable abstractions ofcode wrapped in a well-defined API, yet they contain some key distinguishing features that separate them from normal libraries.

Software frameworks have these distinguishing features that separate them from libraries or normal user applications:

  1. inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated bythe caller, but by the framework.
  2. default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops.
  3. extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specificfunctionality
  4. non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify itscode.

In short, a framework is a computer program that helps you to write computer programs . The description given above is a good match for the XNA framework.

New project choices in Visual C#

Up to this point in this collection of modules, all of the programs that I have explained have been Visual C# Console Applications .

Assuming that you have Visual C# 2010 and XNA Game Studio 4.0 Refresh installed on your computer, if you start Visual C# and select New Project from the File menu, you have a choice of about a dozen different kinds of projects that you can create within Visual C#. One of thosechoices is to create a Console Application .

A Console Application

When you create a Console Application, a project tree is created on your disk containing numerous folders and files. One of those files is a C#source code file named Program.cs . This file, which is the skeleton of a new class named Program , is opened in the editor pane in Visual C#.

The skeleton code in the file looks something like Listing 1 when it first opens.

Listing 1 . Initial contents of the file named Program.cs for a Console Application.

using System; using System.Collections.Generic;using System.Linq; using System.Text;namespace ConsoleApplication1 {class Program {static void Main(string[] args){ }} }

Start debugging

If you select Start Debugging on the Debug menu, the program will run and terminate almost immediately. At that point, theproject tree will have expanded to contain more files and folders even though the program hasn't yet done anything useful.

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Xna game studio. OpenStax CNX. Feb 28, 2014 Download for free at https://legacy.cnx.org/content/col11634/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Xna game studio' conversation and receive update notifications?

Ask