These tutorial videos were hosted before on MSDN and Coding4Fun, but since their video links do not work anymore, I host them here too.
This is just to make sure the internet users can find these videos somewhere :)
Note that the MSDN article is still online (but it has changed the address several times), just the video links to not work anymore.
NOTE: All the following text is from 2005, some links or information might be outdated!
- Original RocketCommander (RocketCommanderV1.1.exe, 10MB)
- Xna RocketCommander (RocketCommanderXnaSetup.exe, 16MB)
- Canyon Commander Mod for RocketCommander (CanyonCommanderUpdate.exe, 2.8MB)
- Flower Commander Mod for RocketCommander (FlowerCommanderUpdate.exe, 1.8MB)
- Fruit Commander Mod for RocketCommander (FruitCommanderUpdate.exe, 7.8MB)
- Fussball Commander Mod for RocketCommander (FussballCommanderUpdate.exe, 1MB)
- Virus Commander Mod for RocketCommander (VirusCommanderUpdate.exe, 6.8MB)
- Pizza Commander Demo (PizzaCommanderDemoSetup.exe, 26MB)
- Xna RocketCommander (RocketRacerEnglishDemoSetup.exe, 21MB)
- 3D Model Viewer for RocketCommander (RCModelViewerUpdate.exe, 86kB)
Welcome to the Tutorials of Rocket Commander. You will learn step by step in ten 30 minute video tutorials how to develop a game like Rocket Commander. This can be your introduction into the world of game development. If you just want to play a bit, check out www.RocketCommander.com and download the game there (10 MB).
You can also take a quick look at the SourceCode (which is freely available like the game) or get an overview about the project by looking at the Class Overview. There are around 20 000 lines of code and maybe 50 classes. Sounds like a big project, doesn't it? But we will take a look at the most important classes and even learn in Tutorial 4 how to write our own graphic engine in less than 30 minutes. If you decide to take a deeper look at the source code after watching the tutorials, it will hopefully help you out understanding a lot of the game mechanics because the source code is heavily commented as it should be in professional projects. If you have more questions, want help or meet with other guys starting in game development you can check out the forum at exDream.com.
This tutorial is targeted to people, who already know how to program in c# and have basic knowledge of Managed DirectX. If you are not experienced with .NET and programming languages like c# or VB.NET please start with more basic tutorials and webcasts first and return to this one later. If you are looking for Managed DirectX tutorials, start with the ones in the DirectX SDK and check out the many free tutorials available in the internet, Coding4Fun
is a good starting point. If you want more links check out the Links, webcasts and Tutorials
This tutorial tries to give you more pratical view on coding and games than many other tutorials, which only show you a couple of tricks in 100-1000 lines of code. You can write down this amount of code without many comments and it can still be followed. But in bigger projects you need much more documentation, comments and planing. If you reach 20 000 lines of code (or 100 000 - 500 000 lines in bigger projects) you need more structure, a clean programming style and a constant amount of refactoring. So what is refactoring? You will learn about it along with Unit Testing in the first 2 tutorials. Refactoring lets you restructure and rewrite your code without changing the functionality to improve maintainability and your coding style, sometimes to improve performance too.
There are many open source projects (even games), but most of these projects lack good documentation, have enough comments in the code and often there are no tutorials for them. Sadly many of these projects are canceled or are not continued anymore. It can be interessting to look at open source projects, but for beginners this is often very confusing and not helpful. This tutorials tries to fit in between and will give you both a big project with source code and hopefully an easy way in.
Okay, lets go. The following steps are also explained in detail in the first video tutorial
. If you have any difficulties watch it and follow it step by step.
First of all we need Visual Studio 2005! If you don't have Visual Studio 2005 right now and don't have any money to buy the standard or professional (or if you are crazy rich the Team System version ^^), there is also a free version: Visual Studio 2005 c# Express. It is not as powerful and you can't use any addins, but it is good enough for our game. You can also use any other version or IDE that supports .NET 2.0. You can freely download Visual Studio 2005 c# Express here.
First of all, start with installing Visual Studio 2005. If you already have it installed, skip this step.
You should also install the MSDN help. If you don't do this you can still access the help online, but this makes searches take a much longer time.
Next you need the DirectX SDK, which you can directly download from the Microsoft DirectX page: Microsoft DirectX Developer Center
When installing it you should select installing the Redistributable in the custom setup step too. You will need it if you want to install your game on other computers. When DirectX is installed you can check out the newest features by taking a look at the samples with the DirectX Sample Browser. If you haven't worked much with Managed DirectX before check out the documentation and tutorials.
Last but not least we need NUnit, which you can get from www.nunit.org.
You may ask why do I need NUnit? Well, Rocket Commander is based on Unit Tests and uses the Agile Methology. In the first 2 tutorials I will go into details what this is all about and give you some examples.
Warum eigentlich? Rocket Commander ist auf Unit Tests aufgebaut und benutzt die Agile Methology. You will learn more about this in the first couple of tutorials. In short this means that we don't fully design everything in advance and do incorrect planning because we can't know better when inventing new stuff. Instead we do still a short concept (see Tutorial 2), but we adjust it dynamically as we go along. Unit Tests in our code allow us to make sure everything still runs as expected even if we have to make drastic changes in design. A lot of mini-test-programs inside the code allow us to constantly check features and play around with our engine.
If you are using Visual Studio 2005 Team System you can also use the Unit Testing features implemented directly in VS there. Alternatively there are also other Unit Testing Frameworks around (e.g. MbUnit, csUnit, etc.) and for Visual Studio 2005 Standard and above you can also use TestDriven.NET (a plugin to start Unit Tests from your IDE). For this tutorials we will try to keep things simple and only use very basic features of NUnit.
This is the project overview, it may be a little bit confusing when looking at it for the first time, but later this graphic will help us out understanding the classes and game engine. The program starts with the Program class (upper left) and this is where we start with Tutorial 1 too. The class overview and the Graphic Engine are explained in the following tutorials. You could say that any class that display anything on the screen is derived from IGraphicObject. For the first couple of tutorials we are happy with just the Texture and Model classes. We can do quite a lot with DirectX, but abstracting it a little bit more give us the advantage not having to write the same code over and over again. This is very important for our graphic engine.
The second tutorial does also explain the concept of the game. Our understanding of the classes is not very advanced right now, but we take a step back and think about the game itself. In the 3. tutorial we take a look at the helper classes (click on ClassOverview, they are on the right side). In the 4. tutorial we will write our own graphic engine in less than 30 minutes. This will help you understanding the graphic engine a lot faster. In the following tutorials we then go into each part of the game until we have the full game together in the last tutorial and are ready to write our own modification.
|9. Input+Interface: In this tutorial we will learn how to use the DirectInput classes and how Rocket Commander manages all Keyboard and Mouse input with help of several helper classes. Then we take a quick look at the Menu and User Interface classes in the game. This is usually a lot of work and can’t be done in 30 Minutes, but we will see again that using some helper classes will greatly improve our productivity. Also reuse code as much as possible, this does not only make the coding easier, but also gives a more consistent look and feel to the final product. We take a look at the graphics created by the artists and see how we can manipulate and exchange (often called skinning) them, which is important for our next tutorial.
Video Tutorial 9
: Game consists now of: Input, Interface, Game logic, Helpers, Music, Sound, Graphics: Shaders, ParallaxMapping, TangentVertex helper classes, Instancing, Post Screen Shaders, Models, Fonts, Materials, Textures, Lens Flare effects.
More tutorials might be done at a later point in time. Tutorial 10 mentions a couple of interessting topics: More extensibilities, physics, game screens, manager classes, space camera, player and multiplayer capabilities, etc.
If you are searching for more .NET or DirectX websites or tutorials, check out the following links:
I work at exDream entertainment (the creators of "Arena Wars", the first commertial .NET game).
Currently I'm working on "Armies of Steel", a new innovative Real Time Strategy game.
My Blog: http://abi.exDream.com