|
|
|
XNA is pretty much the same thing as DirectX but make game programming MUCH MUCH easier. Here are some tutorials on XNA. Hope these help.
|
|
ID
|
Title
|
Title/Description
|
|
1
|
Riemers.net
|
These are really, REALLY good lessons on XNA for the very beginner. I'd start here.
|
|
|
|
|
|
"This part of the site shows you how easy it is to get a XNA program up and running!. This tutorial is aimed at people who haven't done any 3D programming so far and would like to see some results in the shortest possible time."
|
|
|
3
|
The effect file
|
One of the main differences between DirectX 9 and in XNA we need an effect for everything we draw. So what exactly is an effect?
|
|
4
|
The first triangle
|
This chapter will cover the basics of drawing. First a few things you should know about.
|
|
5
|
World space
|
Last chapter we drew a triangle, using 'pretransformed' coordinates. These coordinates allow you to directly specify their position on the screen. However, you will usually use the untransformed coordinates, the so called World space coordinates, which we specify in 3D coordinates.
|
|
6
|
Rotation - translation
|
This chapter we;ll make our triangle spin around. Since we are using world space coordinates, this is very easy to do.
|
|
7
|
Indices
|
The triangle was nice, but what about a lot of triangles? We would need to specify 3 vertices for each triangle. Consider next example:
|
|
8
|
Terrain basics
|
At last, we've seen enough topics to start creating our terrain. Let’s start small, by connecting 4x3 specified points.
|
|
9
|
Terrain from file
|
It's time to finally create a nice looking landscape. Instead of manually entering the data into our heightData array, we are going to fill it from a file.
|
|
10
|
Keyboard
|
Using XNA, it is very easy to read in the current state of your keyboard.
|
|
11
|
Adding colors
|
You might already have a rotating terrain, but it definitely would be better looking filled with some colors instead of just plain white lines.
|
|
12
|
Lighting basics
|
Even when using colors and a Z buffer, your terrain seems to miss some depth detail when you turn on the Solid FillMode. By adding some lighting, it will look much better.
|
|
13
|
Terrain lighting
|
We’ll be adding normal data to all vertices of our terrain, so our graphics card can perform some lighting calculations on it. As seen in the previous chapter, we will need to add a normal to each of our vertices.
|
|
14
|
VertexBuffer & IndexBuffer
|
Your terrain is fully working, Each frame again, all vertices and indices are being sent over to our graphics card. This means each frame we are sending over exactly the same data. Obviously, this should be optimized.
|
|
2
|
Series 2: Flightsim
|
This is the second series of riemers.net's XNA tutorials. You will learn how to create a cool Flightsim.
|
|
|
|
|
|
"Welcome to this second series of XNA for C# Tutorials! In the first series, you learned some basic features of XNA. This list of features will be further expanded in this series, so after completing this series you'll have created your own 3D game!!"
|
|
|
|
|
|
|
"Hi there! Glad you made it to this second series of XNA Tutorials. We’re going to cover some new XNA features, put them together into one project, and end up with a real flight simulator! Again, the main goal is to show you some principles of XNA, so don’t expect complete realistic flight physics, such as gravity, coriolis and others."
|
|
|
|
|
|
|
"Up till now, the only way you’ve seen to add some color to our scene is to declare separate vertices for every different color."
|
|
|
|
|
|
|
"Now we’ve seen how we can import simple images into our XNA project and have XNA display them on triangles, it’s not that difficult to create a large amount of images. It’s more important to find a way to get the computer to define all of the vertices for us."
|
|
|
|
|
|
|
"To be honest, there is not much new XNA stuff you’ll learn in this chapter: the code of last chapter will be expanded, so you’ll also draw buildings on your floorplan, and then again roofs on your buildings. For this reason, I’ll summarize the adjustments and additions."
|
|
|
|
|
|
|
"The city is nice, but how are we supposed to draw an airplane in our scene? Would we have to program every single vertex of this object? Luckily, we can load models that were saved in a file."
|
|
|
|
|
|
|
"This will be a pretty short chapter, as we’ve seen the basics about lighting in the first Series."
|
|
|
|
|
|
|
"Imagine our xwing would be flying through our scene. We would like our camera to always follow our xwing, so the camera would always positioned behind the xwing, no matter which rotation of translation our xwing has."
|
|
|
|
|
|
|
"Now we have our camera centered on the xwing, it’s time to make our xwing fly. Of course, this will be done through the Update method. Let’s first have a look at how the angles of our airplane are defined (Z is pointing upward, toward the viewer):"
|
|
|
|
|
|
|
"As you have probably already guessed, this chapter we’re going to detect when our plane has collided with an element of the scene – this far, our 3D city."
|
|
|
|
|
|
|
"With our scene set up and our airplane flying through it, it’s time to add some targets. In this example, we’ll be using simple spheres. Once again, we will load this model from a file."
|
|
|
|
|
|
|
"This chapter we’ll be adding bullets to our game. For these bullets, we could use real 3D spheres, but this will ask a lot from our graphics card. Instead, we’ll be using a very simple 2D image of a fireball"
|
|
|
|
|
|
|
"As a difficult audience, the result of last chapter probably didn’t fully please you. My guess is the black borders around our fireballs didn’t seem too normal to you. And you’re completely right, the borders should be blended with whatever is behind them. Welcome to this chapter on alpha blending."
|
|
|
|
|
|
|
"This chapter, we’ll do something about the solid background color surrounding our city. Using the methods we’ve created thus far, we could expect this to be quite easy, as a skybox is nothing more than a mesh. Only this time, we need to load some texture files to accompany the mesh."
|
|
|