<!DOCTYPE html> <html> <meta charset="utf-8"> <head> <link rel="stylesheet" href="../../style.css"> </head> <body> <script data-goatcounter="https://services.opengamestudio.org:443/count" async src="//services.opengamestudio.org:443/count.js"></script> <div id="header"> <div> <strong id="title">Open Game Studio</strong> <div id="lang"> <a href="../../en/news/bus-01.html">EN</a> <a href="../../ru/news/bus-01.html">RU</a> </div> </div> <div class="header2"> <div class="menu"> <a href="../../en/news/index.html">News</a> <a href="../../en/game/index.html">Games</a> <a href="../../en/tool/index.html">Tools</a> <a href="../../en/page/about.html">About</a> </div> <a class="discord" href="https://discord.gg/3A6THQabNf"> <img src="../../images/discord.png"></img> </a> <div class="clear"></div> </div> </div> <h3 class="left_item_title">In the news...</h3> <center> <div class="news_item"> <h2 class="news_item_title"> <a href="bus-01.html">Bus-01</a> </h2> <p class="news_item_date"> 2024-01-04 00:00 </p> <div class="news_item_contents"> <h1 id="onthewaytoportablecode">On the way to portable code</h1> <p>To gain code portability, we have to divide whole code into two parts:</p> <ul> <li>repeatable: logic</li> <li>unique: environment</li> </ul> <p>To simplify portable code construction, we want to be able to place any code - both repeatable and unique - without hierarchy requirements of operating systems. Bus design pattern seems to be the best option. The Bus makes all code chunks equal because they interact through the Bus only.</p> <h1 id="bus01">Bus-01</h1> <p>Currently we have:</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/XAlIlG9tVL4?si=5HYRDkNuYE0zeoyo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> <p>Module structure:</p> <p><img src="../../images/2024_bus-01_yml.jpg" alt="Module's YML" /></p> <p><yml></p> <p>Part of the visual representation:</p> <p><img src="../../images/2024_bus-01_v.jpg" alt="Visual representation" /></p> <p>Main functionality:</p> <ol> <li>Format input to leave only digits</li> <li>Activate the button when at least 3 digits are present</li> <li>Simulate loading when pressing the button</li> </ol> <p>This was an example of a single instance of an entity.</p> <p>Next we're going to deal with multiple instances of an entity.</p> </div> </div> <div id="disqus_thread"></div> <script> var disqus_config = function () { this.page.url = "https://opengamestudio.org/en/news/bus-01.html"; this.page.identifier = "bus-01.html"; }; (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://opengamestudio.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <div id="footer"> The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a> from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>. </div> </center> </body> </html>