quick question for racing game

I am hoping to use Photon with my racing game www.haulinazz.com as I integrate multiplayer. So far everything is going pretty well, the best part is it connects every single time.

What I'm not sure of is the display of open rooms. When players join a game and the room is full, then the race starts. The trouble I'm having is if one player exits the race early, that leaves a open slot that somebody else may accidentally join a race that is 1/2 way finished.

I'm guessing its something I need to change in the core program?

Thanks,

Ron

Comments

  • yes, you have to modify the server OR you can set a room property indicating that the race has started and then have the game client quit.
  • So far, this isn't exposed in the API in Photon Unity Networking but you could "close" a room (noone can join while closed) and make it "invisible" (not listed in lobby while invisible). The logic is in the server, so it should be a small change to PhotonNetwork.cs.

    If you're still looking for this, I might be able to assemble the code for you.
  • Any help would be greatly appreciated. Everything I have tried seems to come up empty handed :D

    - tried to close the room after 2nd player joins but it still shows up as joinable after a player leaves
    - tried to make the room invisible after 2nd player joins but still the same
    - tried to reduce the max players by one if a player leaves
    - tried adding a prefix to room names after its full but that only seems to effect the local machine
    - tried modifying the photonnetwork and networkingpeer files, but couldn't get anything to go
    - tried instead to make my pre race screen a room in itself and listing players as available games and then when a race starts, both players join the same room. The trouble I have there is I cannot directly join a room from a room, have to leave first. But then you must need a delay and allow time to join another room

    I would imagine it would be pretty useful for alot of games where you want everyone to start the game at the same time and not have other players joining half way through
  • We updated the asset store package to v1.2 and this contains more room features. You can create it with a player limit (maxPlayer), hide it or close it (no matter how full the room is or if it's visible).

    Let us know if that fits your needs.
  • Thank you very much. Just saw this post today, been working on the game code so much haven't had alot of time lol.

    Bought my license earlier this week (Indie). Its the one from sales at virtualengine 2000 dot come (thats my only paypal address, don't have one for my game).

    Here is my work in progress http://www.haulinazz.com/Online/HaulinAzz2D.html

    I have not links to or out from on my other website pages yet, only posted on one racing forum and have 1500 sign ups and always keep bumping the 100 player free ccu limit lol.

    The rest of this week and weekend going to put my new license in and figure out a little better way to implement the networking (and the new room feature). Right now I have the client sending keys and master client returning position and velocities for both players to the client. Seems to work ok but the non master client can get alot of lag.

    Going through documentation now, learn more and figure out new better way to do it. Thanks for a great product, really look forward to when I finish my game.

    BTW - what sold me is I like the fact anybody can connect every single time and I don't have to worry about figuring out everybody's ip address, nat punch through etc. This allows me to spend more time developing my game instead of loosing so much time figuring out the networking
  • Cool game! Looking forward to see it go through the roof with players! :D

    If you sync the keys, usually the server is the best place to have them synced and forwarded to everyone. You shave off some lag.
    I assume you are using Photon Unity Networking and in that case, it's sadly some more work for you to get the key-syncing done on the server. Right now it doesn't have the code framework to make use of what PUN is sending.

    Let us and the community know if you want input!
    I don't have to worry about figuring out everybody's ip address, nat punch through etc.
    It's sad that you usually have to go through all this, to believe how much hassle a dedicated server can save - for the developer and the customers.
    It's good to read how well it's working for you. Thanks for the feedback :)
Sign In or Register to comment.