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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Contadotempo

Pages: 1 [2] 3 4 ... 12
16
Audio / Re: Odd sound quality
« on: August 23, 2012, 09:54:51 pm »
Sorry, completely forgot:

Windows 7 64-bit
SFML 2.0 Latest commit
As for OpenAL I'm using the one supplied with the SFML commit on the extlibs folder (32 bit). I also tried downloading the latest version (6.14.357.24, I think) but the problem persisted.

Thanks.

17
Audio / Odd sound quality (fixed)
« on: August 23, 2012, 09:33:21 pm »
Hello everyone,

I'm trying to play a simple .wav sound using the minimal code shown bellow. It plays fine, however the quality of the sound being played by the application, sounds significantly worse in quality when compared to the original.

It's hard to describe but it sounds like it's missing some frequencies or like really bad quality like a 12kbps mp3 sound. I know this explanation is really daft and I which I could record it or show it somehow.

Also, this doesn't seem to happen with all sounds. Only on sounds with 1 channel or mono but I'm not very sure. If someone could give me a hint I'd be thankful.

Here's my minimal code:
#include <SFML/Audio.hpp>
int main()
{
    sf::SoundBuffer sb;
    sb.loadFromFile("engine.wav");

    sf::Sound sound;
    sound.setBuffer(sb);
    sound.play();
    while(sound.getStatus() == sf::Sound::Playing)
    {}
    return 0;
}

Here's engine.wav from the example: https://dl.dropbox.com/u/8365167/engine.wav
And here's a 2 channel .wav that seems to play just fine: https://dl.dropbox.com/u/8365167/se_powerup.wav

Best regards, and thanks again.

18
General / Re: Very final step of installation...
« on: June 01, 2012, 03:37:39 pm »
Are you sure you meant VS11 and not VS10?
VS11 RC (or beta, I'm not sure) has been out for a while.

Actually, it seems there's an RC for VS12 now:
http://www.microsoft.com/visualstudio/11/en-us/downloads

19
Graphics / Re: Example of utilizing VertexArray?
« on: May 07, 2012, 05:47:35 am »
Thanks, your implementations helped me a lot!  ;)
I'm also really happy with the performance of vertex arrays, thank you!

20
Graphics / Re: Example of utilizing VertexArray?
« on: May 06, 2012, 04:38:32 am »
Thanks! I took a look at thor's implementation and it's easy to understand though I saw something on ParticleSystem.cpp that confused me. Every time the draw function is called, an sf::VertexArray object seems to be created (ParticleSystem.cpp line 243).
Isn't this inefficient? I mean to create a vector/vertexarray every time draw is requested? Wouldn't it be faster to have it as a class member instead?

Thanks for the help,
Best regards

21
Graphics / Re: Example of utilizing VertexArray?
« on: May 05, 2012, 12:05:36 pm »
Hello, sorry for the thread hijack but since my question falls under the same topic I think it's ok to ask here.

I'm trying to implement a particle system based on the example provided by Laurent, but I'm having a bit of trouble erasing a particle when requested. So far I'm doing it like this:

//Inside the particle system class
std::vector<Particle>   m_vectorParticle; //Holds the particles
std::vector<sf::Vertex> m_vectorVertex; //The vertex array
...
void update()
{
    for(unsigned int i = 0; i < m_vectorParticle.size(); ++i)
    {
        m_vectorParticle[i].update(&m_vectorVertex[i * 4], 1);
        if(//It's time to delete the particle)
        {
            m_vectorParticle.erase(m_vectorParticle.begin()+i);
            m_vectorVertex.erase(m_vectorVertex.begin()+i);
            m_vectorVertex.erase(m_vectorVertex.begin()+i+1);
            m_vectorVertex.erase(m_vectorVertex.begin()+i+2);
            if(m_vectorVertex.erase(m_vectorVertex.begin()+i+3) == m_vectorVertex.end())
                return;
        }
    }
}
 

However when it's time to erase a particle, the application seems to freezes and I'm not sure why. I don't believe I'm accessing or erasing anything invalid, or maybe I'm just being silly?
Could someone give me a tip to do this correctly?

Thanks,
Best regards.

22
Feature requests / Re: sf::Text coloring chosen characters?
« on: April 29, 2012, 07:13:13 pm »
You could use something like this instead:
http://www.sfml-dev.org/wiki/en/sources/richtext

It's coded for SFML 1.6 but you could easily adapt it to SFML 2.0.

23
Graphics / Re: Strange Title Bar Text
« on: April 07, 2012, 09:45:27 pm »
Are you compiling with the debug libraries but using a release configuration in visual studio by any chance (or the other way around)?

24
SFML website / Re: New forum
« on: March 25, 2012, 12:59:08 am »
Nice job!
No bugs so far.


Is this text glowing?

Yes

Wow so innovative and fresh, we're dealing with edge technology here.

Sorry, I'll stop spamming.

25
General / Customizable controls
« on: March 20, 2012, 12:22:43 am »
See if this helps you:
http://www.sfml-dev.org/wiki/en/tutoriels/bindevents_en

It's for SFML 1 but the philosophy can be the same for SFML 2.

26
General discussions / Do you use C++11?
« on: March 10, 2012, 03:46:50 pm »
Not yet, I haven't studied it very well but I'm very interested on the new pointers and smart pointers.

27
General / Setup issues
« on: March 05, 2012, 05:22:13 pm »
The error should be self-explanatory. You seem to be creating a project that uses the precompiled header stdafx.h but then you're not using it.

Try creating an empty project that doesn't use a precompiled header and it should work, assuming SFML is set up correctly (you will have to recompile it for VS2010).

28
Graphics / sf::Text removes spaces from GetGlobalBounds, SFML 2.0
« on: March 01, 2012, 02:56:56 pm »
Try adding the ASCII character with the dec code of 255. It's supposed to be a blank character I think and it seems to work for me (under windows).

29
Graphics / sf::Text removes spaces from GetGlobalBounds, SFML 2.0
« on: March 01, 2012, 05:42:22 am »
Heh, posted this a while ago as well:
http://www.sfml-dev.org/forum/viewtopic.php?t=6980

Answer is here as posted by Laurent: http://www.sfml-dev.org/forum/viewtopic.php?t=6672

30
Graphics / checking circular collisions
« on: February 15, 2012, 10:20:20 pm »
Something like:
Code: [Select]
if((x1 - x2)^2 + (y1 - y2)^2 < (radius1 + radius2)^2)
     youhavecollision();


Where x and y  is the position of the center of each circle.
That's pseudo-code of course but I think you can get the idea.  :P

Pages: 1 [2] 3 4 ... 12
anything