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 ... 635 636 [637] 638 639 ... 719
9541
General discussions / Re: SFML 2.0 RC
« on: September 29, 2012, 12:37:20 am »
Are you using the express edition by any chance?
Well this could likely be, since I'm using Visual Studio 12 Premium (thanks university!). ;)

9542
General / Re: using SFML 2.0 in Qt4
« on: September 28, 2012, 01:14:50 pm »
Well I haven't really worked with Qt Creator and specially not with qmake (which turns those *.pro files into usable make files), so I'm not sure what goes wrong, but I'd still bet you have a miss match of libraries.

If you follow the Code::Blocks tutorial 1:1 it's guaranteed to work. It's just a matter of copying all the details...

Optionally you can also build your application on your own without any IDE. If the path to the MinGW binaries is added to the PATH environment variable you can just open a command line.

g++ -Ipath\to\SFML\include -Lpath\to\SFML\lib File1.cpp File2.cpp -o Output.exe -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

9543
Graphics / Re: PNG refuses to draw
« on: September 28, 2012, 08:19:53 am »
Btw it's not really advised to derive from sf::Sprite.
Also is there a reason for loading the image and copy it to a texture manually? I mean texture.loadFromFile() does that automatically. ;)
But like Laurent said we can't help with those few code pieces.

9544
General discussions / Re: SFML 2.0 RC
« on: September 27, 2012, 11:34:25 pm »
Don't know, might have done something wrong cause it just didn't want to generate the needed files. Gave some error I don't remember but that didn't make sense.
Yeye it's always the fault of the software... :P ;D

9545
General discussions / Re: SFML 2.0 RC
« on: September 27, 2012, 10:56:27 pm »
Though cmake don't like Visual Studio 11 yet(2012)
What do you mean by that?
I've no problems with VS11 and CMake. Do you have the latest CMake version?

9546
General / Re: SFML 2.0 on Visual Studio 2010 64Bit
« on: September 27, 2012, 02:26:36 pm »
and it works with the 64bit libraries...
I guess you meant 32bit libraries.

When I do the same on my project, it does not work.
It is very strange, that the same code works with the 32 bit version, but not with the 64 bit...
You've either some mistakes in your project setup or you've compiled the libraries with wrong settings.

The errors essentially mean that you mix runtime libraries, which you shouldn't do.
Do you want to link dynamically or statically?
Do you want to link the runtime library dynamically or statically?

If you're not sure if your libraries were build right you can try to download these (contains debug & release - static & dynamic but all use the dynamic runtime library).

9547
General / Re: SFML 2.0 on Visual Studio 2010 64Bit
« on: September 27, 2012, 01:49:03 pm »
You somehow mix around libraries and debug/release modes.
Make sure that all the settings are the same.

Create a new and empty project and follow 1:1 the official tutorial and link against your compiled SFML version.


9548
Feature requests / Re: sf::Window::getTitle()
« on: September 27, 2012, 01:22:06 pm »
This feature was requested before, see here.
The search function can be quite useful...  ::)

9549
General / Re: using SFML 2.0 in Qt4
« on: September 27, 2012, 12:53:16 pm »
Which role plays Qt in all of this? Or did you just mean that you're using Qt Creator as your IDE?

Also please make use of the code-tag to get a nicer formatting for code like texts.

Although I don't think that it will fix your problem, you should include SFML headers with <> instead of "" (e.g. #include <SFML/Window.hpp>).

Can you show us the full error message?
Is your Qt Creator settings set to debug, while you're trying to build with SFML release libraries (without -d sufix)?

9550
General / Re: SFML 2.0 on Visual Studio 2010 64Bit
« on: September 26, 2012, 03:34:02 pm »
I loaded this version of SFML: Windows - Visual C++ 2008 (7.20 MB)

when I open CMake and I have to choose where to finde the source code, I just the folder where the whole project is located:

When I try to compile I get this error message:
"CMake Error:  The source directory "C:/SFML2.0/cmake/Modules) does not appear to contain CMakelists.txt.
Specify -help for usage, or press the help button on the CMake GUI."

Maybe I have the wrong installe package of SFML?

EDIT: I searched the whole package for a CMakelists.txt but I haven't found it!
Those who can read have a clear advantage. FRex had already pointed out to read the tutorial where everything would've been explained.
Also can you explain to me why you download the package for Visual Studio 2008 when you could've downloaded the version for Visual Studio 2010, which would match your IDE version? ???

To make it again clear, there are no precompiled binaries for VS10 x64, so you'll have to compile SFML 2 on your own as described in the tutorial.

9551
SFML wiki / Re: Tiled map with arrays
« on: September 25, 2012, 05:27:05 pm »
Ok, I've added include guards and made loop more eye-friendly.
Yeah I noticed, I was editing too. ;D

Anyways I've fixed the missing indentations and added the required includes, I hope I didn't miss any.

Btw for me it makes more sense to use *.hpp file endings, so it matches nicely with *.cpp and directly indicates the use of C++. ;)

9552
SFML wiki / Re: Tiled map with arrays
« on: September 25, 2012, 04:20:10 pm »
Nice! :)

What exactly is the reason for leaving out the include files & guards? ???

Also could you (or am I allowed to) format the main loop a bit better? I mean at the moment it's just a hugh block of code which seems quite hard to read. Or is there a reason why you don't insert spaces/break lines? ;)

So this
                while(app.pollEvent(eve))if(eve.type==sf::Event::Closed)app.close();
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::Q))cam.zoom(1.05f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::W))cam.move(0.f,-10.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::E))cam.zoom(0.95f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::A))cam.move(-10.f,0.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::S))cam.move(0.f,10.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::D))cam.move(10.f,0.f);

Would turn into this
                while(app.pollEvent(eve))
                        if(eve.type==sf::Event::Closed)
                                app.close();
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::Q))
                        cam.zoom(1.05f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::W))
                        cam.move(0.f,-10.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::E))
                        cam.zoom(0.95f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::A))
                        cam.move(-10.f,0.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::S))
                        cam.move(0.f,10.f);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::D))
                        cam.move(10.f,0.f);
Or at least add a space after the if-statement, so one can differentiat what is the check and what is the action with one look. :D

9553
General / Re: Ways to raise FPS
« on: September 25, 2012, 10:13:38 am »
Or use a profiler to fibd out where the application spends most of its time.
And as alteady pointed out never call a destructor manually, thos leads to undefined behavior.

9554
System / Re: Multithreaded loading screen
« on: September 24, 2012, 11:40:24 pm »
However, I found more interesting bug which I was debugging for ~2 hours. I found that you can't draw text using a default font in 1 thread while in second one work on text with the same font. What I was doing was displaying loading screen in main thread while in second load resources. When I used something like getLocalBounds() on a text (not the same text variable, just the same font - default one) in a second thread then font became damaged - some characters like 'I' were missing whenever I wanted to draw text with default font.
UB bugs are really hard to debug, it seems like index-out-of-bounds write so some character sprites are damaged(?) I don't know anything else that could do such thing. Maybe later I'll try to get minimal bug-reproducing code for this bug.
Doesn't really matter anymore, since the default font is removed in the latest commit. Also there have been many similar bug reports already (search in the forum), so you can check out the known issues on github. ;)

9555
Network / Re: klient-serwer game network
« on: September 24, 2012, 05:11:30 pm »
There are tutorials in for SFML 1.6 which can get applied easily to SFML 2. ;)

Pages: 1 ... 635 636 [637] 638 639 ... 719