Finally here! A Tutorial! In this tutorial series, I will take you through the process of making your own game engine, which should be able to do all awesome stuff all awesome game engines out there can do. Eventually, we might also create tiny "test games" in between and throughout the course in order to test out the features in there as we implement them.
Let's first talk about the process we will be following. A small note here- this tutorial is going to be extremely detailed and involve some very low level stuff which we will implement ourselves, so you might want to consider that, as some parts of this series won't be for everybody. I will post workarounds and cover how to make use of third party libraries to your advantage where you wouldn't want to do things yourself, but the primary focus of this tutorial series would be to build everything from scratch (more or less). This also means you will require a working knowledge of how to program (specifically in C++). If you haven't already, I suggest going through a C++ tutorial somewhere on-line before moving forward, as that's something I won't cover here.
Requirements
That being out of the way, lets dive straight in. There are a few tools you will require immediately, and on this post, we will go through how you can acquire them. All tools I used can be downloaded from the internet for free, and you won't have to pay even a penny (apart from the constant amount of electricity and internet charges... :P).
The IDE
IDE stands for an Integrated Development Environment. I know nearly all of you reading this already know that, but for those who don't, its a software package that provides you with all the coding tools required throughout the time of developing software all at one place, so that you can simply open it up, write the code and hit a few buttons to compile, run, debug, profile and so one. instead of doing everything manually ( writing code in notepad, using the command-line to use the compiler in order to compile, then debugging manually using some separate command line tool...).
The one we are going to use would be Microsoft's Visual Studio. Its quite a large download, but very much worth it. In case you want to use some other IDE, you can really, as that's not really a big part of the problem, but just make sure your compiler supports C++11. Getting Visual Studio will make following this tutorial a bit easier, though.
But for those who want to get along with Visual Studio can download a free 'community' version meant for independent developers for free. Click the image bellow to go to the download page:
After downloading the installer, run it. Follow the instructions on screen, and wait for it to download and install. It does take some time though, so until then, go watch some videos on YouTube.
When It is completed, you can go forward and test things out. Open Visual Studio, and click on the "New Project" link on the start page. Lets create a hello world program to see if the IDE works.
The new project dialogue box pops up. Select Empty Project, enter "Hello World" in the name field and press OK.
You should be then greeted with a more or less blank screen. To the left of the screen is the solution explorer:
Those folder like things are called filters. They come in handy when you want to organize your code and when you have a huge number of files. What we want to do now is create a new source file.
Right-click on the filter that says "Source Files". Click on Add > New Item and select "C++ File (.cpp)" and press "add". It will automatically add the new file and open it up for you. You are now ready to write code!
Write a simple Hello world Program to test things out:
#include <iostream>using namespace std; int main( ) { cout << "Hello World!\n"; system ( "pause" ); return 0; }
You then click the "Windows Local Debugger" button ( which has a green arrow on it) to compile and run the program in the debugger.
And there you have. If everything worked just nice, you see what you ought to see.
Off we go!
Source Control
Computers are fragile machines. Sometimes they are even stupid. Sometimes they might even make you go crazy and make you kick them with anger. Yes, no denying the fact. Then they even catch fire. We don't really want our hard work to be gone down the drain or up in ashes when something like that happens. Also, we as humans tend to make mistakes. sometimes huge. With computers, mistakes can be undone really quickly. To make it easier to manage the source code we write, we will use source control, so that our work is safe from all disasters.
At this point you might want to create a GitHub account as I will be posting all the source code up there as well. Go on, its easy. We will cover how to set up the source control inside visual studio in the next tutorial post where we set up the project, but for now, you just need to make an account on GitHub, and download Git Bash.
That's all you will need to get started. Have a nice day!
dude the code looks familiar somehow .....
ReplyDeleteThis comment has been removed by the author.
Delete