Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML 2.0 Tutorials?  (Read 12464 times)

0 Members and 1 Guest are viewing this topic.

Tegramon

  • Newbie
  • *
  • Posts: 9
    • View Profile
SFML 2.0 Tutorials?
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.0 Tutorials?
« Reply #1 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, 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tegramon

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: SFML 2.0 Tutorials?
« Reply #2 on: October 03, 2012, 06:52:44 pm »
What about the window.GetInput() function?
What can I use instead?

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFML 2.0 Tutorials?
« Reply #3 on: October 03, 2012, 06:56:46 pm »
sf::Mouse Keyboard and Joystick
Back to C++ gamedev with SFML in May 2023

Tegramon

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: SFML 2.0 Tutorials?
« Reply #4 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.0 Tutorials?
« Reply #5 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tegramon

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: SFML 2.0 Tutorials?
« Reply #6 on: October 03, 2012, 07:53:04 pm »
It would be more easier to translate from 1.6 to 2.0 :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0 Tutorials?
« Reply #7 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.
Laurent Gomila - SFML developer

Orwel

  • Full Member
  • ***
  • Posts: 208
    • View Profile
Re: SFML 2.0 Tutorials?
« Reply #8 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  :'(

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: SFML 2.0 Tutorials?
« Reply #9 on: October 06, 2012, 03:42:29 pm »
So any tutorials for SFML 2? I don't know programming in version 1.6.
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: SFML 2.0 Tutorials?
« Reply #10 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.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: SFML 2.0 Tutorials?
« Reply #11 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://www.sfml-dev.org/download/2.0-rc/changelog.txt

CodingMadeEasy

  • Newbie
  • *
  • Posts: 38
    • MSN Messenger - petetheheat_represent@msn.com
    • AOL Instant Messenger - 622+Amaretto+Ave
    • Yahoo Instant Messenger - petetheheat_baller@yahoo.com
    • View Profile
    • http://www.youtube.com/CodingMadeEasy
Re: SFML 2.0 Tutorials?
« Reply #12 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.



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

Krofna

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Email
Re: SFML 2.0 Tutorials?
« Reply #13 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.



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



Is it just me or he is doing it wrong?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: SFML 2.0 Tutorials?
« Reply #14 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))

 

anything