How to used NetworkBehavior in Unity3D - networking

Check the Picture- Image Here
I made a c# script then change the MonoBehavior to NetworkBehavior
then pud the script in the Main Camera.
I have problem using NetworkBehavior I dont know how to execute it, I want to try the SyncVar and other attributes that can help about server-client data networking.
thanks.

It is difficult to tell what is going on from you picture, and it would be helpful if you could tell us exactly what you are looking for, but as far as SyncVar working, it is important to note that it only works from the server side. That is, you can't sync an attribute from a remote player to the server, but the server can sync a player's attribute to everyone else. another thing to note about sync var is that it only works on basic types and unity math types (quaternion, vector3, etc.) if I recall correctly. If you need more help please try to be more specific.

Related

Gamelift Matchmaking times out after match found

Hoping to get some insight into the behavior I am seeing while trying to use GameLift Matchmaking.
I have my configuration setup as such that it does not require player acceptance, as such:
GameLiftMatchmakingConfiguration:
Type: AWS::GameLift::MatchmakingConfiguration
Properties:
AcceptanceRequired: false
...
When I go to the GameLift console and into the configuration I see that it was correctly set as well that it does not require acceptance.
This is where I am confused, because now I have it working where it places 2 users in PotentialMatchCreated and I get this event from GameLift. Then 30 seconds later, I get more events stating that these placements timed out and searching again.
The configuration documentation states that AcceptanceTimeoutSeconds is only required if AcceptanceRequired is true, which it is not for me.
the acceptance documentation states that you only call this When FlexMatch builds a match, all the matchmaking tickets involved in the proposed match are placed into status REQUIRES_ACCEPTANCE
Which its not, its in PotentialMatchCreated.
So my question is, what do I have to do to confirm a placement once GameLift places 2 users into a match? I am a bit surprised because I thought that the fact that it doesn't have to be accepted would mean that its automatically accepted match.
Also theres very little documentation I found regarding what to do in this situation, given the nature of this service not being as known as others I totally expected that but really hoping someone can help me on what to do next.
Any insight or help is greatly appreciated.
UPDATE1:
Additional information: I do not need to utilize GameLift fleets or builds at all. We have a browser game we are building and just want to utilize the matchmaking feature. So we dont have any game servers or anything like that, its just on our website where they would play the game and use our api's/websockets that puts the matchmaking on the server and notify the client when a match has been found with all the subsequent details.
UPDATE2:
To confirm my suspicions I decided to actually try to use the accept match endpoint and see what happens. Just as the documentation states, you can only accept a match if it requires acceptance. I get an error stating that I cannot accept a match that is not in REQUIRE_ACCEPTANCE state. Guessing this is a bug on AWS's side, I don't see any other endpoints that I can hit for being in state PotentialMatchCreated.
Figured out the issue. It has to do with the FlexModeMatch on the GameLiftMatchmakingConfiguration. For my use case, just needing matchmaking, STANDALONE is the correct implementation because we aren't having GameLift actually create game servers/sessions for us. I had mine using WITH_QUEUE which is why I believe I was having issues. Seemingly working correctly now.

Editing the cooldowns of spells and spell like effects

I am trying to reduce the cooldown on the hearthstone and inscription research spell-like effects. I have identified the hearthstone item template and imported the hearthstone spell into spell_dbc. I have set the spell category cooldown to 1 second, but I am experiencing a strange issue. On use, the hearthstone is set to a 30-minute cooldown and not useable during this cooldown, but on logging out and logging back in, the correct cooldown is displayed and the item is useable once the cooldown has expired. I suspect that the client is tracking the cooldown of the hearthstone independently of the server. But I have no clue where to begin looking to fix this. Has anybody successfully made a change to spell cooldowns, and would you be willing to point me in the right direction?
Thank you!
Not a solution to your problem, but I'm pretty sure that what you are experiencing is actually an intended behavior to discourage hacking.
I think what is really going on is your login credentials are being used to create a secret that is then passed into the rest of their program, which is then used as a reference point for debugging.
Because they know the intended behavior of their own game, they can check to see if the results of arguments sent from your machine are within expected parameters.
And because your modifications fall outside of those parameters, what the developers decided to do was to change the cooldown to something sufficiently annoying to detect who keeps on manually logging out and logging back in again.
I studied programming in college, and I'm telling you that if you know enough to change the cooldowns locally, you should try doing something more productive. Either find another game to play at the same time, or just do something completely different from gaming altogether.
Hope somebody double checks what I have said here for accuracy, because I am curious to know if I am correct about my assessment.
The solution is to delete the client cache.

