SFML community forums

General => General discussions => Topic started by: Tegramon on October 03, 2012, 06:39:43 pm

Title: SFML 2.0 Tutorials?
Post by: Tegramon on October 03, 2012, 06:39:43 pm
Hi

I am new to SFML.
I want to make a simple tabletop 2D game that would simulate sort of a naval battle harpoon type of game. I am planning to take it simple. First of all I am trying to make the interface (using libRocket) and am interested on some SFML tutorials. I am using 2.0. Most sfml tutorials are 1.6.
Any new tutorials for 2.0? And I dont mean basic stuff, I know how to make a pong game. I am interested in timers, sprite animation and the like. I found the coding site www.codingmadeeasy.ca but those tutorials are for SFML 1.6.
Any ideas?
Title: Re: SFML 2.0 Tutorials?
Post by: eXpl0it3r on October 03, 2012, 06:48:24 pm
Well if you have SFML 1.6 it's mostly quite easy to port it to SFML 2.
But other than the Wiki (https://github.com/SFML/SFML/wiki), which is maintained by the users of SFML and also holds some outdated tuts, there are only a few handful other sources I know of...
SFML is relatively young and hasn't seen such a big publicity as SDL or similar libraries, so there haven't been people writing tons of tutorials about it, sorry to disappoint you. ;)

As for the game concepts/basics I guess you'll find quite a bit of information on the web and since those topic are rather generic porting it to one or the other library shouldn't be that hard.
Title: Re: SFML 2.0 Tutorials?
Post by: Tegramon on October 03, 2012, 06:52:44 pm
What about the window.GetInput() function?
What can I use instead?
Title: Re: SFML 2.0 Tutorials?
Post by: FRex on October 03, 2012, 06:56:46 pm
sf::Mouse Keyboard and Joystick
Title: Re: SFML 2.0 Tutorials?
Post by: Tegramon on October 03, 2012, 07:02:04 pm
Yeah, but I like a method that would be part of RenderWindow.
Is there something like that?
Title: Re: SFML 2.0 Tutorials?
Post by: eXpl0it3r on October 03, 2012, 07:27:03 pm
Yeah, but I like a method that would be part of RenderWindow.
What sense/benefit/value/etc. would it have to you?
Or better said why don't you want to use sf::Keyboard, sf::Mouse and sf::Joystick?

The part that it's independent from sf::RenderWindow is imho a much better design and since the functions of the classes are defined statically you don't have to instantiate an object but can directly use it.
Title: Re: SFML 2.0 Tutorials?
Post by: Tegramon on October 03, 2012, 07:53:04 pm
It would be more easier to translate from 1.6 to 2.0 :)
Title: Re: SFML 2.0 Tutorials?
Post by: Laurent on October 03, 2012, 07:56:22 pm
Quote
It would be more easier to translate from 1.6 to 2.0
SFML 2 is designed to be better than 1.6, not to be "easy to translate" :P
That's the point of releasing a new major version: breaking things.
Title: Re: SFML 2.0 Tutorials?
Post by: Orwel on October 03, 2012, 09:28:21 pm
I think SFML2 is more easier than SFML1.6 .

Input class is globall (dont need pointer to Window).
Drawable and Transformable are separated. It is not more easy, but you miss a lot of error with that  :P

No really, i can not find diffirence for my level  ;D. Just name of class and function who change. And a lot of bugs are fixed, and a lot of new bug  :P

It is really easy translate 1.6 to 2 and you can use tutorial on 1.6

Quote
That's the point of releasing a new major version: breaking things.

Don't destroy higth level class, please  :'(
Title: Re: SFML 2.0 Tutorials?
Post by: AlexxanderX on October 06, 2012, 03:42:29 pm
So any tutorials for SFML 2? I don't know programming in version 1.6.
Title: Re: SFML 2.0 Tutorials?
Post by: masskiller on October 06, 2012, 04:24:58 pm
Well as far as I know the best tutorials you may find are the already written ones, some in the wiki and questions in the forum, it's not like you have many other choices anyway. Besides with help of the documentation you can easily port 1.6 code to 2.0, it takes a lot of reading sure, but then again there's little if anything more than that.
Title: Re: SFML 2.0 Tutorials?
Post by: Assassinbeast on October 08, 2012, 01:47:05 am
So any tutorials for SFML 2? I don't know programming in version 1.6.

I just also started with 2.0 and i watch codingmadeeasy's 1.6 tutorials.
Its actually not that hard to follow when using 2.0.
Yes, there are some code u have to change, but its not that hard to follow and if u get some errors, then u can easily find what syntax you have to change.  some good links are here:

http://en.sfml-dev.org/forums/index.php?topic=5343.0 (http://en.sfml-dev.org/forums/index.php?topic=5343.0)
http://www.sfml-dev.org/download/2.0-rc/changelog.txt (http://www.sfml-dev.org/download/2.0-rc/changelog.txt)
Title: Re: SFML 2.0 Tutorials?
Post by: CodingMadeEasy on February 27, 2013, 09:19:51 am
Sorry for reviving an old topic but if anybody is in need of some sfml 2.0 tutorials then you can always check here. I have started a new sfml 2.0 tutorial series.

http://www.youtube.com/watch?v=kAbkFY6lwAY

Currently there's 16 tutorials but there's lot more to come.
Title: Re: SFML 2.0 Tutorials?
Post by: Krofna on February 27, 2013, 09:24:54 pm
Sorry for reviving an old topic but if anybody is in need of some sfml 2.0 tutorials then you can always check here. I have started a new sfml 2.0 tutorial series.

http://www.youtube.com/watch?v=kAbkFY6lwAY

Currently there's 16 tutorials but there's lot more to come.

http://www.youtube.com/watch?v=YMZmFFJd0Ww

Is it just me or he is doing it wrong?
Title: Re: SFML 2.0 Tutorials?
Post by: G. on February 27, 2013, 10:34:53 pm
He could put every vertices in the same VertexArray, there's not much point to make hundreds of vertex arrays when you could make only one.
The main purpose of this tutorial is (IMO) to show the syntax of VertexArray, and it looks OK. (but it's faster to look at the documentation or the future official tutorial(and I dislike video tutorial about programming))
Title: Re: SFML 2.0 Tutorials?
Post by: CodingMadeEasy on March 01, 2013, 09:33:34 pm
The purpose of my tutorials is not to show you the most optimized way to handle code because in different situations you may have to use different optimization techniques. The purpose of my tutorial series is to show the syntax and how to use it then in turn you decide how to implement it into your own code. 
Title: Re: SFML 2.0 Tutorials?
Post by: eXpl0it3r on March 01, 2013, 09:40:14 pm
I haven't seen any of your videos so the following is only a general statement about tutorials.

For some such tutorials might be helpful, but the danger with such example/syntax tutorials are, that people will copy the code and will adapt what one teaches them, thus if you show a bad practice, it might end up in their code anyways and blow up at some point. Thus for me it would be important to explain the syntax and then discuss different techniques and show some good practices. Sure it's more time-consuming and one has to plan ahead, but in the long run the viewers will benefit more from it. ;)
Title: Re: SFML 2.0 Tutorials?
Post by: CodingMadeEasy on March 02, 2013, 03:43:04 am
I do understand your point and I do teach different programming practices with other tutorial series' This series is just to teach syntax. Later on I'll be showing them how to implement the code to create a platformer. While designing the platformer they will be learning quality methods in order to use their code but thanks for the suggestions. I'm always open to suggestions :)