We're currently looking at doing a multi-player game with Edge. Can someone give me an overview of the recommended method?
Can multi-player be implemented over GPRS?
For multiplayer we recommend adding both Bluetooth and TCP/IP (wifi) as an option for connecting multiple players. This will enable a large amount of people to enjoy your multiplayer game. It depends on the type game if you like to support 2 or more players. Connections are based on a client-server type model. GPRS is a bit tricky, because most operators block certain ports and connections. Also, the IP-address of each player changes with each GPRS session. You might want to try to connect through TCP/IP port 80, or use HTTP.
For Quartz 2 we've added a menu option to set the connection type. When connecting through Bluetooth, the player is able to detect other players more easily. When using TCP/IP, the player needs to enter an IP-address of another player he wish to play with. It's recommended to show the IP-address in the multiplayer menu, and save a list of recent IP-addresses the player has been connected to.
When handling multiplayer in-game you can send network data on certain events, or on certain time periods. Try to calculate the amount of data that will be sent each second. Keep it as low as possible, and let clients handle certain things on their own (like particles). Try to stay below 10KB per second.
In Quartz 2 the server and each client remembers the grid of 4 players (including themselves). When a player drops a stone, it sends a network event. The animation of falling stones is handled by the client. It also sends events when a player has won, or someone needs to pause (for example when a call comes in). The player sends an event to the server, and the server passes the event to the other players. The server determines the winning player.
Tell me if you like to hear more.
amount of data that will be sent each second.
I'd like to hear more... Especially concerning the use in an action style game. Can I send 10 updates per second if the byte count is low?
Thanks for the info. Just to clarify a bit, when you are talking multi-player with Bluetooth are you talking me playing you across the room, or me playing with you across the world?
Or does that need to be WiFi and TCP/IP?
Bluetooth would be across the room, within range of each other-- think of a wireless link cable. TCP/IP would allow worldwide multiplayer. A bluetooth modem would count as the latter.
@sponge
Yeah, I know what Bluetooth is and all that. I was just wondering if Edge has some built in functionality for playing across the web via bluetooth while connected to the desktop.
By the way I'm in CT too, where you at?
With Bluetooth you can only connect with devices within a range of 10 metres (Bluetooth 2+ will be able to support a larger distance of up to 100 metres). It might be possible to create a hybrid server which serves 2 connections (Bluetooth and TCP/IP), for example on a desktop PC. On most Pocket PC's with the WidComm Bluetooth stack (almost all Bluetooth-enabled Pocket PC's with Windows Mobile 2003SE) it's also possible to set up a personal TCP/IP network through Bluetooth. This needs to be done by each player within the network configuration screen on Windows.
When using network connections in action games, lag can be an issue (for example, with Wifi we even had lag of 2 seconds incidently). It's better to send a larger amount of data, less times per second then a small amount of data more times per second. Sending data 4 times per second should be more than enough (especially in combination with sending data on certain events).