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 - eXpl0it3r

Pages: 1 ... 632 633 [634] 635 636 ... 720
9496
General / Re: SFML 2.0 Class/Member Errors
« on: October 09, 2012, 01:50:34 am »
Oh I forgot to request the full building command...

But I still don't really understand what's going on, because I've no problems building with MinGW. :-\

9497
General / Re: SFML 2.0 Class/Member Errors
« on: October 09, 2012, 12:52:50 am »
Hmmm it's a rather odd thing, so I've got two 'theories' but none of them make sense for all the errors so I just write what could cause the problem:
  • You've somewhere installed SFML 1.6 which still gets found by Code::Blocks and causes the errors since the naming convention has changed.
  • You have -lLIB in the settings of code blocks, although you should only write LIB, e.g. instead of -lsfml-graphics-s just write sfml-graphics-s.

You should follow strictly the official tutorial.

If that didn't help, then you should write, which exact version of MinGW and which exact version of SFML you're using.

Quote
Also something I found odd is Code::Blocks will do the auto-fill for the members yet when I try to compile it, Code::Blocks says they aren't members..?
That's not odd because those are two completely different systems. Code::Blocks searches the header files you specify where as compiling and linking needs to match in multiple areas and can't be vague about anything.

9498
System / Re: sf::Vector problem (probably)
« on: October 08, 2012, 09:37:30 pm »
Well you don't provide enough information to tell you want the problem actually is, then again it's way easier for you to find out. Just run the application with the debugger and extract the call stack then find out what goes wrong.

As for the code snipped there are a few things you should not do:
  • You're using SFML 1.6, which is quite outdated (2-3 years old) and has some ugly bugs. Use SFML 2!
  • You use a for loop without declaring the variable within the loop, this should only be done if there's really a reason. Also what FRex said; use: for(unsigned int i = 0; i < 15; ++i)
  • Use std::vector instead of pure arrays, it's safer, specially if you don't really know what you're doing...
  • There's no reason to allocate an array with constant size on the heap, don't use the new keyword unless you know what you're doing and you're aware that you'll have to call delete[] later on. With std::vector you wouldn't have that issue at all. ;)

9499
System / Re: Thread does not run in parallel
« on: October 08, 2012, 09:18:03 pm »
Well you're declaring the sf::Thread object inside the if-scope, thus the thread as an object can only life inside that scope. If you get to the end of the if-scope C++ will destroy the sf::Thread object and the sf::Thread object calls wait() in it's destructor, thus the main thread waits until the other thread has finished running and then proceed.
You need to declare the sf::Threads object outside the main loop or use a container that holds the sf::Thread objects outside the main loop scope. ;)

9500
SFML projects / Re: SFMLUploads.org - Relaunch!
« on: October 08, 2012, 08:22:09 pm »
DNS issue has finally been resolved!

SFMLUploads can now be reached under https://legacy.sfmluploads.org/ and https://legacy.sfmluploads.org/ whereas the first one will automatically redirect to the second one.

9501
General / Re: Resolve code...
« on: October 08, 2012, 08:13:28 pm »
By reading some tutorials on collision detection in your case you'd probably want AABB (Axis-Aligned Bounding-Box).
Also you should take more time to look into your code, make research on your own, read tutorials etc. instead of creating new topics whenever things just don't work right away.
We do gladly help but part of programming is finding mistakes and do research on your own, so you should also skill yourself in those categories. ;)

9502
Cool nice little addition which makes helping people out a bit easier!
Thanks! :)

9503
Graphics / Re: RenderTexture won't clear properly
« on: October 08, 2012, 05:09:52 pm »
Well then there's something wrong with SFML/your setup.

Quote
SFML 2.0 (compiled from the source files)
Can you give the commit ID and state what compiler you use in which setup (release/debug, static/dynamic)?

9504
Graphics / Re: RenderTexture won't clear properly
« on: October 08, 2012, 04:45:22 pm »
Then let's get back to the simple example...
How does the following code perform?

#include <SFML/Graphics.hpp>
#include <list>

