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 ... 615 616 [617] 618 619 ... 721
9241
Unfortunately, it is not true. As I said in my topic, there is ati driver related opengl bug, which causes 99% gpu usage on vsynced apps, and what's more (i hadn't mentioned it, but now i realised it) the cpu usage is only 40% instead of 50% when vsync is on. So yea, vsync and sfml is great on nvidia cards, but on ati unfortunately vsync increases gpu usage and reduces cpu usage only by 10 % (50% -> 40%). That's a bad bug, isn't it :(? It's a shame that you say it's driver related, because using vsync in sfml has no purpose on amd cards.
No problem here, don't generalize. Must be something with your driver or your card only.

9242
Window / Re: RenderWindow not appearing?
« on: November 12, 2012, 02:57:03 pm »
Also, be sure to select a GUI application under the properties instead of a console application.
For debugging I wouldn't recommend that, because then you don't have a clue when SFML prints something out, like when a file can't be loaded, and you'd lose the ability to quickly return some debugging values to see what's actually going on.
For releases one should link against sfml-main and change the subsystem to window instead of console.

9243
SFML projects / Re: didii's simple classes
« on: November 12, 2012, 01:59:19 pm »
Well, first off: I never heard about sfgui or tgui, but I will take a look at them, thanks for referring.
Those are two GUI library, but one doesn't always need a full blown GUI, so a simpler approach may fit your needs better at the moment.

- What is the idea behind the vertex array approach?
A VertexArray has to only once call the OpenGL draw function (SFML is built on top of OpenGL), thus it's way more efficient than having to call it as many times as tiles exist. Also since then everything is nicely composed of vertices the GPU will be extremely fast. (GPUs are built to handle millions of vertices per second).

- What is wrong with the c-style casts? I've learned in school that casting using the syntax (int)(5.3f) is more efficient than int(5.3f) because it's build in the compiler or something. (It wasn't really explained)
Those are both C cast and I don't think one is more efficient than the other one, it's just a syntactic sugar.
What FRex meant (but didn't explain!) was that you should use static_cast<int>(5.4f) which is the C++ way of casting.

9244
General / AW: My window will only stay open for a second.
« on: November 12, 2012, 11:49:50 am »
I'd advise you to use SFML 2. SFML 1.6 is 2 years old and lacks quite a few features.

As for your problem, ready again hoe to handle events in the official tutorial. Checking for key code without checking if a key event has happend leads to undefinded behavior.

9245
Window / Re: RenderWindow not appearing?
« on: November 12, 2012, 01:40:05 am »
Quote from: meddlingwithfire
SFML 1.6, dynamically linked

I do have an ATI video card - I've heard that ATI doesn't play well with SFML, but I haven't seen any specific references to my issue in regards to ATI.
Just use SFML 2 instead of 1.6...
SFML 1.6 is over 2 years unmaintained, thus outdated has the ugly ATI bug that you just encountered (window doesn't open) and lacks a lot of nice features that SFML 2 brings. ;)

If you don't want/can't then you need to link statically...

9246
Graphics / Re: Optimizing Texture and Sprite management
« on: November 11, 2012, 10:48:49 pm »
1) DonĀ“t load files in the object constructor. File loading may fail, and you can have a "half constructed" object (Put the loading code in a loading function).
He doesn't load files manually and it's perfectly safe to call loadFromFile on a sf::Texture in the constructor. If the image file doesn't exist you'll just be left with an white square.

If you load files on your own, you better handle the exception correctly, than just putting somewhere else. But depending on the logic it might be nicer to put it somewhere else. ;)

9247
Feature requests / Re: Special keyboard events
« on: November 11, 2012, 05:37:49 pm »
You can implement this easily on your own while using SFML. ;)

9248
General / Re: SFML 2.0 and CEGUI 7.7 issue
« on: November 11, 2012, 05:36:24 pm »
It could be that CEGUI changes some OpenGL states or similar, thus you probably will have to use push/popGLStates, but I've no idea what CEGUI does in the background...
There's an outdated tutorial on the old wiki on how to use CEGUI, but it's for SFML 1.6 and an old CEGUI version.

Maybe you'd find better help on their forum (if that exists), since there might be able to tell you what to do, to get CEGUI working with SFML 2.

9249
General / AW: HELP!! Function prototype doesnt match any in class
« on: November 11, 2012, 01:29:15 am »
Please follow the rules linked above!

Are you sure you're not compiling an old file?

9250
Graphics / Re: [Solved]Possible to reuse pixels?
« on: November 11, 2012, 01:20:06 am »
If it lags even with vertex arrays, make several vertex arrays and only draw the ones on screen :)
Or change the content of the vertex array accordingly. ;)

This however does not either allow for infinite worlds as the number of chunks you have to iterate to find the ones you are intersecting increases with the amount of tiles on the screen although your memory will run out before the chunk amount causes any lag.
It's just a bad/slow algorithm(/datastructure) you're using to determine what should get displayed and what not. ;)

9251
General / Re: Please Help! Access Problems..
« on: November 11, 2012, 01:15:23 am »
Quote from: In the constructor
Entity* mEntity = new Entity();

Which creates a entity instance local to the constructor and will memory leak when the constructor is finished.

Change it to mEntity = new Entity;.
Btw I advise you to avoid manual memory management and use std::unique_ptr or std::shared_ptr, as I did for the state manager.

9252
Graphics / Re: Resizing images
« on: November 11, 2012, 01:11:05 am »
Okay then you could just use one sf::Sprite and change the position and texture coords and draw it onto a sf::RenderTexture. Then you assign the texture of the render texture to another sprite and use that through out the rest of the execution.

9253
General / Re: HELP!! Function prototype doesnt match any in class
« on: November 11, 2012, 01:06:50 am »
Read this first...

Also the answer has already been given by the compiler:
error prototype for void GameScreen::update(sf::Event) doesnt match any in class GameScreen. candidate is virtual void update()
Which means that you maybe haven't save the GameScreen.h or similar.

And please fix your code formatting!!
Don't just c&p from your terminal running vim... -.-

9254
Graphics / Re: Resizing images
« on: November 11, 2012, 12:26:15 am »
I'd advise you to use SFML 2, which has less bugs, isn't 2 years old and unmaintained. ;)

Anyways you don't have to copy things around, just use a sf::Sprite and the SetSubRect function to define which part of the sf::Image should get displayed.

9255
SFML projects / Re: SFML-Sidescroller: Version 0.07 released!
« on: November 11, 2012, 12:18:31 am »
Maybe a few too many asteroids to start off with, unless you have repairs dropping often but otherwise OK game.
That's kind of the sense of the game. ;D
Who can survive longer in that asteroids hell? ;)

Pages: 1 ... 615 616 [617] 618 619 ... 721
anything