Jan-05-2019, 01:27 PM
I'm not sure what is not understandable with "server". For me a server is a server. I don't know how to explain that better, but i'll give it a try:
So the server i have, hosted on my own pc for now, has to become a login server for clients( made in gamemaker).
People can registrate on my website to create an account. The client can use that account to login on the server, that will verify that account. Account data is stored in the database.
I also want to add some extra features to the server, like a chatbox, friendlist. More important, i also want to be able to use commands (self made commands) in the console. But to read some input from the console i usually use input(). Alas input() is also blocking, so the server freezes all activity untill it gets that input(). Ofcourse i do not want it to freeze. I create a new thread for each client, wich works fine (i think), i also create a thread for the server itself (for sending commands or if sending customized messages)but then again input() just freezes the whole program. So here i am to ask advice or an alternative solution to be able to read input without freezing the whole program.
I am used to program in gamemaker studio 2 (GMS2), GMS2 has a builtin variable "keyboard_string". This variable returns keyboard input and you can reset it or empty it just by doing keyboard_string = "" Simple as that. I couldn't find anything like that in python. I googled alot but i can only find amazing complex solutions wich do not work either (or i'm doing something wrong)
I hope it is understandable now
So the server i have, hosted on my own pc for now, has to become a login server for clients( made in gamemaker).
People can registrate on my website to create an account. The client can use that account to login on the server, that will verify that account. Account data is stored in the database.
I also want to add some extra features to the server, like a chatbox, friendlist. More important, i also want to be able to use commands (self made commands) in the console. But to read some input from the console i usually use input(). Alas input() is also blocking, so the server freezes all activity untill it gets that input(). Ofcourse i do not want it to freeze. I create a new thread for each client, wich works fine (i think), i also create a thread for the server itself (for sending commands or if sending customized messages)but then again input() just freezes the whole program. So here i am to ask advice or an alternative solution to be able to read input without freezing the whole program.
I am used to program in gamemaker studio 2 (GMS2), GMS2 has a builtin variable "keyboard_string". This variable returns keyboard input and you can reset it or empty it just by doing keyboard_string = "" Simple as that. I couldn't find anything like that in python. I googled alot but i can only find amazing complex solutions wich do not work either (or i'm doing something wrong)
I hope it is understandable now