int main()
{
    sf::RenderWindow window(sf::VideoMode(500, 500), "Test");
    window.setFramerateLimit(60);

    sf::RenderTexture rt;
    rt.create(500, 500);

    sf::RectangleShape rs;
    rs.setSize(sf::Vector2f(20, 20));
    rs.setPosition(0.f, 0.f);
    rs.setFillColor(sf::Color::Red);

    sf::Sprite sprite;
    sprite.setTexture(rt.getTexture(), true);

    while(window.isOpen())
    {
        sf::Event event;
        while(window.pollEvent(event))
        {
            if(event.type == sf::Event::Closed)
                window.close();
        }

        rs.setPosition(static_cast<sf::Vector2f>(sf::Mouse::getPosition(window)));

        rt.clear();
        rt.draw(rs);
        rt.display();

        window.clear();
        window.draw(sprite);
        window.display();
    }
}
 

If the render texture also doesn't get cleared then it's an issue with SFML and your graphics card (is the driver uptodate?).
If it gets cleared then it's something within your code and you should investigate further...

9505
SFML projects / Re: SFMLUploads.org - Relaunch!
« on: October 08, 2012, 04:28:26 pm »
Thank you for taking care of this project! :)
You're welcome! :D

9506
Graphics / Re: RenderTexture won't clear properly
« on: October 08, 2012, 04:28:02 pm »
std::list<Object*> RenderingManager::renderList;
 
And it contains only one object of the animation or does it hold all objects of your animation?

I mean if you want to move object x you move it, push it into the list and draw it.
But if you now keep doing this for every iteration the list will contain every object at any position and it's obvious that when drawing the whole list every object is drawn. ;)

9507
Graphics / Re: RenderTexture won't clear properly
« on: October 08, 2012, 04:08:03 pm »
To whole run/cleanup/update thing doesn't really help since it's not connected to the drawing part.
What does RenderingManager::RenderObjects do?

9508
Graphics / Re: RenderTexture won't clear properly
« on: October 08, 2012, 03:54:44 pm »
This shouldn't and actually can't happen, thus I suspect that your clear() call doesn't get executed, but without the full code it's impossible to say. But since you provide an example, does the example also not clear the RenderTexture?

9509
General / Re: Some bugs or my errors...
« on: October 08, 2012, 03:47:22 pm »
Copy-past error...

    ///////////
    // Level //
    ///////////
    sf::RectangleShape floor1;
    player.setSize(floorsize);
    player.setOutlineThickness(2);
    player.setOutlineColor(sf::Color::Green);
    player.setFillColor(sf::Color::Black);
    player.setOrigin(floorsize / 1.f);

You need to rename player. to floor1.. ;)

9510
SFML projects / SFMLUploads.org - Relaunch!
« on: October 08, 2012, 02:51:29 pm »
After quite a few ups and even more downs SFMLUploads is finally back online!

SFMLUploads.org was originally created by the user Haikarainen back in May 2011 but due to server issues the project had experienced some hiccups in the early days and then went offline in July 2012. As quite a few things have been uploaded to that site and linked to in this forum, I felt it was wrong to lead the project drop dead, thus I contacted Haikarainen and convinced him to let me host and maintain the website. So here we are with the relaunch of SFMLUploads!

All the files and user accounts have been successfully transferred over to the new host, thus you'll be able to log into your old account again to get access to your files.
If you don't remember your password you can contact me and I'll give you the opportunity to re-register.


SFMLUploads is aimed at developers using the SFML library, and it's main purpose is to serve those users with bandwidth for:
  • Project archives, allowed extensions are: .rar, .zip, .tar, .tar.gz, .tgz, .deb, .rpm, .7z, .xz, and .ace.
  • Code-snippets, syntax-highlighted code with support for 100+ languages, "fork"-able, meaning users can create other versions of it. Useful with debugging etc. Kind of like Pastebin.
  • Screenshots/images, allowed extensions are .jpg, .jpeg and .png. Primarily for screenshots, but other picture are allowed as well.
The main rule is: It HAS to have something to do with SFML, either if it's for a forum post where you seek help for debugging a problem related to/which uses SFML, or if it's download links for your awesome game on your personal blog or something, etc. You can read the full terms here; they also apply to the existing users and where introduced to not only protect me but also you.
Keep in mind that this service is not for project presentations, like the official wiki for SFML is, but it's a place to have your binaries, images, code fragments, etc for your project in a nice and easy manageable way.

If you notice any problems or have suggestions feel free to contact me or write them here for discussion.

I hope you like it - signup and enjoy! :)

Known Issues
  • The Facebook like button has been temporarily removed, since it caused the website to load extremely slow.

PS: This service is 100% free, if you feel like donating for the hosting cost then you can do this here. Thanks!

Pages: 1 ... 632 633 [634] 635 636 ... 720
anything