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

Pages: 1 2 [3] 4 5
31
Feature requests / Re: Image rotation
« on: April 10, 2012, 05:42:31 pm »
Couldn't you rotate a sprite and render it to an image?

32
General discussions / Re: New Release?
« on: April 07, 2012, 06:20:19 am »
I don't think Laurent likes to give definite time frames. It depends on how much time he has.

33
General discussions / New Release?
« on: April 06, 2012, 06:41:55 am »
Just wondering: what tasks must be completed before the next major version can be released?

Holding my breath for the full release! :D

34
General discussions / have fast moving sprites without distortion?
« on: March 09, 2012, 05:02:15 am »
Quote from: "Amelia"
It seems that the monitor can not redraw fast enough and the sprites seem to leave a trail a few pixels, as it's not cleaning the old sprite position


You are calling RenderWindow::Clear(), right? It doesn't clear automatically...

35
General discussions / Extremely important question for Friday
« on: February 03, 2012, 07:52:16 pm »
looks like...disk drives?

36
Network / how does a client find a computer running the server
« on: January 31, 2012, 04:03:04 am »
Yeah, it's good to provide a link, but only in addition to an answer. I see a lot of forums where someone asks for some information and he is bluntly told, "Try Google," or, "Check Wikipedia." That's just a way of saying, "You're stupid and I'm not going to help you."

I don't think that's what julen was trying to do, but I was just mentioning that it is more helpful for everyone who reads the post if a direct answer is given. After all, no one needs to be told how to look up a wikipedia article.

37
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 27, 2012, 05:26:01 pm »
Ok, thanks anyway.

38
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 27, 2012, 04:11:44 pm »
Would there be some way to fall back on that technique if the first one fails? And just return the first address it finds or something? Seems like that would be better than nothing, at least.

39
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 09:25:16 pm »
Okay, I googled around and found something that works.

Code: [Select]
#include <iostream>
#include <winsock.h>

int main(int argc, char** argv)
{
    WSAData wsaData;
    if( WSAStartup(MAKEWORD(1, 1), &wsaData) != 0 )
        return 1;
   
    char ac[80];
    if(gethostname(ac, sizeof(ac)) == SOCKET_ERROR)
    {
        cerr << "Error " << WSAGetLastError() <<
                " when getting local host name." << endl;
        return 1;
    }
   
    cout << "Host name is " << ac << "." << endl;
   
    struct hostent *phe = gethostbyname(ac);
    if(phe == 0)
    {
        cerr << "Bad host lookup." << endl;
        return 1;
    }
   
    for(int i = 0; phe->h_addr_list[i] != 0; ++i)
    {
        struct in_addr addr;
        memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr));
        cout << "Address " << i << ": " << inet_ntoa(addr) << endl;
    }
   
    WSACleanup();
   
    getchar();
    return 0;
}


(http://stackoverflow.com/questions/122208/get-the-ip-address-of-local-computer)

I don't know what WSA is, but this gives me the right address. It gives multiple addresses, though. Would it be possible to somehow incorporate this technique into SFML for those of us with weird network switches? :)

40
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 09:11:36 pm »
Oh well, thanks for the help, anyway. Please let me know if you find any other way I could get this to work. I will be researching it myself.

41
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 08:34:02 pm »
So how could I manually store the host address and port (what struct members I guess) to enable to skip the failing call?

EDIT: Hmm, it's not a struct, just a UINT_PTR. What is it really? a pointer to a sockaddr_in struct, perhaps?

42
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 07:39:41 pm »
Does it literally do nothing? If so, could I just comment out the call to connect? I think I will try that.

Edit: Well that didn't work. :/

I'm not good with networks...anyone have any suggestions for me?

43
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 06:22:07 pm »
Okay, so I think I found where the problem is.

In IpAddress IpAddress::GetLocalAddress(), it returns prematurely right here:

Code: [Select]
// Connect the socket to localhost on any port
sockaddr_in address = CreateAddress(ntohl(INADDR_LOOPBACK), 0);
if (connect(sock, reinterpret_cast<sockaddr*>(&address), sizeof(address)) == -1)
{
    priv::SocketImpl::Close(sock);
    return localAddress;
}


So it looks like it is not the fault of SFML. Anyone know exactly what the problem is?

EDIT: FYI, my system is Windows XP SP2

44
Network / how does a client find a computer running the server
« on: January 26, 2012, 05:24:58 am »
^ There's the answer I wanted to see! :D Thanks.

45
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 26, 2012, 04:08:52 am »
right now it's 169.254.40.22. But GetLocalAddress still thinks it's 0.0.0.0. Other computers can connect to it over the network, but I have to look up the address and type it in manually--SFML doesn't know what it is for some reason.

Pages: 1 2 [3] 4 5
anything