I’m currently trying to set up a client in Blender to connect to a java server, for now I just want to make a simple file that will output a string on the server when I click on an object, is there a way of doing this? The server and client would be on the same machine (for now anyway).
This is the first step in a project i am doing to control a character in my game using arrow keys built on an app on an android tablet with a long term view of sending screenshots of the game at certain points during gameplay through the server back to the android device.
Click on object = mouse over sensor + mouse button
Trigger a python controller whose Python code opens a socket connection to the server, sends your string and closes the connection.
The problem I’m having is opening the client in blender, not so much clicking on an object, I already have a java server that I want to connect and I have a python client that I can connect to that server but can I implement that client into blender somehow?
Sure you can use the normal python utilities to do that. Look for “python” and “socket”.
There are also a number of threads on this forum with code for making socket connections in the BGE. Try searching this forum for “networking”, “UPD”, “TCP”, “socket” etc.