Is there way to be absolutely sure that access came from QR code scan? [duplicate]

I have this project where I need to know if a visitor legitimately arrived from a QR code. Document.referrer value from a QR code shows blank. I have looked at some answers suggesting to put parameter in the query string (e.g. ?source=qr), but anyone could easily add the parameter into the URL and my code would believe it is from a QR code (e.g. www.project.com/check.page?source=qr) . I have thought of adding codes to make sure it is from a mobile phone / tablet as secondary way to authenticate but many browsers have add-ons to fool websites.
Any suggestions would be greatly appreciated.
Thanks in advance.
I think the best solution for you is creating your regional QR Codes pointing to:
Region 1) http://example.com/?qr=f61060194c9c6763bb63385782aa216f
Region 2) http://example.com/?qr=731417b947aa548528344fab8e0f29b6
Region 3) http://example.com/?qr=df189e7f7c8b89edd05ccc6aec36c36d
if the value of the parameter qr is anything other than f61060194c9c6763bb63385782aa216f, 731417b947aa548528344fab8e0f29b6 or df189e7f7c8b89edd05ccc6aec36c36d, then you can ignore it and assume the user didn't come from any QR Code.
Of course, any user can remove the source parameter. But at least he can't add a valid one, unless he really had access to the code.
...but anyone could easily add the parameter into the URL and my code would believe it is from a QR code
Well, anyone could also scan the QR code, view the link, and remove the source=qr from it.
Data collection is never 100% reliable. Users can change their browser's user agent, inject cookies with some strange values, open your page through a proxy server, and so on.
You could create your own device or App for scanning the QR-code. If you read the post I've linked, you will see that this is a waste of time and resources.
So, what is left is to make a solution which will work for most of the users. Appending a source=qr parameter to your URL seems to be the simplest solution. You could also link to an entirely different domain and redirect the request, so it would be more fraud-safe. But it will never be 100% accurate.

ATMEL SAMB11/BTLC1000 simple GAP/GATT example

I hope someone could give me a quick example how to configure the BTLE-Device correctly without the huge BLE-Manager library. Simply a litte GAP Authetication and one GATT-Service would be enough to start. I've managed to create my own GATT-Service and characteristics without the need for BLE-Manager but thanks to several defines, typedefs etc. I can't figure out how to do this for GAP and how to register my callbacks for it. Maybe someone has used these modules before and can give me a quick example how it's done?
Since you mentioned One GATT-Service with Authentication Atmel-BAS [Battery Service] example is easy one. To better understand you can download the getting started guide see the architecture. In-order to register the callbacks you need to check the order of callbacks in function ble_event_manager in ble_manager.c file.

how to handle download request from a WebView using WebResourceRequestFilter blackberry Cascades

i want to handle any download request coming from Webview. how it is possible ? the documentation https://developer.blackberry.com/native/reference/cascades/bb__cascades__webresourcerequestfilter.html and https://developer.blackberry.com/native/reference/cascades/bb__cascades__webdownloadrequest.html are describing the parameters but couldn't figure out how to do it.
Your question is not clear on what you don't understand. Remember this is not a training forum, the idea is that you should try things, review the documentation and then ask specific questions to get the best out of a forum.
Moreover it is not clear whether you are trying to handle the download request at the Server, or capture the request before the download attempt leaves the BB.
I'm going to assume you want to display a web page on the BlackBerry but make sure that any resource requests that the page generates, are filtered by your program, so that you can supply the data (assuming you have it).
I implemented something like this a while ago and remember that it was not simple to figure out what was going on, but I played with it a bit and it all made sense.
I don't remember using WebDownloadRequest and can't really see how it helps in this case.
The key is WebResourceRequestFilter. You create your own WebResourceRequestFilter making sure you implement the required methods. Then you use WebPage::setNetworkResourceRequestFilter(WebResourceRequestFilter*) to make sure the webpage will ask your WebResourceRequestFilter for its resources. The first method the web page invokes is filterResourceRequest(), and the return from this invocation determines which other methods in your WebResourceRequestFilter, the Webage will invoke.
I suggest you implement a WebResourceRequestFilter, put some debugging in filterResourceRequest(), but always return FilterAction Accept, which means the web page will use its normal processing to obtain the resources. Then try various other FilterAction return values and see what happens...

Resources