Archive

Archive for the ‘News’ Category

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.

ArrayWars

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!

Plans

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!

Automatic SFML 2.0 Build – Unix

As you know, I’ve been providing prebuilt SFML 2.0 binaries for Windows (both MinGW and MSVC) for a while now (new ones will be out soon, by the way…)

I don’t really want to provide prebuilt binaries on Unix right now, but instead I’ve written a little script which will build them for you. All you do is run the script. Then it goes ahead and downloads the source, runs CMake and then builds and installs the binaries, header files, examples and documentation. You can go ahead and download the script, but read on a bit so you know what you’re doing. And of course, if you don’t trust me, you can always read through the script yourself :)

I’m sure it’s not very robust at the moment, so let me know if you have any issues with it. I’ll try to fix them as soon as possible. If you do come up against problems, you can probably just delete the directory it created and run it again. Oh, and you can run it a second time to check for source code updates and recompile.

Anyway, all you have to do is download the script, put it in the desired directory, e.g. ~/Development,  make it executable and run it (probably with no options, but see below for details).

chmod +x InstallSFML.sh
./InstallSFML.sh

Warning: If you install SFML to the default location of /usr/local, it will override any older versions (e.g. SFML 1.6) already installed in /usr. If you wish to continue using an already installed older version, read on to learn how to install SFML to an alternate location.

Usage Notes

There are just a few details of usage which I’d like to share. Firstly, as you probably know,  certain tools and libraries are required for the build. Namely, the script invokes CMake, make, git and doxygen. In fact, the script can have a go at installing these for you. Just run it with the -t switch. However, it handles this in a very primitive way. It installs them using apt-get so it’s specific to Ubuntu, Linux Mint and the like. Also, of course, the package names may change a little in the future (for example, git-core recently became simply git).

As for the libraries, you can try the -l switch. However, I’d say this is even less reliable. Again, it relies on apt-get and moreover it depends on the particular package names. However, I’ll try to keep these up to date so that it works on Ubuntu-like OSs at least. Anyway, if you have trouble with installation of packages or tools, let me know so I can look into it.

If you can’t get these features to work, don’t worry. The rest of the script should run fine, you’ll just need to ensure that the following tools are installed, along with the dependencies specified here.

  • CMake
  • GCC/Make
  • doxygen
  • git

There are just two last options. You can specify -D directory to have SFML installed into directory rather than the default location of /usr/local. And you can specify -S directory to have the SFML source downloaded into directory rather than a new subdirectory called SFML of the active directory. If you specify an existing directory (or if you use the defaults and there is an existing directory called SFML in the current active directory) then the script will check if it’s a Git repository. If so, it will update the repo and then build and install as normal; if it’s not a repo, it will give you the choice to cancel the operation or to delete the directory and re-clone the source from Git Hub.

Raspberry Pi!

Chances are you’ve all heard about this great new project already. If not, it’s basically a (very basic) computer system, all on a single circuit board about the size of a credit card. It runs on an ARM CPU at 700MHz, but it also has a respectable video chip which can apparently cope with 1080p video. Video output is by HDMI or composite video. It has 256Mb RAM. As yet, only the “development version” is available. It comes case free: you just get a board with all the components sitting exposed on it. But hey, all the better for modding, right?

Oh, and did I mention - it’s selling for around £21/$35! That’s excluding sales tax, but still.

There’s no permanent storage on the PI. However, the version currently shipping sports 2 USB ports, an ethernet connection and an SD card slot. Booting is necessarily via the SD card: right now you need to image your own; when the “educational” version of the Pi comes out later this year, you’ll be able to get cards preinstalled with Debian and some other tools.

Otherwise, the Wiki is there to help, with growing instructions including the way to cross compile various Linux Distros on your main PC to run on the Pi’s ARM processor. When it comes to choosing an SD card, I’ve read that class 4/6 is the best choice (they are better than class 10 for lots of small files, and class 10 has issues with the Linux kernel). I’m planning on either an Integral or Transcend 8GB class 6.

