We are developing a small network game for four players. The concept is a basic shooting game, lot of enemies attack the players and they need to defend.
Since everything is on the same place we need the replication to be perfect. First we tried simple variable replication which led to network lag (even though we set 20-40-90 net update frequencies, the visible replication was around 2 times per seconds at most!!!).
Then we tried rep notify with the same result. We ended up using RPC-s to replicate our variables. Without setting the multicast function to reliable we got the same results. But afterwards we could solve our issues with reliable multicast calls, and lets say it makes perfect sense that we need every event to be reliable since they happen in the same area. The problem with this is when we use a lot of rpc-s, it makes the reliable event buffer overflow causing the rpc calls to drop, eventually making the game unplayable.
My question is what technique should we use in order to replicate all the variables, movements and events trustfully without having these network lag and buffer overflow issues?
Any of you have a good experience in networking please help us out! I can not believe that this problem could not be solved, there must be something we do wrong, but we can not figure out what.
(According to our network profiler results we exchange about ~100kbytes per seconds, which is a lot less than a gigabit ethernet or even a good internet could handle, so this is definitely not a bandwidth issue).