Skip to content

Riemers3DXNA1Terrainoverview

Simon (darkside) Jackson edited this page Aug 25, 2020 · 7 revisions

XNA Tutorial for C# overview – Series 1

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. To this end, XNA is an ideal programming environment. Using C# as programming language, the code looks very much like Java, so anyone having some notions of Java should be able to start right away. Even more, this tutorial is written in such a way that anyone who has any programming experience should be able to understand and complete it! Here’s a screenshot of the final chapter of Series 1:

This first series of XNA tutorial gives you a general introduction to XNA. It is divided in several chapters, which you can find listed below. In every chapter you’ll learn a basic XNA feature:

  • Starting a project: setting up and using the Development Environment
  • The effect file: effects are needed to draw stuff on the screen
  • The first triangle: defining points, displaying them using XNA
  • World space: defining points in 3D space, defining camera position
  • Rotation & translation: rotating and moving the scene
  • Indices: removing redundant vertex information to decrease AGP/PCIX bandwidth
  • Terrain basics: bringing altitude into our program
  • Terrain from file: create a terrain from an image file
  • Keyboard: read user input on the keyboard using XNA
  • Adding colors: add simple color to you terrain
  • Lighting basics: lighting can be complex to fully understand, a whole chapter on this subject
  • Terrain lighting: making use of what we learned in the previous chapter to enable lighting over our terrain

During this series you will need to download the following resources: The effect file: effects.fx Terrain from file: heightmap.bmp

Chapters

  1. Starting your MonoGame 4.0 Project
  2. The effect file
  3. Drawing your first Triangle
  4. World Space coordinates and the camera
  5. Rotations and translations
  6. Recycling vertices using inidices
  7. Terrain creation basics
  8. Terrain creation from file
  9. Rotate your terrain using the keyboard
  10. Adding some color and the Z-Buffer
  11. Experimenting with Lights in XNA
  12. Adding normals to our Terrain – Intuitive approach
  13. Improving performance by using VertexBuffers and IndexBuffers
Clone this wiki locally