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

Pages: [1]
1
Network / Re: Handling array's with sf::Packet?
« on: January 21, 2013, 12:34:24 pm »
Just as a quick test I tried overloading the first two elements instead of the whole array:
Code: [Select]
receivePacket >> lVec[0] >> lVec[1]
This gives the same error:
no match for 'operator>>' in 'receivePacket >> lVec[0]'

2
Network / Re: Handling array's with sf::Packet?
« on: January 21, 2013, 12:17:24 pm »
There's no overload for arrays, you have to insert all elements one by one.

The issue arises with the fact that the client doesn't know how many entries are in the array before it receives it. But I think I see what you mean? It be best to send several different vectors and such one at a time instead of grouped with sf::Packet?

Also the sorting/handling of packets gets mixed up as a packet is a packet and the client/server doesn't care which one it gets.

3
Network / Handling array's with sf::Packet?
« on: January 21, 2013, 11:55:58 am »

Client receive code:
Code: [Select]
    sf::Packet receivePacket;
    sf::IpAddress sender;
    unsigned short senderPort;

    if (socket.receive(receivePacket, sender, senderPort) != sf::Socket::Done)
        return;
    sf::Vector2i lVec[20];
    int lRot[20];
    sf::IpAddress lIP[20];
    if (receivePacket >> lVec >> lRot >> lIP);
        nextUpdateGame(lVec, lRot, lIP);

Error:
error: no match for 'operator>>' in 'receivePacket >> lVec'

Is this even possible? I'm banging my head against the wall trying to send 3 arrays from a SFML server:
Server code:
Code: [Select]
    sf::Packet net_send;
    net_send << pListVec << pListRot << pListIP;
    if (socket.send(net_send, pListIP[i], port) != sf::Socket::Done)
        return;

pListVec is a sf::Vector2i array.
pListRot is int array.
pListIP is sf::IpAddress array.

The server side of things is compiling properly but I'm having issues working out getting the clients to unpack these packets for use...

Any ideas?

Thanks in advance! ^^

As a note: This is all UDP networking. If you wish to see the rest for perspective, I'd be happy to upload but be warned... It isn't pretty as this is a 48h game jam project...




4
General / Re: Unsupported Architecture - Windows 8 CMake Configure issue
« on: January 21, 2013, 11:48:14 am »
Reinstalling CMake fixed this problem completely! Only thing I can think it could have been was a bad install?

Thanks for the suggestion.

5
General / Re: Unsupported Architecture - Windows 8 CMake Configure issue
« on: January 18, 2013, 10:32:20 pm »
Windows 8 Pro 64-bit
Running an Intel i5 750 2.67 quad-core


6
General / Re: Unsupported Architecture - Windows 8 CMake Configure issue
« on: January 18, 2013, 10:22:31 pm »
I've never used CMake before, let alone MinGW + CMake, so completely green at it.
CMake is 2.8.10.2
MinGW32 is 3.20
GCC is 4.7.2
GNU Make is 3.82.90

(Latest version of CMake in use.)

7
General / Unsupported Architecture - Windows 8 CMake Configure issue
« on: January 18, 2013, 09:44:55 pm »
Using SFML 2.0 Release Snapshot on the download page, I've followed the tutorial on building SFML 2.0 on windows with CMake.

Trouble is that the configure script doesn't seem to know my CPU architecture. (which is 64-bit)

Only thing I can think of that may have caused this is that I'm running Windows 8 and it may not build on Windows 8 yet?

Note: Using MinGW Makefiles option with MinGW installed.

CMake configure log:
Code: [Select]
The C compiler identification is GNU 4.7.2
The CXX compiler identification is GNU 4.7.2
Check for working C compiler: c:/MinGW/bin/gcc.exe
Check for working C compiler: c:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)


CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:83 (include):
  include could not find load file:

    C:/Users/Ethan/Documents/My Dropbox/Ajax Files/Ajax JAM #2/sfml2-build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)


Check for working CXX compiler: c:/MinGW/bin/g++.exe
Check for working CXX compiler: c:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at cmake/Config.cmake:14 (message):
  Unsupported architecture
Call Stack (most recent call first):
  CMakeLists.txt:20 (include)


Configuring incomplete, errors occurred!

Any ideas?

Pages: [1]
anything