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

Author Topic: SFML 2.0  (Read 106948 times)

0 Members and 1 Guest are viewing this topic.

SamuraiCrow

  • Newbie
  • *
  • Posts: 40
    • Yahoo Instant Messenger - samuraileumas
    • View Profile
SFML 2.0
« Reply #75 on: May 13, 2009, 07:56:05 pm »
Quote from: "The DarK'"
Quote from: "Laurent"
Quote
Also, true static linking builds that require no DLLS to run

If you're talking about libsndfile and OpenAL DLLs, I can't link them statically because they are LGPL.


LGPL don't provide static compilation ??


Actually, LGPL 3.0 corrected for that but I think the libraries used are under LGPL version 2.x .

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2.0
« Reply #76 on: May 13, 2009, 08:27:04 pm »
Quote
A transparent "preemptive" priority sound manager

SFML-Audio is not an audio engine, the "word" manager is already out of its scope ;)
There are better libraries if you want a more professional and complete engine (like FmodEx).
Plus, using a software implementation of OpenAL (like OpenAL-Soft which is more or less becoming the new standard -- and is what SFML uses on Windows), you can have any number of sources. The default is 256 but you can change it to whatever you want.
Laurent Gomila - SFML developer

nitram_cero

  • Full Member
  • ***
  • Posts: 166
    • View Profile
SFML 2.0
« Reply #77 on: May 14, 2009, 05:19:38 am »
Quote from: "Laurent"
Quote
A transparent "preemptive" priority sound manager

SFML-Audio is not an audio engine, the "word" manager is already out of its scope ;)
There are better libraries if you want a more professional and complete engine (like FmodEx).
Plus, using a software implementation of OpenAL (like OpenAL-Soft which is more or less becoming the new standard -- and is what SFML uses on Windows), you can have any number of sources. The default is 256 but you can change it to whatever you want.


FmodEx has a commercial paid licence, ranging from u$s100 to u$s6000 per product.
That's the thingy. I don't have that kind of cash, not even the hundred bucks, to invest.

OpenAL-Soft, it may accept 256 sources but sometimes sounds don't start to even play (when my game is really filled with enemies).
I notice this because the shooting sound is fired 3 times per second, and it's really noticeable when it skips one.
I should look deeper into this, maybe making specific benchmarks.

Even thou, that wont address the "sprite to graphics = sound to audio" point.
For an entity I can have as many sprites as I want (eg. cannons, ship, rockets, cockpit, etc.), but not multiple sounds.
If I have 100 entities that own 5 sf::Sounds, (charge shoot, shoot, move, collide, destroyed). It will fail.
(As a comparison, in space invaders there are 55 invaders per screen... 100 isn't really a big number)

That makes the Sound class not really useful.
Perhaps not a manager, but a simple Source pool.
That makes SFML "own and handle" OpenAL's sorces, and those could be acquired or releseased by sf::Sound depending on the sound's state: playing or paused/stopped, respectively.

It's not trivial to implement if you want Sounds to be able to play more that once at the same time.

Regards
-Martín

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2.0
« Reply #78 on: May 14, 2009, 11:20:18 am »
Quote
Even thou, that wont address the "sprite to graphics = sound to audio" point.
For an entity I can have as many sprites as I want (eg. cannons, ship, rockets, cockpit, etc.), but not multiple sounds.
If I have 100 entities that own 5 sf::Sounds, (charge shoot, shoot, move, collide, destroyed). It will fail.

Why? Just increase the maximum number of sources in OpenAL-Soft and it will work.
Moreover, having 5 sound sources per enemy and 100 of them doesn't seem to be a good design.

Quote
That makes the Sound class not really useful.

... for you. I don't think many users will need 500 sound sources ;)

Implementing a pool/manager/whetever so that it is completely invisible for the end user can be a complex task, I have many other complex tasks to complete (mainly on the graphics side) before thinking about this kind of stuff.
Laurent Gomila - SFML developer

nitram_cero

  • Full Member
  • ***
  • Posts: 166
    • View Profile
SFML 2.0
« Reply #79 on: May 16, 2009, 12:25:36 am »
Quote

Moreover, having 5 sound sources per enemy and 100 of them doesn't seem to be a good design.

... for you. I don't think many users will need 500 sound sources ;)


I don't want 500 sources, just 500 sound flyweights.

Not that I'll be playing them simultaneously, as I'm not drawing 100 sprites simultaneously neither.

But I need to keep the entities' states (i.e.: health/position/angle...) so the logic solution is have them owning a "sound source pointer" (Sound), not a source (which is a resource), such as sprites have a "texture pointer", they don't own their textures (resource).

What would you recommend to have instead of a bunch of sf::Sound per entity?

I understand you have more important stuff to do. I don't want you working for me :lol: . I just think it would be an upgrade to the library.

I'm making a source pool out of need, compatible with SFML (an alternative "ManagedSound" which is mostly a copy of sf::Sound), so if you want I can contribute with that. Of course it would need rework, but as a starting point it would be useful and less of a burden.

luminous

  • Newbie
  • *
  • Posts: 8
    • View Profile
SFML 2.0
« Reply #80 on: May 31, 2009, 08:18:35 am »
Been using SFML last couple weeks and I must say I do like it very much. The only thing i might suggest that wasn't in your list is to make all the file loading functions accept std::wstring for the filename in addition to std::string that they use currently.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2.0
« Reply #81 on: May 31, 2009, 12:27:05 pm »
It is actually in the list ;)

The "DataStream framework" will address this issue, by enabling any custom type of source stream for loading resources.
Laurent Gomila - SFML developer

luminous

  • Newbie
  • *
  • Posts: 8
    • View Profile
SFML 2.0
« Reply #82 on: June 01, 2009, 05:06:27 am »
ot, my mistake.

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
SFML 2.0
« Reply #83 on: June 06, 2009, 04:48:39 pm »
window::rotate

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2.0
« Reply #84 on: June 06, 2009, 04:50:13 pm »
Quote from: "heishe"
window::rotate

:?:
Laurent Gomila - SFML developer

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
SFML 2.0
« Reply #85 on: June 06, 2009, 04:51:25 pm »
Quote from: "Laurent"
Quote from: "heishe"
window::rotate

:?:


sorry, i meant to say view::rotate :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2.0
« Reply #86 on: June 06, 2009, 05:00:55 pm »
Yep, it will probably be added to SFML 2.0 (I just have to make sure it doesn't break anything).
Laurent Gomila - SFML developer

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
SFML 2.0
« Reply #87 on: June 07, 2009, 07:11:56 pm »
What about an easy interface to create multiple viewports?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
SFML 2.0
« Reply #88 on: June 08, 2009, 02:45:51 pm »
Quote from: "heishe"
What about an easy interface to create multiple viewports?
What functionality would you need which isn't provided by sf::View?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
SFML 2.0
« Reply #89 on: June 08, 2009, 06:58:58 pm »
Quote from: "Nexus"
Quote from: "heishe"
What about an easy interface to create multiple viewports?
What functionality would you need which isn't provided by sf::View?


multiple cameras looking at different places in the world at the same time visible on the screen (think of the commandos games)

 

anything