get steamusers id playing on a server - server

Hi Im looking for away to get all steamusers connect to a gameserver either by asking directly the game server or through the steam network
-i know A2S_PLAYER but dont give back the Steam id so players with same name are a problem
-the steam client page recent played with shows all players but to get this information u have to log into the server + its very slow refreshed sometimes but maybe is it possible with api´s like steamkit2 to make it faster ?
So can someone help me here by give me some information about steamkit or maybe a other solution for my question?

Related

Automatically make changes to a github file

I’ve Made an app whith a whitelist, the withelist is on a github repo ( with just one file that is the withelist ), Each time that a user that downloads my app want to be allowed to use the app has to send me a message for be inserted in the white list. Right now this process is really slow and I want to speed it up but I’m trying to figure out how. I’m sesrching a way for
Let the users send me a message
Read the message ( with a bot or something that automate this process )
Make the bot add the user to the whitelist
I’m having some troubles to find a ‘free’ way for do it. The first ideas that came in my mind were to do it with a discord server or a Telegram group, but i didn’t find something for make the bot able to commit changes to a github file. Another problem would be that this messages are readable by all the users becouse are sent in a discord/telegram group and I want to keep them private. There is some simpler ways for do something like this?

Connecting a device to an account

So the title sounds stupid. I'm not really sure how to really word it, but I want someone to help guide me on what to look for. Little back story first so I'm working on a Raspberry Pi project that involves using an LTE service currently I have a dashboard running on a AWS EC2 web server with a simple user working user login.
I have a raspberry pi that is directly pointed to the dashboard/account via an IP address. I want to know how to do something like giving a device an ID and having it connect to an account. So for example with Nest products you have the QR code on the camera you take a photo and that devices get applied to your account.
Is this even possible with Raspberry Pi(I'm sure anything possible, but is it feasible? If so what should I look into or learn how to do such thing. I know its not something that can be answered in a short paragraph just looking for some guidance.
Right, thanks. Well, I think you need to program this into the pi server app. So currently your Pi is reading a sensor and sending this data to the web server, right? I suppose you have a daemon running, taking readings, and doing an API REST call to the server backend, correct? So what you want is to have a unique code for each pi, sent with the API call, and then on your DB server side,you store all readings related to their unique code.
You don't need to pre-validate this code, there are GUID generators that will create a number for you, guaranteed to be unique for all eternity, so on the PI, you set it up once, to create the PI's code, and use it from then on. Now, server side, then associating a device with a user is a matter of choosing the data associated with a given gui. And I think that covers it.
You can improve on this basic idea by giving it more thought, but I think it's a good starting point! Do let me know if I can help you with anything else!

Change value after period of time in Firebase

I have a lobby in which I want the users to be in sync. So when a user turns off his internet while the app is running, he should be removed. I know Firebase does not support server side coding, so the coding needs to be client side. The answers from How to delete firebase data after "n" days and Delete firebase data older than 2 hours do not answer this question since they expect that the user is online and they have an internet connection. So my question is if is possible to delete users when they got no internet? I thought maybe it is an idea to let the users update a value every 5 seconds, and when that update is not done, the other users in that lobby remove the player. This way is not good, since every player needs to retrieve and upload alot of data every 5 seconds. What is the best way to solve this?
Edit: to make it short, lets say each user has an image. The image should be green when the user is connected, and grey when disconnected.
Edit 2: after thinking it over, it is really hard to accurate present the connected users on a client-side server. That is why, if nobody has a different solution, I should add another server which can execute server-side codes. Because of the larges amount of servers, I would like to know which server I should use. The server should run a simple function which only checks if the users are connected or disconnected and can communicate with Firebase. If I am correct it should look like this:
But the server also needs to communicate with the users directly. I have absoluty no idea where to start.
If I'm not completely wrong, you should be able to use onDisconnect.
From the Firebase, documentation:
How onDisconnect:Works:
When an onDisconnect() operation is established, it lives on the Firebase Realtime Database server. The server checks security to make sure the user can perform the write event requested, and informs the client if it is invalid. The server then monitors the connection. If at any point it times out, or is actively closed by the client, the server checks security a second time (to make sure the operation is still valid) and then invokes the event.
In app in production I'm using onDisconnectRemoveValue, and when I close the app, the user removes himself from the lobby. Not sure how it works when you turn the device in airplane mode, but from the documentation it seems there should be no problem.
One thing: when you test it better do it on real device, the simulator have issues with turning it off and on, at least the on I have installed.
Edit: So i checked the onDisconnect when you put the device on airplane mode and it works! The question is, that it removes the user in about a 1:30 min, approximately, so if you read the documentation or ask the support, you may be (and only may be) able to find a way to set the time you want.

networkView ViewID RPC in UNITY

I'm new to unity, I thought it was going to be a piece of cake, but now I'm thinking I bit off more than I can chew.
I'm trying to make an authoritative server game, where the client players send their desired movements to the server, then the server sends back to all clients, the actual movement position information.
When a client connects to the server, the server uses RPC calls to create the player objects on all of the clients. In the player script Awake() function, I create a NetworkView object, and attach it to the player object dynamically for synchronization. So all player clients are doing this as each new player connects to the game server, so everybody can see everybody else.
The problem I have is when the player client wants to move, the client tries to do RPC call to the server using the dynamically attached NetworkView, to send the desired movements, but the RPC call fails, giving an error on the SERVER (not the client), that the server cant find the NetworkViewID.
My code didn't print this error, so I guess it must be code deep inside unity that printed it when it received the RPC message from a client, and tried to match it up with a corresponding NetworkViewID on the server, when it could not, it printed the error?
I'm just wondering how unity works.... does object "A" on all clients and server have the same NetworkViewID, and object "B" on all clients and servers have the same ID (but different ID from "A")?
If so, how do NetworkView objects that are instantiated on clients and server know which ID to assign themselves so they all match up when this is being done on different computers over the network? Is this done automatically by unity, or do I have to send the ID myself to all NetworkView objects?? But I cant talk to the objects to tell them which ID to use, since I dont know the NetworkID in the first place, since that is apparently needed to talk to the NetworkView objects! Its like trying to ask someone their name, but you need their name in order to ask them. So that cant be how it works.
My problem is that at first, the player object has no NetworkView on it. After the object is created, the script on player object dynamically attaches a NetworkView. Since this is done on all clients, and on the server almost at the same time, how will they all know to assign the same ID to the same objects, so that they can RPC each other?
Also I read somewhere that the "owner ID" is always zero?
Sorry I'm new to unity, and trying to figure it all out. Can anyone give me the inside scoop on all this?

Send server information to client

Last semester we had to develop the game Ludo in JavaScript and HTML/CSS. That was pretty easy. Now we have to develop a backend with GWT (Java) to create a multiplayer game. Sadly, we haven’t got much information on how to develop with GWT and the exercise is quite difficult at the beginning.
At the moment I am trying to create a kind of lobby where different players can join.
My idea was to use some input fields, where the player could enter his name and join the lobby. But I don’t know how to give the other clients the information that a new player has joined.
I created an asynchronous interfaces (RPC) where a player could submit his name to the server (Like this example). This works ok. But how should I share this information? Our docent said we should use JSON to share information’s, but I don’t know how this should help in this situation.
Is there a way to send information’s to the clients? I read a lot and just find to use additional libraries as gwt-comet.
I have really now clue how I could go on. I’m thankful for every help and information!
Greetz
You have two options: push and pull.
"Pull" option:
Other players get required information when they join the lobby and/or do something else. You can also schedule to pull this information periodically (like once every 10 minutes). You can use the same RPC mechanism to get data from server to a client. "Pull" means that a client initiates the request and server responds with the information.
"Push" option:
When a new player joins, the server pushes this new data to all other players. The best solution depends on your game implementation. Comet is a good option, as Jean-Michel mentioned, but it's more complicated and "expensive" from resources point of view. You should use this option if you need real-time status updates for your game.
I would suggest Errai and ErraiBus in particular. From Java perspective you are only sending some events via event bus (observer GoF pattern) and all the magic with Ajax Push is happening behind the scenes.