Noob Networking Optimization
by Faraz Ahmed · in Torque Game Engine · 02/22/2006 (4:24 am) · 2 replies
I'm developing a sports type simulation that has a maximum of two players competing against each other at any given time. The core object types during the interaction between the two players is a slippery pointer (RigidShape), a ball (RigidShape) and an AIPlayer. When one player is controlling the pointer, the other one is controlling the AIPlayer. The pointer is eventually used to launch the ball at the AIPlayer.
I tested a skeleton simulation of the system with a friend on another continent and experienced significant lag while playing against him (he was the host). The interaction was playable but not smooth, I also noticed his AIPlayer bobbing and almost vibrating at one spot (which doesn't happen for the host).
Assuming that my connection to the friend and the code written around the game logic is optimized, what are the general strategies and options available for optimizing the networking of the core objects mentioned? There is no scaling factor to consider here because there will always be just two players, a pointer and a ball. I'm hoping there is some kind of network prioritization I can do to ensure maximum possible smoothness and response time during the pointer, ball and AI interaction. Thanks for your advice.
p.s. the RigidShape class was adopted from this resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5495
I tested a skeleton simulation of the system with a friend on another continent and experienced significant lag while playing against him (he was the host). The interaction was playable but not smooth, I also noticed his AIPlayer bobbing and almost vibrating at one spot (which doesn't happen for the host).
Assuming that my connection to the friend and the code written around the game logic is optimized, what are the general strategies and options available for optimizing the networking of the core objects mentioned? There is no scaling factor to consider here because there will always be just two players, a pointer and a ball. I'm hoping there is some kind of network prioritization I can do to ensure maximum possible smoothness and response time during the pointer, ball and AI interaction. Thanks for your advice.
p.s. the RigidShape class was adopted from this resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5495
Torque Owner Dan Rabideau
Good Luck!
Rab