Server culture info

edited July 2010 in Photon Server
Hello,

I've been working very well with my current application, everything is working nice :)

However I have a strange issue with a mac which runs my application, the movement and directrions of the players is very erratic and works in a weird way,

My first thoght was that it was probably a culutre information problem, sincethat mac recieves float numbers in a different format than the other computer we have in our place.

However, I am sending and recieving floats between the client and server, so I don't know where to pinpoint the culture problem. Is it an application problem?
The photon application problem? Or maybe is something internal from photon that I cannot get into?

My question would be then, how does photon manage culture info when it sends and recieves formatted number, like floats and doubles?.

Notice that I am sendin and recieving floats, so I would expect to recieve a float already formated to how it should be... oh well I am really confused about what might it be...

Thanks a lot,

Italo F. Capasso B. AKA "Edwood Grant"

Comments

  • BorisBoris ✭✭
    The float data type is converted to bytes with the BitConverter class, the culture should not have any impact on it. Or do you use string parameters for your operations/events?
    Please try logging the sent and received values and compare if they are different.

    EDIT: which client lib do you use ??? Just noticed you had questions about flash.. my answer is just valid for the dotnet lib.
  • Hello,

    I am usign Unity and flash, each one for a different type of service.. its complicated :P
    This question is for the dotnet lib, i.e Unity client... I am really at a loss.

    It occurs only on certain types of macs (like, for example a macbook air). But in other works flawlessly
    I am however sending floats and recieveing floats... the floats tend to be very small, I have noticed that when I convert to string in windows, it shows scientific notation, but in mac it doesn't.

    You might be right and the culture might not have any impact, if i print string of those values, each ones show for example "5.25" and "5,25"... but that woudl mean that float arrives just right... maybe the problem is sending floats?

    I am starting to feel that the problem might be within unity and no in photon... its kinda coinfusing really :P

    Any light on the subject would be great :)

    Italo F. Capasso B. AKA "Edwood Grant"
  • sounds like the problem is not related to networking itself but to the fact that the macbook air is a magnitude slower on the graphics end than any other mac (its a gma900 / gma950, only old mac minis were that bad), leading to strange missbehavior just due to the fact that the calculation itself does not run at at a steady pace due to the rendering.

    the island demo, just to name one, is a massive hit for crap like the macbook air as the gpu is unable to hold up terrain + foliage + rest especially if you aren't on the free unity but the real one (they did a very good job at graphical scaling but that does not help if you hook in additional stuff that relies on steady updates and potentially an expected frequency for network message handling)
  • Hmm that sounds bad T_T

    The only thing I can think of right now is that I should convert every float to int, and then in unity divide by 100 or something :P.
    But i doesn't seem that to be even reasonable... but looks like I dont have any other choice :(.

    Anyone have any idea of related unity issues of this style? Maybe someone has encountered the same probem.. although very unlikely, but oh well... lets see what we can make out of it :P

    Italo F. Capasso B. AKA "Edwood Grant"
  • If that int trick would work, it would actually not be related to the graphics.
  • I have tested on a HP VIA C7-M 1.20ghz processor (Atom) with 1mb ram, Window vista basic 32 bit ... pretty much slow computer :P

    Actually the system runs so slow that i cannot tell if there is that "jump" that I have with the macbook air... but my feeling is that is actually running well, no weird jumps

    I grabbed a mac mini (MacOS 10.6.4) , and then played my application, same problem the macbook air... used boot camp to load windows, and no problem at all...

    I grabbed another mac, (MacOS 10.5.8) and works perfectly...

    I think there may be a problem with the mac OS version? Ill keep searching for an answer, but this could be a good hint...

    The MacBook Air has OS X 10.6.3

    Italo F. Capasso B. AKA "Edwood Grant"
  • I don't know much about Mac series: is the one a risc processor and the others are intel?
    If so, there might still be some issue between little and big endianess, even though we looked out for this in the newer versions.

    Btw: which versions of SDKs are you using?
  • nope they are all x86 macs.
  • So, Macbook Air and Mac Mini have the issue. Both are x86 machines, like the others.
    That sounds very weird.

    I think you should log the values you send on the originating client, the server and on any receiving client. To make sure it has to do with the values.
Sign In or Register to comment.