New answers tagged multiplayer
Input prediction generally works as following: Client sends commands to Server AND runs the same code as the Server to predict its actions. Client stores a number of timestamped commands. Now in the same step: Client receives new state from server. Client (knows its latency) rolls back in time for [latency] seconds (undo commands relative to [latency] ...
Implement a "fake network" class that passes messages between threads, which has the same interface as the network class will have. Later you can elaborate the fake network to have random delays and packet loss. It will always be easier to debug network code with the fake class than with the real network.
This is definitely possible. You should look at the Android developer documentation for bluetooth (Ocelot has posted the link). At the minimum you will have to do this - Discover the devices Pairing and connecting devices One of the device needs to become server. It will open a socket and listen for connection. Other device(s) need to become client. ...
I'm in a similar situation, but I'm trying to do a networked simulation more than a game; but I think that my approach may help your design process. My approach is along the line of your comment on IPC (inter-process communication). First, as background I am studying the book "Networked Graphics" by Steed and Oliveira. This provides a good background on ...
If you're learning about all this stuff, why not write a simple single-player Version 1, and once that's working, with your deeper knowledge, rethink the whole thing in-depth for Version 2 that will be multi-player?
Without knowing more about the exact game you're writing, and how you're writing it, it is very difficult to say generic solutions to your problem. However, you may want to consider this decision you're taking of leaving the networking code to the end, depending on how crucial networking is for your game. What I mean is that, if you're writing a network ...
Top 50 recent answers are included