Mike Halliday
08-11-2008, 08:27 PM
Hi Guys,
I have been playing with socket communications to see how easy they really are (for 2 player remote games etc)
The archives contains 2 .exe files (Client.exe and Server.exe) 1 config file and 2 sprites.
See if you get any results with this please and report back to me so I can continue testing and see if my coding works (probably not! ha ha)
This must be run on 2 seperate machines on a local network, or in a virtual session!
Change both config.txt to match the IP of the server machine - you can change the port too, but I get good results using the default. (The IP must be the same as the server uses it for config info and the client for connection info)
Put Server.exe, 2.bmp and config.txt in the same folder on 1 machine and run the exe
Put Client.exe, 1.bmp and config.txt in the same folder on another machine and run the exe
Once the connection is made on the client you should be able to click and move the mouse. The red ball should follow the cursor on the client screen, but also at the same time the dark coloured ball should match the movement on the server screen.
On my test system it is a bit erratic, but then again I am remotely controlling the lan server via the internet while running the client on the local lan - so thats probably why.
Its the principle I want to test and not the actual coding. - My code is documented so if I get confirmation that it works in part, I will include it on the forum or in a newsletter tutorial as I know there have been a few questions on socket programming in the past.
Ta.
Mike.
(A small point for Alain to consider. It won't let me upload a .zip file bigger than 481Kb - this makes it difficult to upload PPL creations even when compiled with the compact runtimes)
I have been playing with socket communications to see how easy they really are (for 2 player remote games etc)
The archives contains 2 .exe files (Client.exe and Server.exe) 1 config file and 2 sprites.
See if you get any results with this please and report back to me so I can continue testing and see if my coding works (probably not! ha ha)
This must be run on 2 seperate machines on a local network, or in a virtual session!
Change both config.txt to match the IP of the server machine - you can change the port too, but I get good results using the default. (The IP must be the same as the server uses it for config info and the client for connection info)
Put Server.exe, 2.bmp and config.txt in the same folder on 1 machine and run the exe
Put Client.exe, 1.bmp and config.txt in the same folder on another machine and run the exe
Once the connection is made on the client you should be able to click and move the mouse. The red ball should follow the cursor on the client screen, but also at the same time the dark coloured ball should match the movement on the server screen.
On my test system it is a bit erratic, but then again I am remotely controlling the lan server via the internet while running the client on the local lan - so thats probably why.
Its the principle I want to test and not the actual coding. - My code is documented so if I get confirmation that it works in part, I will include it on the forum or in a newsletter tutorial as I know there have been a few questions on socket programming in the past.
Ta.
Mike.
(A small point for Alain to consider. It won't let me upload a .zip file bigger than 481Kb - this makes it difficult to upload PPL creations even when compiled with the compact runtimes)