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

Pages: [1]
1
General discussions / Some issues (SFML 1.5)
« on: November 22, 2009, 06:25:32 am »
Sorry, I know the workaround is not that useful for everyone, but I will try to help debug more soon ^-^

I tried replacing that function, but it behaved the same way.

2
General discussions / Some issues (SFML 1.5)
« on: November 21, 2009, 07:22:28 pm »
Hello!

I will be able to help debug these more soon.  So far, I have a workaround for the mouse issue.  In my source, I add:

Code: [Select]
#include <ApplicationServices/ApplicationServices.h>

And after the window is initialized, I call this:

Code: [Select]
CGAssociateMouseAndMouseCursorPosition(0);

And finally, I get mouse updates from this code:

Code: [Select]
CGMouseDelta dx, dy;
CGGetLastMouseDelta(&dx, &dy);


But this function only returns the delta since the last mouse event, so I have to reset the cursor to make sure we catch no mouse events...!  If I keep the reset mouse cursor, along with the above, the mouse moves as normal.

3
General discussions / Some issues (SFML 1.5)
« on: November 20, 2009, 03:28:03 pm »
Hi!  I am still new to SFML, but I have had a few problems.

1. Tilde, PrintScreen, ScrollLock, and NumLock all generate key code 0 on Linux and OSX.  On Windows, Tilde is okay.

2. Sound doesn't work at all in OSX 1.5 for me, on my PPC powerbook.  Specifically, sound files fail to load; the examples from this site fail in the exact same way.  This is the (only) message:

Failed to load sound buffer from file "sound.wav"

I tried debugging this, so I built debug versions of SFML, and it seems like it is failing inside libsndfile.  I am using the version of libsndfile from this site; when I downloaded libsndfile and built it myself, the examples included were able to load the same files.  However, I don't know how to build a .dylib, so I could not test or debug to find out why it was failing.

3. Since SFML lacks the "capture mouse" function of SDL, my game resets the mouse to the center of the window on every frame, then calculates the delta.  (I saw this suggested here on the forum.)  This works great on Linux and Windows.  However, on OSX, every time the mouse cursor position is reset, it (appears to) ignore all mouse movement for approx 0.25 seconds.  So, I cannot use the mouse at all on my program on OSX, unless the frame rate drops below 4 per second!

4. As posted elsewhere, my PS3 controller causes problems on Linux.  I have not really tried to debug this, apart from noticing it cause an infinite number of events, all of which are JoyMoved to 0 on one of two axes.  It does not cause this problem on Windows.

4
Oops.  I said open when I said closed, and vice versa?  Ah, it's been a while :-)

Thanks for your replies!  I see the [Begin, End] now.  I must have been looking at the summary "Get a random integer number in a given range." and/or the Tutorial, and not actually looked at the function documentation.  Or so I guess!

5
Hi,

This is minor.

To me it wasn't obvious whether Randomizer's range was inclusive of Begin and End, from reading the docs.  I intuitively expected it to be a half-open range, like in STL, so I expected it to include Begin and not End.

Since I didn't see it anywhere, I wrote a quick test program, and discovered that it is an open range and includes End.  If you could put that into the docs, it could save a bit of confusion with people and off-by-one errors down the road :-)

6
General / SFML Input not working when PS3 controller plugged in.
« on: November 16, 2009, 03:50:00 am »
Hi!

I'm developing with SFML on Linux and Windows.  The first thing I did was attempt to build and run a friend's project (two days ago, using SFML 1.5) on Linux, and I discovered this problem.

When I have a PS3 controller attached under Linux, the event loop never finishes.  It has an endless supply of events showing two of the axes are moving to zero.  When I place a call like this:

app.SetJoystickThreshold(2);

It fixes the problem.  (Setting it to 1 didn't work, I think.)

So, I put that in the startup of my project.  I can confirm that on Windows, the PS3 controller works fine without the above line though.

I can supply more details if you wish, though I am happy with my workaround personally.  I am on day two of making a game with SFML, and I'm loving it!  Long time SDL user here.

Pages: [1]
anything