Looking for a SFML tutorial site or book.

Im trying to learn SFML, but the tutorials on the site teach very little, and i cant seem to find any other tutorials. Does anyone know of some good books i can purchase or sites i can learn from? Im really stuck here at the moment, Thanks!
What is it that the tutorials don't teach?
Anyway, if there are any good sfml sources, you should probably ask in http://www.sfml-dev.org/forum/
Yeah...I've tried to find some others tutorials because those on the official site are very uncovering. I'm still looking...
What in particular are you looking for? I for one have had a hell of a time even getting SFML set up, but they do have a nice documentation section. Has all the classes used listed there, and how to use them. Should be able to do anything from that
I don't know...a better explanation of any function for instance?
Honestly if you can't understand the documentation(http://www.sfml-dev.org/documentation/2.0/) on the site then you probably are not ready to use the library.

The documentation offers clear examples for every class and member function, there is an assumed level of programming ability when you use custom libraries.

i.e. from this definition here I can see that the function's return value is type float, the function takes no arguments and the function should not modify the implicit object.

float sf::SoundSource::getAttenuation ( ) const [inherited]

Get the attenuation factor of the sound.

Returns:
Attenuation factor of the sound

See also:
setAttenuation, getMinDistance



a little further reading : sf::SoundSource is a base class defining a sound's properties.


What more of a better explanation could you be looking for? I don't use the library because I don't feel I've mastered the idea of classes/namespaces yet but I can read the code and would know how to use it if I needed to.
Last edited on
Yes...you might be right. I've tried to use that library a few months ago and I was upset because I wanted to make a music player. I made some pictures and I wrote on them 'Play', 'Pause' and 'Stop'. Now I had to make an sensitive area so that if press on that area, the program should make something: to play that music, to pause and to stop the music. So that area must be exactely calibrated on those 3 pictures. I spend 3 or 4 hours to make that area (I had to set the MouseX and Y function or something like this) because on the site wasn't specified any of that function. It was very nasty. What I am trying to say is that if I want to do a bigger project, I have to learn some undescribed functions.
It was better organized if they would make a table with every namespace/class/function (just the names) and if I would press on that namespace/class/function, to show me the complete description like is in cplusplus.com. Have you seen how is described a function on that site? It's very clear everything.
Please excuse my english.
Try looking in the headers as documentation.

For example, in <SFML/Audio/Music.hpp> from when I downloaded it, there are 219 lines. 34 lines contain actual code and the rest explains what each function in the 'Music' class does. We also see that it inherets from SoundStream. If we go to that header we have 376 lines of which only 52 is text.

SFML's author has done a great job at documenting everything. Actually it is the best documented external library I have used. The documentation associated with Win32 or OpenGL can be very difficult to understand. The documentation associated with Boost or OpenAL seems at times to be incomplete at best.

If the documentation isn't in a format that you like, you'll just have to deal with it as you'll need to get very flexible when you start to branch out to other libraries.

Last edited on
@CosminNTG, http://www.sfml-dev.org/tutorials/1.6/window-events.php has all of that spelled out. Note that if you can't fit into event model, there is also a section of sf::Input at the bottom. Even if that wasn't there, a Google search like "site:http://www.sfml-dev.org/documentation/ mouse x" gives reference pages on sf::Input and MouseMoveEvent as two first results.
The problem is not a lack of resources, but your inability to use them.
This tutorial ( http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx ) covers the entire game creation process, creating an over engineered Pong clone using SFML. It's long though, currently at 10 chapters.


It does go into extreme detail about configuring SFML 1.6 in Visual Studio, an area where many people starting out fail. Additionally, each chapter has a preconfigured solution you can simply download.
Last edited on
Topic archived. No new replies allowed.