Questions and Answers

31.05.2011 5 comments

As with my old blog, I notice that many people find this site via various searches relating to particular tasks in SFML. A lot of these things are not covered here, so feel free to post your questions on the Q & A Page.

 Go the Q & A page now

Categories: Notice Tags: ,

SFML camelCase

Just a quick heads up. SFML has undergone some name changes. Class members are now named in camelCase. This just means that the first word of each member’s name is no longer capitalised. For example


has become


If with new versions of SFML, you’ve been getting lots of errors like

XXX is not a member of class YYY

then this is probably why! I know it might be a pain to refactor all your code, but unfortunately if you want to keep up to date with SFML (and you should :P) then you have no choice.

Categories: Notice, SFML Tags: , , , ,

SFML 2.0 Release Candidate

Hi all! Sorry then new posts still haven’t come through. I am working on it, but things are still very very hectic. Anyway, some good news in the mean time! SFML 2.0 Release Candidate is out! So it’s just going through a last phase of testing and minor changes before release. That means two main things for us:

  • prebuilt binaries on the official site (I think I’ll still provide them until the final release is out)
  • few (if any) public interface changes, so no more problems with tutorials becoming outdated due to new function names, etc.

If you want to try it, head over to the SFML downloads page and get it right away.

More Restructuring

09.04.2012 12 comments

Okay, a quick update on the site’s pending rearrangement.  Firstly, tutorials are in fact going to stay as posts, not pages. I decided I didn’t want a static front page, but I don’t want general “blog” content on the front page either, so thing’s will have to stay as they are. Secondly, I’m finding more and more as I write tutorials that I have to bother going into detail about which software to install and so on and so forth. This is not only time consuming for me, but also probably annoying for the majority of you who have the software already. But I have a solution: I’m going to write a few new posts about setting up “development environments” on Windows and Unix. Then, when I do a tutorial, I’ll just assume you’ve done all the setup in the other post. In fact, I’m thinking I might more generally put a little “prerequisites” and “recommended reading” section at the top of each tutorial. That way, we can focus on the new stuff, but all the background material is easily available to those who need it.

Summary of Content

Naturally there’ll be one for Windows and one for Linux/Unix, each with various subsections. Now, I don’t want to spend too long writing these setup tutorials, but I do want to keep everyone happy ;) So here’s a quick list of what I’ll cover in each one – lot me know if there’s anything you really want added!


  • Visual C++
  • MinGW
  • Code::Blocks
  • MSYS


  • GCC
  • Code::Blocks
  • Text editor (e.g. vim)


  • CMake
  • Doxygen
  • Git
  • Subversion

These last few will be covered in both tutorials, although the specifics will be a little different of course.

Poised to Overclock

Right. Unfortunately I just haven’t had the time to write any posts about building Boost today… The computer’s been out of action all day so far as I’ve been replacing my broken motherboard and installing my after market heatsink and fan, which I I mentioned a few days back. So instead, I’ll just share a few words about that and Boost can wait until tomorrow.

I can certainly say that the fan is really, really quiet, and temperatures appear to be lower than with the stock cooler (I say stock – it certainly looks like Intel’s socket 775 stock cooler, but the fan has an Akasa sticker…). I haven’t had a chance to do any temperature readings under stress yet, so we’ll see how things go. When I have a chance I’ll be trying a little light overclocking too so I’ll let you know how that goes… I’m hoping to get my 2.83Ghz CPU up to a stable 3.4, but I haven’t overclocked before so I don’t know if that’s realistic with my relatively cheap cooler.

At present, I am just reinstalling all my Windows software. I’m hoping to have a minute to play around with ASUS Express Gate, since it appears not to be working out of the box… And then? Well it’s coming up to midnight local time and yet I’m still hoping to not only reinstall Linux Mint, but also successfully install Gentoo (which involves compiling my own kernel :x). Still, I’ll see how things go, and I’ll try to sleep a little bit before my early start tomorrow…

All About Boost

Given the hint I dropped yesterday about game data files, you may be wondering what lead to the  change in subject of today’s post. Well I’ll first reassure you that data files will come up in a day or to. I shan’t tell you what serialization library we’ll be using just yet, but given the title of the present post, I’m sure you can make an informed guess ;)

