Hello everybody, welcome to my new tutorial series which is all about SFML. In this first episode I'm going to explain to you how to install SFML. But first, why do we need SFML? SFML is a library that we use to draw things onto the screen. SFML makes it really easy for us, which we know for sure because the name is simple, fast, multimedia library. And by the way, it's cross-platform. I'm not going to show you how to install the provisional studio. First things first, we need to download it. Why can we download it? Well, we can simply go to Google and type it in as a thumbnail. Then we're going to go to the website, which is SFML-Death. Then we're going to go to download as a thumbnail 2.4.0. And then you're going to look for your compiler. I'm personally using Visual Studio 2015, which is Visual C++14. You know, it's 2015 version because it says 2015. And now comes a little bit complicated part. If you start a little bit, download and the 64 bit download, which one should you get? Well, I recommend that you get a 32 bit one. Since it's not about what your system is, it's about what you want to make the program for. So if you make it for 32 bit systems, you're going to reach more people. So we just say download, go download it for us. Then if we open it, you will see that it contains a folder. And in the folder of all these different things, we don't have to worry about most of them. In fact, we can actually delete a few of them, which we're going to do later. The only ones who I really care about has been include and live. These three need to be there otherwise we can't make things with us. So now the installation part, the first thing that we need to do is go to Visual Studio. Now to our official studio, we need to go to file. New project. And then create a new Winister into a console application, which you're going to call as a familiar tutorial. Then we just need to step through the installation wizard, select an empty project, because otherwise you're going to have to weird header. Okay, now that our project is created, it's time to go to the folder in which our project is located. An easy way to do that is by pressing right button on the project name and then click on Open File to folder. This will bring you to the root directory of the project. But what we want to be is inside of the solution itself. So we can simply go and follow up and now we're in a solution. Now we're going to go back to the asset from a download that we just did. And then copy, bin, include and live. Then we're going to make a new folder here. Co-ess of the map. And in here, we're just going to paste those three things. Okay, what we know want to do is go back to Visual Studio and right mouse, click on the project. Then we need to go to properties. And now we get this window. What do we need to do in here? The first thing that we need to do is click on the configuration thing and then go to all configurations. Because otherwise we're only going to modify things for whatever was selected to a debug or release. But we want to do it for all the configurations to both for debug and release. The next thing that we need to do is go to linker. Now what we want to do is go into a traditional library directories. Press the error down, hit edit and then double click on here. And then this little bar will open up. What we're going to do right now is press the triple dots right there. That will open a file explorer. And then what we want to do is when we go to folder, we just create it with SFML. And then click on the lip folder and then simply hit select folder and okay. And then apply that. The next thing that we want to do is we're going to go to input. And in input, you're going to have this additional dependency thing. What we want to do is we want to open it and hit edit. Don't want to type directly into that bar because all those different things are necessary for creating a project. We want to modify some things in here. For SFML, we need to include five different libraries. And they all have the same prefix and they all have the same end. So we're just going to type that first and then fill them in later. So what we're going to type in is SFML-.lib. And now we're just going to copy this and paste it five times on new lines. After we've done that, we need to specify the different things that we need to link to. The first thing that we need to link to is called system. The second thing is going to be graphics. The third thing is going to be audio. The fourth thing is going to be network. And the last thing is going to be window. Then we simply hit OK and press apply. Well, the one thing that we need to change is if we go to the SFML homepage, go to learn. And the jiktice tutorial that they made for your studio, then you will see if you scroll all the way down. It's such that you have to link it differently for debug mode. And you'll see right here, it's important to link the libraries that match the configuration. SFML-xxx.d.lib. For debug and SFML-xxx.lib for release. So what we need to do in here is now switch the debug mode, hit edit and then simply add a dash D after all of them. After you've done that, it's time to hit apply and it OK. There's one more thing that we need to do. But before we can do that, we need to add some code. So we're just going to go to source files, add new item. The cp files are main files. Not only the main files created, it's time to go back to the properties. And what you will see is that an extra tab has appeared called c-c++. If you click on that, you will see that the first thing will say additional include directories. If you go back to SFML folder that we have created, you will see that there's also a folder called include. What we need to do is we need to link to that folder too. Just the same way that we did to the lib folder. So we're going to enter arrow, edit, double click on it, open it with triple dots, go to the correct folder and select include. And then apply. But make sure that you do for both debug and release. I just forgot to switch to all configurations and that's really unhandy because now I haven't done it for release. So now I need to go specifically to release and do it again. Okay, then I've also known for release. It's time to actually test it out with type in some code. The first thing that we need to do is actually include SFML. But the way we do that is just simply type in pound include the smaller and bigger than SFML. As you'll see a folder will appear. This folder corresponds to the folder inside of include folder. So this is a female folder. Everything gets in here. We can include using the smaller than a bigger than. So we type in SFML slash graphics that HPP, which is basically the same as a header file, but just another different name. And then we want to create a main loop into main return zero. In this tutorial, I'm not going to explain to you what all the code does. I'm just going to show you how to quickly test if it's working. And the way we're going to do that is we go to the SFML site, back to the tutorial and then all the way down here. We have created this little example. So we're just going to copy all the code in here and paste it. And now if you run a program, you will see that an error has appeared. It says to program grand start because SFML dash system, dash D, dash two, the deal is missing. That's because SFML needs a few more things before it can run. But those things need to be in the folder, whether that EXC is, if you go back to SFML folder that we've created, you will see there is also a folder called bin. If we open bin, in here we're all with different URLs that I wasn't planning about. So what we simply do is we're going to select everything with a D since we're making a deep version right now and open all 32. And then you simply copy it and paste it in a debug folder. Now if we run it again, we'll see that a tiny window appeared. In this window, if SFMLs installed correctly will show a green circle. Tonight you know that this is from us working. It's time to actually get into the code. And it will do that in the next episode. So be prepared.