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 ... 656 657 [658] 659 660 ... 720
9856
Window / Re: issue with pollEvent in SFML 2.0
« on: August 25, 2012, 06:03:30 pm »
Well I do not have a problem with your code (also on Windows 7).
What graphics card do you use? Is it uptodate?
Do you have any application installed that could manipulate inputs or send messages to other applications?

Afaik we had already quite a few complaints where the event loop stalled the application, but I'm not sure if there ever was a solution... You could search the forum for it. ;)

9857
General / Re: Slow execution on first start.
« on: August 25, 2012, 05:56:33 pm »
Well this has nothing to do with SFML, just that you experience that problem with it...
It must be some OS related DLL/runtime loading/caching thing, I've never experienced such a thing on my Windows 7 box, than again I rarely reboot my system since hibernation & standby are much more convinient.
Have you ever tried application with SDL or other graphics libraries, or just games with similar problems?

9858
SFML projects / Re: FlexWorld
« on: August 25, 2012, 05:10:26 pm »
The problems with using already existing libraries can be various:
  • The license does match you needs.
  • The library is way too heavy for the needed task.
  • The library doesn't match the wanted result exactly and thus would need some redesign/rewrite (if the license allows that).
  • The library can't be integrated easily into your application/game.
And then there's the aspect of wanting to have your own code.

As for FlexWorld I believe it's a mixture of most of the reasons above plus as Tank already said the idea was in the beginning to have something very simple and thus using a full blown library would've been overkill. Now with the whole new property system using another library could also be harder or need unnessecary class instances etc.

The home made stuff just matches perfectly the needs. ;)

9859
DotNet / Re: ConvexShape isn't drawn
« on: August 25, 2012, 04:03:19 pm »

9860
Graphics / Re: Loading an image fail
« on: August 25, 2012, 10:56:15 am »
In Code::Blocks the working directory is defined through: "Project -> Properties -> Build targets -> [name of target] -> Execution working dir"

Quote
it cant open the image file
Is that the actual error message, because there could also be others, like unsupported image formats (e.g. progressiv JPEG or 8bit PNGs).

Btw: I strongly advice you to use SFML 2. ;)

9861
Graphics / Re: Loading an image fail
« on: August 25, 2012, 09:54:41 am »
Well you then probably hacen't read enough... ;)
You've already found the cause and your uncertenty about the images location says it all. Unfortunatly you didn't state what IDE you're using.
E.g. in VS you have to place the resources next to the project file.
Generally speaking the application will search for the resource in the working directory, if your IDE has such an option, then you probably should check its path.

Note: This forum has a code=cpp tag, so please make use of it. ;)

9862
Graphics / Re: Sprite rendering as white box
« on: August 24, 2012, 10:48:52 pm »
Unfortunatly you don't provide enough code we can go about.
The problem basically occures when the sprite loses the reference to the texture or the texture gets released although the sprite still uses it.
For beginners this mostly happens when they declare the texture in one scope and try to use it in another one. If one is using textures as a member variable of a class and then copies that class without having your own copy constructor defined it can also happen that the texture gets released.
So with the provided code we can't really tell you when things go wrong, please always include a minimal but complete example. ;)

The brackets around your sprites array isn't really needed and just makes you code look strange.
Another hint, return the sprite as reference rather than by value (i.e. const sf::Sprite& getSpritesheet()).

I know both my posts have been asking for help. I'm sorry about that.
Well that's what this forum is mostly about, asking questions, receiving help or helping others. ;)

(UGH! I'm so used to hitting f5 to compile that I accidentally hit f5 when I wanted to post and it refreshed the page. So I had to write this twice)
Chrome FTW, it (mostly) saves your entries etc. ;)

9863
System / Re: Better way to get sf::Keyboard:: codes
« on: August 24, 2012, 10:28:15 pm »
Sweet. Thanks. I'll try and figure out how to use cMake. I didn't have any luck with it when installing SFML, so I just download the already compiled versions.
There's quite a good official tutorial for that. ;)
If you have it figured out once it will be an easy and very usefull tool.

9864
General / Re: [SFML 2] Why this fail?
« on: August 24, 2012, 10:20:43 pm »
how i do that?
By having set release mode in your IDE and linking against the libraries with the '-d' postfix (e.g. sfml-graphics-d.lib) or having set debug mode and linking against the libraries without postfix (e.g. sfml-graphics.lib). ;)

9865
System / Re: Applying clock to movements
« on: August 24, 2012, 08:11:42 pm »
Use SFML 2.0 RC ?
Yes definitely! SFML 2 is way better than the 1.6 version.

Well most of the stuff is the same from 2.0 to 1.6, you can take a look at the official tutorials to understand how things work with SFML 1.6 (since you kind of do some strange things in that provided code snippet).
The only two 'bigger' differences are that sf::Keyboard has to be replaced with the sf::Input class (see tutorial) and that sf::Clock doesn't return a sf::Time object but a float.
Both documentations are online and you'll find all the needed symbols and names there. ;)

9866
System / Re: Applying clock to movements
« on: August 24, 2012, 07:35:30 am »
You can find there an example of a framrate based movement.

9867
Audio / Re: Access violation after program end
« on: August 24, 2012, 07:31:19 am »
Please reduce your code to a complete but minimal example the reproduces the error (e.g. a main function that holds a sf::Sound and crashes at the end).
What exacte version of SFML 2 are you using? What is the callstack when a crash happens?

9868
General / Re: sf::Seconds delay?
« on: August 24, 2012, 12:25:22 am »
Yeah, this was not the clearest explanation :P
True my over pronouncing was kind of missleading, but seriously read the documentation, I mean what's so hard to understand with the description "left", "top", "width" and "height"? ;)

9869
General / Re: sf::Seconds delay?
« on: August 24, 2012, 12:00:12 am »
Does who can read have a clear advantage... ;D

It's all written in the documentation and even the variable names tell what to pass in.
The first argument is for the (top) left coordinate of the sub-image, the second for the (left) top coordinate, the third is for the width of the sub-image (going from the specified left coordinate into the direction right) and the forth is for the height of the sub-image (going from the specified top coordinate into the direction down).

9870
General / Re: sf::Seconds delay?
« on: August 23, 2012, 11:37:34 pm »
Oh, quick question. With "sprite.setTextureRect(), the first two arguments are for the cords of the top left corner of the selection, correct? Or, you could just link me to the documentation, because I have a hard time finding the write page   :-[
Yes as described in the documentation. :D
Well you click on 'Classes' and then choose the one you want to inspect further and there you'll also find links to related classes etc. ;)

Pages: 1 ... 656 657 [658] 659 660 ... 720