tag:blogger.com,1999:blog-1757856588756891210.post5792700509995598232..comments2023-02-23T05:24:13.336-08:00Comments on Online Game Techniques: Single Writer Authoritative SimulatorDarrin Westhttp://www.blogger.com/profile/08387670564219526228noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1757856588756891210.post-69771348097461165692010-11-15T18:21:10.683-08:002010-11-15T18:21:10.683-08:00As far as the owner of the Entity is concerned, on...As far as the owner of the Entity is concerned, one request or the other is handled first. Since the owner is the only one writing to that Entity, and each simulator is single-threaded, the writes cannot be intermingled.<br /><br />I'm guessing you are worried about read-read-update-update when you wanted read-update read-update. That is an atomicity problem, and is solved by encapsulating the "transaction" in a single event handler that is run by the owner. Each read-update action is then fully handled by the target Entity one at a time.<br /><br />The other solution would be to perform these kinds of computations using transitive computation (e.g. increment).Darrin Westhttps://www.blogger.com/profile/08387670564219526228noreply@blogger.comtag:blogger.com,1999:blog-1757856588756891210.post-29731779251659366862010-11-15T06:21:12.306-08:002010-11-15T06:21:12.306-08:00I'm not sure how this solves the race-conditio...I'm not sure how this solves the race-condition problem when two simulators try to update the same property of the same entity. This may be because I haven't met "Communicating Sequential Processes" before. Can you elaborate?<br /><br />When a non-authoritative simulator sends a request to update a property of a remote entity, how does the host simulator deal with the request? Does the request include the new and old values of the property? Could the request be rejected if it appears to be based on old data?<br /><br />GaryGarynoreply@blogger.com