tag:blogger.com,1999:blog-23591982.post4951743000701922222..comments2023-07-23T11:34:06.707-04:00Comments on Game developer Jay's blog: Reusable Logic Flow code can be separated from platform depended code implementationJayhttp://www.blogger.com/profile/05307417533099324352noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-23591982.post-45212316509467195772013-05-06T11:31:58.644-04:002013-05-06T11:31:58.644-04:00In C/C++ I would recommend staying away from virtu...In C/C++ I would recommend staying away from virtual function calls for platform-dependent code. Platform-dependent code doesn't require runtime polymorphism, so a no-overhead, compile-time solution is preferable.<br /><br />A good technique is for example described in this post by Charles Bloom: http://cbloomrants.blogspot.com/2013/03/03-16-13-writing-portable-code-rambles.htmlMartin Eckerhttps://www.blogger.com/profile/09358454887172645273noreply@blogger.comtag:blogger.com,1999:blog-23591982.post-65689939447298869942013-05-05T01:21:51.465-04:002013-05-05T01:21:51.465-04:00The logic function, which was "_tmain" i...The logic function, which was "_tmain" in the example, can be considered as or derived from a state-machine.<br /><br />If we can have a code generator from state machine to the logic function, the programming process can become:<br /><br />1. define logic interface.<br />2. define state machine.<br />3. implement platform dependent code.Jayhttps://www.blogger.com/profile/05307417533099324352noreply@blogger.com