Hello and welcome to my set of zelda-game-development tutorials. Hopefully in the next tutorials I will teach you how to create a basic zelda game in C# that is extensible enough for you to be able to use it, and the knowledge you have learned, to produce your own zelda games or similar RPG type games.
So how are we going to start this project? Well the first thing we must do before we can even begin programming is set up the IDE (Integrated Development Environment) we will be using to develop this game. For these tutorials I will be usings the free Visual Studio 2008 (C# Express edition). If you don't already have it installed you can download it from the following url;
http://www.microsoft.com/express/download/You also need to make sure you have the .NET framework, preferably version 3.5 which is used to compile all these tutorials (though you may get a way with lower version for some of them).
Once you've installed that we first need to define our game tree, this is just a term for the structure of folders in which we will keep the source and assets for our game project within. I've chosen to do it in the following structure;
This structure will most likly be extended later on in the project but it currently stores all that we need for a while. So once you've created your folder like that its time to boot up the IDE we are using. Once you've done that click on the File->New Project menu, select an Empty Project and call it Zelda, set the directory to the Source folder in the game tree we just made and uncheck 'Create directory for solution', then click OK.
This will create your project and store all the source and configuration files with the Source folder in our game tree. After its done this you will be confronted with an empty IDE, which looks more or less the same as it did before you created the project, the main difference is the list box on the right which shows the current source tree for our game. This is called the solution explorer.
As you can see the source tree is empty, so we will need to create some files so we can actually begin programming, but before we do that we need to set the project settings so the resulting exe is created in the way we want. To change the project settings simply right-click on the item in the solution explorer that says 'Zelda' (this is our project item) and select 'Properties'. This will result in a window similar to the following appearing.
For the moment the only settings we care about are the following;
- Application->Output Type: This specifys what form of executable this project should be compiled to, for this project we obviously want an exe so people can run it. As such set it to 'Windows Application'.
- Build->Output Path: We want to set this so that our executable will be produced in the Bin folder of our game tree. To do this just set this to '..\..\Bin'. Be aware that you will have to set this for both the debug build and release build configurations (you can switch between these using the combo box above the settings called 'Configuration').
Done that? Good. There is just one last thing to setup before we can start writing our game. What we need to do is add a file called 'Zelda Runtime.dll' to the project, this is just a library file full of code that I wrote to help you preform certain tasks in the game. I've written this dll for you so that you don't have to worry about a lot of the low-level coding(like writing a graphics renderers) and can instead concentrate on creating a zelda game. To add this file to the project first download it from the following link and place it in the Bin folder in our game tree;
http://www.zfgc.com/infinitus/tutorials/001/Zelda Runtime.dllOnce you've done that right click on our project in the solution explorer and click 'Add Reference', go to the browse tab and select the 'Zelda Runtime.dll' file you just downloaded and click OK. This will allow us to access the code in this dll file from within our project.
Now just one last thing to do, we need to add references to some of the system files as well so we can use them. Just open the add reference window again but this time select the .NET tab and then select and add the following items (also known as assemblies);
- System
- System.Data
- System.Core
- System.Drawing
- System.XML
- System.Windows.Forms
Done that? Congratulations you've got the boring part out of the way and set up the IDE ready for some programming. Check out the next tutorial for some actual programming (bet your waiting for that
).
Wrapper LicenseYou are free to use the wrapper in whatever form you choose, there are no restrictions on how you choose to use it. If you require the source that can also be provided, just post me a message and I'll post it.
Completed Source Code: http://www.zfgc.com/infinitus/tutorials/001/complete.zip