Do there any dev who wrote iPhone wifi/bluetooth multiplay before?
do there any dev who wrote iPhone wifi/bluetooth multiplay before?
Recently, I'm trying to make my latest game Doodle Kart to have mulityplay via bluetooth. But I found that there are hugh data need to share between the 2 devices.
-your car's position and direction -your car's status(it is in normal state, it is hitting by bullet, it is falling into to hole....) -CUP car's position, dicretion, and their status -item开发者_开发问答s position and status (pencil, bullet...)
I'm thinking about one device calculate all the things, and the other device just wait and receive the data to display on the screen. Does it make sense?
Hey, I should ask you the most important question first: Do you think it's possible to make bluetooth multiplay work on my game? It's just too much data need to share between the device.
Usually Multiplayer Games just share "events", like:
- Player begins to turn left/right.
- Player begins to accelerate.
- Player shoots from x/y/z to direction x/y/z.
- Item spawns at x/y/z.
- Player aquires item.
The other parts just calculate the rest themselves as if everything would happen for them. This reduces the data needed to transmit but requires periodic "full updates" that sync the game state again (i.e. every 10 seconds).
In short:
Transfer actions, not data.
精彩评论