Right now, it’s still difficult to get hold of the things. You just have to register your interest with one of the suppliers – Farnell Element 14 or RS Components. Then you’ll hear from them at the first possible opportunity. And due to the overwhelming popularity of the Pi (I heard Farnell sold out their initial stock within 3 minutes of availability), you should sign up for emails from both of them as soon as possible!

You may still be wondering if it’s worth the effort, low price tag or not. Well tomorrow, I’ll post again, and mention a few of the things you can (or can’t) do with it. And if you want to read more about it, head over the official website (or, of course, Wikipedia).

And in case you’re wondering. Yes. I have already pre-ordered mine :D

Sign up now for new SFML Binaries!

Later on today, I’ll be sending out some updated SFML binaries for Windows. Not only that, there’s going to be a brand new script for installing SFML on Unix (in particular, Ubuntu/Linux Mint, but I’m sure a little modification will have it running elsewhere). If you want to be the first to get hold of all this, remember to subscribe by email if you haven’t yet. Otherwise, they’ll be added to the downloads page in a few days.

ACTA

There’s still an anti-censorship banner on the site right now, but I have a link for you guys. I don’t usually post anything off topic here, but this is really important, so here it is. I know, SOPA and PIPA have been dropped – at least for the moment – but have you heard of ACTA? It’s a trade agreement, not national legislation, meaning that it hasn’t been subjected to the same level of open discussion. The US and Canada have already signed, and Europe could be next. Not scared yet? Maybe you don’t know what ACTA is about? I certainly didn’t. Well here’s a short informational video to give you an idea. Share it, and let your dissatisfaction with these new regulations be known! Fight for the freedom of the internet :)

sf::Window::IsOpen()

Previously, we always checked if our SFML window was open using sf::Window::IsOpened(), which returned bool. Well, the function has recently been renamed to IsOpen(), although it appears otherwise unchanged (externally at least). So bear in mind that if you’re using a very up to date SFML snapshot, you may need to use sf::Window::IsOpen() rather than the old sf::Window::IsOpened().

Welcome to the Jungle – Herb Sutter

While you’re waiting for my next post, check out the introduction to a new piece by Herb Sutter. I’d subscribe to his blog if you haven’t yet…

Welcome to the Jungle.

Categories: General, News Tags: , , , ,

Renewed SFML 2.0 Builds

Remember all that time ago when I promised regular SFML 2.0 builds to blog subscribers, plus occasional builds for everyone else, as well? I sent out an initial build, but that was it. Anyway, I’m going to try and get that underway again. So, all current email subscribers will be emailed it – drop me an email if you want to opt out. And if you’re not yet subscribed by email, but would like to get the new builds as soon as possible, then please do subscribe now. But don’t worry if you really don’t want to give your email; I’ll provide a link to the build on the downloads page shortly as well.

Initially, the binaries will just be for VC++ 2008, VC++ 2010 and MinGW as before. I do want to provide Unix binaries as well, but it’s a little tricky with dependencies and stuff so I’ve go to decide how best to go about it. Ultimately I think I’ll try and create a Debian package for users of Debian, Ubuntu and Mint; otherwise it’ll probably have to be binaries without dependencies provided (you’d have to go to your package manager and find them yourself). As for MacOS, I’d like to provide binaries there too, just for the sake of completeness, but it’s not an OS I have – or ever into to have – access to, so I’d have to look into cross compiling it from Linux or Windows.

So anyway, you can look forward to updated Windows binaries this afternoon, and I’ll let you know when I can get some build for other platforms. Just remember than while I will keep you up to date with posts and the downloads page, the quickest and easiest way to hear about updates (and new posts) is to subscribe. So go ahead and do it! You’ll get your binaries soon ;-)

PS: I’m providing these files for convenience (and to make the site more popular :D ), but it’s still a great learning experience to build them yourself at least once. So check out my building SFML tutorials, for Windows/MinGW, Windows/VC or Linux/GCC. Oh, and just so you know, they’ll be updated with some new information soon too!

Follow

Get every new post delivered to your Inbox.

Join 73 other followers