gajop Posted March 12, 2015 Report Share Posted March 12, 2015 Hello,As the topic title, I'm interested how 0ad synchronizes simulation along multiple PCs in multiplayer.This is important in order to ensure the same result on multiple PCs with potentialy different FPUs.SpringRTS for example uses streflop: http://nicolas.brodu.net/en/programmation/streflop/The assumption here is that you are using a synced engine, am I wrong?Thanks in advance Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 12, 2015 Report Share Posted March 12, 2015 We are using fixed-point numbers for anything that requires synchronisation, which fixes the issue. 1 Quote Link to comment Share on other sites More sharing options...
gajop Posted March 12, 2015 Author Report Share Posted March 12, 2015 Thanks, I assume that also caused no difficulties in porting to Android.You mind linking the source of your fixed point implementation? Quote Link to comment Share on other sites More sharing options...
Itms Posted March 12, 2015 Report Share Posted March 12, 2015 The entire source can be browsed in our bugtracker, and here is the file where Fixed are defined: http://trac.wildfiregames.com/browser/ps/trunk/source/maths/Fixed.hThe 'fixed' type we use is defined line 334:typedef CFixed<i32, (i32)0x7fffffff, 32, 15, 16, 65536> CFixed_15_16;typedef CFixed_15_16 fixed; 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.