Game Implementation Part one
As we get into the actual coding part of this tutorial, I thought I would at least show an image of what DigiPen was aiming for in this game.
As we get into the actual coding part of this tutorial, I thought I would at least show an image of what DigiPen was aiming for in this game.
The DigiPen tutorial was originally delivered on top of a basic game engine written for the tutorial series. Now the specifics of the engine were discussed briefly in the webcast, so I’ll elaborate here on those components and reflect on their place in an XNA based game.
Right, before hitting the ground running with the rest of the DigiPen tutorial, you first need to know about this thing called XNA that we will be developing in. Sure I’ve discussed and pointed out what it is (nice friendly game programming framework) and I’ve gone over about game loops and all that other theory, but what does it all mean and how does it look.
2D graphics are the computer-based generation of digital images mostly from two-dimensional models (2D geometric models, text, and digital images). These graphics are mainly used in applications that were originally developed using traditional printing and drawing techniques, such as typography, cartography, technical drafting, advertising, and so forth. In many domains, a description of a document based on 2D computer graphic techniques (vector-based), can be much smaller than the corresponding digital image – often by a factor of 1/1000 or more. This representation is also more flexible since it can be rendered at different resolutions to suit specific output devices. 2D computer graphics started with vector-based graphic devices. In the following decades, bitmap-based devices largely supplanted these.
This section of the tutorial is provided as is from the original Digipen tutorial, I will post a supplement to this post later which will cover the updates for XNA as well as for new features in .NET 3.5 and .NET 4 together with Visual Studio 2008 and 2010 respectively.
Structs are similar to classes in that they represent data structures that can contain data members and function members. Unlike classes, structs are value types and do not require heap allocation. A variable of a struct type directly contains the data of the struct, whereas a variable of a class type contains a reference to the data, the latter known as an object.
An array is a data structure. It contains a number of variables, which are accessed through computed indices. Also called the elements of the array, the variables contained in an array are all of the same type, which is called the element type of the array.
A class is a data structure. It may contain data, functions, and nested types. Data members include constants and fields. Function members include methods, operators, events, properties, indexers, instance constructors, destructors and static constructors. A class supports inheritance, which is a mechanism that allows a derived class to extend and specialize a base class.
Flow control is an essential part of any programming language, it allows us to make decisions and change the direction our program takes.
The definition of a function includes the return type, the function name, the parameters' list, and the function body.
This section is mainly for reference, you will refer to this quite regularly in the beginning.