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.


Topics - pwnstar23

Pages: [1]
1
I found that Mouse::getPosition() returns window space, you can subtract window.getPosition() but its off by the boarders of the window I think.  How to get this right?

2
Graphics / SFML2 nightly how to flip a Sprites Texture?
« on: December 29, 2012, 01:07:38 am »
What is the proper way to flip a sprites texture without moving the sprite?

I have a single texture, and two sprites that reference it.

I want one of these sprites to display the texture flipped.  This is so it looks like they connect when placed together.

Edit I mean flipped on the Y axis.

3
Is it safe to use the classes that you use to instance things like Sound and Sprite?  Of course you don't want to with the Texture and SoundBuffer classes.

I am using them in std::vector and I know that from time to time vector will move them around, and when I want to erase one, i swap it with the last one then pop_back() the last one, is this going to cause trouble?

Second issue that maybe related to the first.

I have a std::vector<Sound>, when ever i want to play a new sound like a laser shot, i create a Sound and use the laser sound buffer to construct the sound.  Then I call push back it into the vector and then use back().play().

I a loop to check the status and if the status of one of these sounds is stopped then I swap it with the last one then pop_back() to remove it. 

However occasionally one of the sounds doesn't play when it should and sometimes one seems to get cut off.  Is the use of vector messing them up or something else my problem?

4
General discussions / SFML 2.0 nightly is very good.
« on: December 22, 2012, 05:48:42 am »
I've just picked up SFML today for the first time, with barely glancing at the docs I was able to get a working space invaders prototype game done in a day.  Using the Dec 17th nightly for VS11.  Everything was right where I expected it to be in the OOP style, and everything I did worked great and was very easy to work with.  Thank you for the hard work that has gone into this, and the free, even for commercial license!   ;)

Pages: [1]
anything