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

Author Topic: Some SFML programming issues  (Read 3057 times)

0 Members and 1 Guest are viewing this topic.

Sonic-blue-knight

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • http://sonic-blue-knight.deviantart.com
Some SFML programming issues
« on: February 25, 2009, 07:25:28 pm »
Alright, I'm about to start learning SFML, but I'd like to know some things :)

Sprite.SetSubRect(sf::IntRect(10, 10, 20, 20));
1. For making animations I just can only use that? (I mean, that's the easiest way isn't it?)
2. How can I protect my resources and make them be read by SFML? (Changing it's format and so)
3. Is it possible to hide the resources inside of the .exe and also being read from there?
4. Does SFML have a function to set the sound position? (Time position).

Thanks in advance. (oh yeah, wiki's links are broken)
yeah, I'm Spanish >:3

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Some SFML programming issues
« Reply #1 on: February 25, 2009, 07:51:47 pm »
1. Yes
2. A simple solution is to put all your resources in a big data file. There's some code on the wiki to create and read such files.
3. Only on Windows, so that's not implemented in SFML. But my answer to question 2 already gives a portable solution for this ;)
4. Yes

Quote
wiki's links are broken

Which ones?
Laurent Gomila - SFML developer

Sonic-blue-knight

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • http://sonic-blue-knight.deviantart.com
Some SFML programming issues
« Reply #2 on: February 25, 2009, 07:55:11 pm »
there are some in http://www.sfml-dev.org/wiki/en/sources

Also, I'd like to thank you for that quick reply! :3
Greetings!
yeah, I'm Spanish >:3

Astrof

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Some SFML programming issues
« Reply #3 on: February 25, 2009, 08:43:50 pm »
wait, so you can set the sound's time position (make it play from a certain spot)?

EDIT: found it, SetPlayingOffset yay.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Some SFML programming issues
« Reply #4 on: February 25, 2009, 08:53:59 pm »
Quote
there are some in http://www.sfml-dev.org/wiki/en/sources

I tested all of them, they're ok. Which ones are not working for you?
Laurent Gomila - SFML developer

Sonic-blue-knight

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • http://sonic-blue-knight.deviantart.com
Some SFML programming issues
« Reply #5 on: February 25, 2009, 08:56:00 pm »
http://www.sfml-dev.org/wiki/en/sources/frame_anim_animated

That one with the link, doesn't work
Show's a message in French apologizing.
yeah, I'm Spanish >:3

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Some SFML programming issues
« Reply #6 on: February 25, 2009, 10:22:54 pm »
Ok I see, thanks :)
Laurent Gomila - SFML developer