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

Pages: [1]
1
General / Compiling SFML 2.0
« on: December 02, 2011, 12:29:13 am »
Hi,
i'm trying to build sfml 2.0 ...
according to tutorial i generated CodeBlock project file, but when i open it and try to build i get this:

Code: [Select]

-------------- Clean: all in SFML ---------------

Cleaned "SFML - all"

-------------- Build: all in SFML ---------------

Using makefile: Makefile
[  1%]
Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.obj
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.obj
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.obj
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.obj
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.obj
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.obj
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.obj
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/MutexImpl.cpp.obj
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/Platform.cpp.obj
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.obj
[ 14%]
Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadLocalImpl.cpp.obj
Linking CXX shared library ..\..\..\lib\sfml-system-2.dll
mingw32-g++.exe: unrecognized option '-static-libstdc++'
Creating library file: ..\..\..\lib\libsfml-system.a
process_begin: CreateProcess((null), echo Built target sfml-system, ...) failed.
make (e=2): The system cannot find the file specified.
make.exe[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
make.exe: *** [all] Error 2
[ 14%]
Process terminated with status 2 (0 minutes, 4 seconds)
0 errors, 0 warnings
 

2
Network / my first network program
« on: September 13, 2010, 09:02:16 pm »
hey,
i want to make simple program that receives coordinates from client and sends them to other clients.
so far i've made this: http://www.failiem.lv/down.php?i=aofrvh&n=multi_graf.rar
can someone take a look at it?  :roll:

everything seams to be working fine if only one client is "connected"
that sprite who looks like shadow is player coords which are sent to server and received back..

BUT when 2 clients are active and moving, its starts to lag :?
Server log shows those received coordinates and the same are sent back, but client displays them later, because there are already dozens of coordinates waiting in line to be displayed.

What am I doing wrong?

and another question - how to statically link  libgcc_s_dw2-1.dll
i trayed  -static-libgcc but it doesn't work :/

3
Network / UDP and Selector
« on: September 07, 2010, 09:38:08 pm »
Hey, could someone please help and explain to me this example(..) and how to convert it for UDP?!
Code: [Select]

The loop from above...
{
    // Get the current socket
    sf::SocketTCP Socket = Selector.GetSocketReady(i);;

    if (Socket == Listener)
    {
        // If the listening socket is ready, it means that we can accept a new connection
        sf::IPAddress Address;
        sf::SocketTCP Client;
        Listener.Accept(Client, &Address);
        std::cout << "Client connected ! (" << Address << ")" << std::endl;

        // Add it to the selector
        Selector.Add(Client);
    }
    else
    {
        // Else, it is a client socket so we can read the data he sent
        sf::Packet Packet;
        if (Socket.Receive(Packet) == sf::Socket::Done)
        {
            // Extract the message and display it
            std::string Message;
            Packet >> Message;
            std::cout << "A client says : \"" << Message << "\"" << std::endl;
        }
        else
        {
            // Error : we'd better remove the socket from the selector
            Selector.Remove(Socket);
        }
    }
}

Pages: [1]
anything