Regardless, we’ll be using the Boost libraries a fair bit anyway, so I thought I should take a second to make sure you know exactly what they are. I did post about them once before, but it was really just a brief mention. But Boost offers us so much extra – and often highly desirable – functionality that I felt it deserved a slightly longer introduction.

So, I’m sure by now you’ve worked out that by “Boost”, I refer to the Boost C++ Libraries. These 80 or so libraries, united under the Boost “flag”, are open source and peer reviewed. They are generally licensed under the Boost Software Licence, which allows for both commercial and non commercial use, in open source and closed source projects. Moreover, several prominent Boost authors are on the C++ standards committee and indeed many features of the Boost libraries have made it into the C++11 standard. While smart pointers may be new to standard C++, they’ve been in Boost for years. The same is true of lambda functions, threads, and more. (Of course, you should choose the standard C++ versions over the Boost versions now whenever possible.)

You probably want to know a few things you can do with Boost… Well, I’ll not say much for now. But here are a few of my favourite libraries

If you want to see a complete list of Boost libraries, just visit the Boost libraries page. Many are entirely header based, meaning you don’t have to compile any binaries. A few, however, involve source code as well so you’ll need to compile them into static or dynamic libraries. And to the “compile shy” ones among you, don’t think you can’t just skip it. Some of the most useful Boost libraries of all require compilation, and you’ll need them eventually. But don’t worry. It’s really not that hard, and over the next few days I’ll show both Windows and Unix users how.

Oh, and one other thing. I’m thinking of having a “Boost Week” in a bit. I’ll tell you about a library a day. I already have a few favourites I want to share with you, but if you want to know about any particular Boost library component, then just let me know in the comments! :)


I’ve decided it’d be good to write a few very simple – but complete – games to show you. The first and simplest is essentially noughts and crosses, though I’ve gone ahead and called it ArrayWars. (If you’re wondering, my reasoning is that noughts and crosses is basically just a little struggle over an array of 9 squares…)

Anyway, the actual game is clearly quite simple here. However, I’m going to try and illustrate a couple of useful techniques that would be useful in a more general and more advanced setting. For example, it’s going to have customizable settings, as well as player stats. Both of these need to be saved and loaded from a file (I’ve found a library which makes this really simple, but more about that tomorrow…) Naturally, there’ll be a main menu, plus sub menus for the settings, the stats, creating a game and so on. This means we’ll need simple GUI elements: primarily buttons and text boxes.

Under the hood, there’ll also be application logging (for bugtesting and diagnostic purposes) and if I find the time I might make a simple in game console. If you’re interested, the code is already in a repository on GitHub. And, needless to say, the sound, windowing, graphics and input will all be handled by SFML!


Hi all! I’m currently enjoying my Easter break so – although there’s still a lot of work to do – I am more free than I have been for a while. Now, I would have liked to be uploading videos by now, but unfortunately that won’t be possible. Due to an annoying problem with my motherboard (it won’t detect the graphics card), I’m stuck with the awful integrated chip. Consequently, everything’s running really slowly. I certainly don’t want to try screen capture or 3D graphics (that’s right, I’m finally going to give my videos an intro sequence!).

Anyway, the replacement motherboard has arrived, as has my new budget CPU cooler, but I’m still waiting on the Arctic Silver thermal paste and solvents from Amazon… Don’t judge my choice of mainboard, by the way. I didn’t want to let my socket 775 Core 2 Quad (4  x 2.83Ghz stock) go just yet, so I had little choice. I got it really cheap, so it hardly matters anyway. But I digress… the upshot is, it’ll only be a few more days’ delay, hopefully.

In the mean time, I’ve decided the site needs a little overhaul. I think tutorials should be put up as pages not posts, so they don’t get lost behind random links and stuff that I post. So I’ll have a play around with settings and see what works. (I also realised recently that the menus at the top of the site no longer work because of the search box – I’ll see to that as well…)

From now on, the only things I’ll put in posts will be items which really class as “blog” material. Short tips, tech news, pointers to cool websites and videos, and so on. But obviously you do want to keep up with tutorials here at SFMLCoder too so when I release a new tutorial, I’ll make a post as well, but it’ll just provide a summary and link to the full tutorial. Yet another reason to subscribe by email – you’ll get tutorial summaries straight to your inbox!


Get every new post delivered to your Inbox.

Join 77 other followers