As promised, here’s whats happening. The name of the game when it comes to soccer mode is synchronization. When a goal is scored, one client has to register the goal, update the score data, and send it to all the other clients. When a new player joins, they also need the score data. My first method of acheiving this didn’t work at all - saving the score directly to the room data. Instead I’ve manualy scripted in all the score behavior. The only major thing left before release is syncing the ball position. After the scene resets the ball tends to roll around when in reality its completely still - The problem here is that the position data is only automaticaly sent when the ball moves. As soon as someone runs into it its fine again, but its graphically in the wrong place on all clients but one. I’ll most likely be able to fix this next time I find time to work on the game. With any luck, I’ll be able to release then also.
So that’s all the mission critical stuff, but life is in the details, right?
Web Player streaming mode - The main menu will be displayed as soon as its ready, without waiting for the other scenes to load. The current version takes roughly 20 seconds to load; In all future updates (including the next one) You should be able to start playing in less than a second. (I’ve tested it, Its pretty cool.)
When joining a soccer game room, you aren’t immediatly placed in the game. This lets you spectate the game, with a chat window to talk with other spectators and players. The button to join the game as a tractor and mash things is in the upper left hand corner.
As of right now, Players will be joined into the team with the smallest player count. If the player count is tied, then incoming players will join the team with the lower score. If both these are tied, incoming players will join the blue team. As of now, there isn’t any real way to trade places. It would be simple to add, but difficult to test and there are more important things.
On the off chance that you manage to hit the ball out of the park, there is a simple script that will put it back for you and say something in the chat.
On the off chance that a player is hit out of the park, Hope someone scores soon, as that is what will reset your position. Untill then It’s just you and the open air.
In the far future I hope to implement some more interaction with the chat window (Player X Joined the Red team!) (Blue team Score!) and a handy Unity3d feature called PlayerPrefs - This will allow the game to save your username and options settings, and automatically put them back in the next time you join.
Green team goal,
~Navi
2 comments