Getting started with SFML 2.0 and C++

Hi guys , in this article my purpose is to show you what you can do with a library like SFML , of course out there are a lot of other libraries. But I chose to make this article about SFML ( Simple and Fast Multimedia Library ) , because is one of my favorite , is very simple to use and you can understand it even if you are not an advanced programmer.

First of all, what is a library?

– Well, a library is a collection of classes , interfaces , functions and other stuff that helps you ( in this case ) : to open a window , draw a rectangle there or any kind of geometric figure that you want , you can move that rectangle , you can draw a circle and then make them dance , and a lot of other crazy things.
The best thing of all , is that you don’t need to know how that rectangle is drawn , you don’t need to know all the logical stuff that is behind . Of course if you like it , you can learn all that “core” things .But today, we will limit ourselves to the simple things.

As you can see is a very simple job to open and close a window. Maybe only that “event” is a little confusing . I will try to explain it , an event is like a trigger, when an “event” condition is true we do something . In this case when we press ESC we want to close the window , same when we press Close. Let’s move to the next example.