Статья за июнь | June article
This commit is contained in:
44
en/news/2024-06_memory-text-ui.md
Normal file
44
en/news/2024-06_memory-text-ui.md
Normal file
@@ -0,0 +1,44 @@
|
||||
Title: "Memory" text UI
|
||||
Date: 2024-06-14 00:00
|
||||
Category: News
|
||||
Slug: memory-text-ui
|
||||
Lang: en
|
||||
|
||||
# "Memory" text UI
|
||||
|
||||
In May I implemented text UI for "Memory" game in Python. And converted it to C++
|
||||
by the instrument under development.
|
||||
|
||||
Game logic cycle implementation lead to the creation of a controller that manages
|
||||
context. Creating the controller in Python was straightforward. C++ version took
|
||||
some time, because the controller needs [std::any][any], which is part of C++17.
|
||||
The instrument under development is limited to C++11 in order to support OpenWrt.
|
||||
|
||||
Here's how much code I wrote (in lines):
|
||||
|
||||
* (Python) Portable logic code: 360
|
||||
* (Python) Portable testing code: 565
|
||||
* (Python) Unportable code of controller, input/output, etc.: 350
|
||||
* (C++) Ported logic code: 360
|
||||
* (C++) Ported testing code: 586
|
||||
* (C++) Unportable code of controller, input/output, etc.: 565
|
||||
|
||||
Here's the same data in per cent:
|
||||
|
||||
| Language | Total lines of code | Portable/ported | Unportable |
|
||||
| --- | --- | --- | --- |
|
||||
| Python | 1275 (**100%**) | 925 (**72%**) | 350 (**28%**) |
|
||||
| C++ | 1511 (**100%**) | 946 (**62%**) | 565 (**38%**) |
|
||||
|
||||
Thus, the development of C++ version of "Memory" game was 62% lines
|
||||
of code cheaper than if it would be without the instrument. Nice figures.
|
||||
|
||||
Here's how "Memory" text UI looks like now:
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/tChSjw5W8KQ?si=WO5MYLCBhgstVshl" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
# June plans
|
||||
|
||||
I'll make a graphical UI for Python version of "Memory" game.
|
||||
|
||||
[any]: https://en.cppreference.com/w/cpp/utility/any
|
||||
@@ -30,6 +30,27 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="memory-text-ui.html">"Memory" text UI</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2024-06-14 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<h1 id="memorytextui">"Memory" text UI</h1>
|
||||
<p>In May I implemented text UI for "Memory" game in Python. And converted it to C++
|
||||
by the instrument under development.</p>
|
||||
<p>Game logic cycle implementation lead to the creation of a controller that manages
|
||||
context. Creating the controller in Python was straightforward. C++ version took
|
||||
some time, because the controller needs <a href="https://en.cppreference.com/w/cpp/utility/any">std::any</a>, which is part of C++17.
|
||||
The instrument under development is limited to C++11 in order to support OpenWrt.</p>
|
||||
<p>Here's how much code I wrote (in lines):. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="memory-text-ui.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="memory-logic.html">"Memory" game logic</a>
|
||||
@@ -211,26 +232,8 @@ not the hardware one. Today I can confidently say I found the necessary. . .</p>
|
||||
<a href="teaching-to-program-2019.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="the-pros-and-cons-of-restarting-from-scratch.html">The pros and cons of restarting from scratch</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2020-01-01 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2020-01-01-ny.jpg" alt="Happy 2020" /></p>
|
||||
<p>Anyone, who watches our progress long enough, can say that we restarted the development from scratch plenty of times.</p>
|
||||
<p>Even before releasing <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>, we changed the underlying technology more than once. After that, we did it again several times, throwing away already completed features.
|
||||
It seems that right now we have less completed features than before the release of <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>. It's true, but not entirely.</p>
|
||||
<p>When <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a> was released, we had a descent looking (for that moment) open-source game, that worked under Windows and Linux. With some luck and effort it still works today, but not out of the box.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 1 of 7</p>
|
||||
<p class="pagination_title">Page 1 of 8</p>
|
||||
<p>
|
||||
<a href="index2.html">Older »</a>
|
||||
</p>
|
||||
|
||||
@@ -30,6 +30,24 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="the-pros-and-cons-of-restarting-from-scratch.html">The pros and cons of restarting from scratch</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2020-01-01 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2020-01-01-ny.jpg" alt="Happy 2020" /></p>
|
||||
<p>Anyone, who watches our progress long enough, can say that we restarted the development from scratch plenty of times.</p>
|
||||
<p>Even before releasing <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>, we changed the underlying technology more than once. After that, we did it again several times, throwing away already completed features.
|
||||
It seems that right now we have less completed features than before the release of <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>. It's true, but not entirely.</p>
|
||||
<p>When <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a> was released, we had a descent looking (for that moment) open-source game, that worked under Windows and Linux. With some luck and effort it still works today, but not out of the box.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="on-the-way-to-durable-applications.html">On the way to durable applications</a>
|
||||
@@ -186,24 +204,8 @@
|
||||
<a href="example-driven-development.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="openscenegraph-examples.html">OpenSceneGraph cross-platform examples</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2018-04-20 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2018-04-20-openscenegraph-examples.png" alt="iOS Simulator renders a cube" /></p>
|
||||
<p>This article summarizes the work we did to produce the first two cross-platform OpenSceneGraph examples.</p>
|
||||
<p>By the time <a href="mahjong-techdemo1-gameplay.html">the first technology demonstration of OGS Mahjong 2</a> has been released, we've already had <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">issue request</a> (to explain how to load images with OpenSceneGraph on Android) hanging for some time. We considered creating a new tutorial for <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> at first. However, we realized that it's time-consuming and excessive for such a tiny topic (compared to what an average game has) as image loading. We decided to continue sharing our knowledge in the form of concrete examples. That's how <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples">OpenSceneGraph cross-platform examples</a> were born.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="openscenegraph-examples.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 2 of 7</p>
|
||||
<p class="pagination_title">Page 2 of 8</p>
|
||||
<p>
|
||||
<a href="index.html">« Newer</a>
|
||||
<a href="index3.html">Older »</a>
|
||||
|
||||
@@ -30,6 +30,22 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="openscenegraph-examples.html">OpenSceneGraph cross-platform examples</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2018-04-20 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2018-04-20-openscenegraph-examples.png" alt="iOS Simulator renders a cube" /></p>
|
||||
<p>This article summarizes the work we did to produce the first two cross-platform OpenSceneGraph examples.</p>
|
||||
<p>By the time <a href="mahjong-techdemo1-gameplay.html">the first technology demonstration of OGS Mahjong 2</a> has been released, we've already had <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">issue request</a> (to explain how to load images with OpenSceneGraph on Android) hanging for some time. We considered creating a new tutorial for <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> at first. However, we realized that it's time-consuming and excessive for such a tiny topic (compared to what an average game has) as image loading. We decided to continue sharing our knowledge in the form of concrete examples. That's how <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples">OpenSceneGraph cross-platform examples</a> were born.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="openscenegraph-examples.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="mahjong-techdemo1-gameplay.html">First techdemo of OGS Mahjong 2: Gameplay</a>
|
||||
@@ -188,24 +204,8 @@
|
||||
<a href="openscenegraph-cross-platform-guide.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="ios-tutorial.html">iOS tutorial</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2017-06-08 10:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2017-06-08-ios-refactoring.png" alt="Earth and a rocket" /></p>
|
||||
<p>This article describes problems we faced during the creation of iOS tutorial in May 2017.</p>
|
||||
<p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">This February</a> we managed to get simple model rendered under iOS in just a few days. We expected to finish iOS tutorial in no time. However, the reality reminded us: it's easy to come up with a hackish demo that works for one person, but it's hard to create a concise example that works for everyone.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="ios-tutorial.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 3 of 7</p>
|
||||
<p class="pagination_title">Page 3 of 8</p>
|
||||
<p>
|
||||
<a href="index2.html">« Newer</a>
|
||||
<a href="index4.html">Older »</a>
|
||||
|
||||
@@ -30,6 +30,22 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="ios-tutorial.html">iOS tutorial</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2017-06-08 10:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2017-06-08-ios-refactoring.png" alt="Earth and a rocket" /></p>
|
||||
<p>This article describes problems we faced during the creation of iOS tutorial in May 2017.</p>
|
||||
<p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">This February</a> we managed to get simple model rendered under iOS in just a few days. We expected to finish iOS tutorial in no time. However, the reality reminded us: it's easy to come up with a hackish demo that works for one person, but it's hard to create a concise example that works for everyone.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="ios-tutorial.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="osg-sample.html">OpenSceneGraph sample</a>
|
||||
@@ -176,32 +192,8 @@
|
||||
<a href="2016-tech-showcases.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="2016-september-recap.html">September 2016 recap</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2016-10-11 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2016-10-11_september-recap.png" alt="Mahjong created during live session" /></p>
|
||||
<p>This article explains September 2016 live session stages: draft, rehearsal, live session itself, and publishing.</p>
|
||||
<p>Even though live session takes only a few hours, we devote a whole month to prepare for it. Let's have a look at live session stages in detail.</p>
|
||||
<ol>
|
||||
<li><p><strong>Draft.</strong> Game creation for the first time.</p>
|
||||
<p>Purposes:</p>
|
||||
<ul>
|
||||
<li>test our technologies and fix major bugs;</li>
|
||||
<li>discover usability issues to fix in the next development iteration;</li>
|
||||
<li>list exact steps to reproduce the game later;. . .</li></ul></li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="2016-september-recap.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 4 of 7</p>
|
||||
<p class="pagination_title">Page 4 of 8</p>
|
||||
<p>
|
||||
<a href="index3.html">« Newer</a>
|
||||
<a href="index5.html">Older »</a>
|
||||
|
||||
@@ -30,6 +30,30 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="2016-september-recap.html">September 2016 recap</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2016-10-11 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p><img src="../../images/2016-10-11_september-recap.png" alt="Mahjong created during live session" /></p>
|
||||
<p>This article explains September 2016 live session stages: draft, rehearsal, live session itself, and publishing.</p>
|
||||
<p>Even though live session takes only a few hours, we devote a whole month to prepare for it. Let's have a look at live session stages in detail.</p>
|
||||
<ol>
|
||||
<li><p><strong>Draft.</strong> Game creation for the first time.</p>
|
||||
<p>Purposes:</p>
|
||||
<ul>
|
||||
<li>test our technologies and fix major bugs;</li>
|
||||
<li>discover usability issues to fix in the next development iteration;</li>
|
||||
<li>list exact steps to reproduce the game later;. . .</li></ul></li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="2016-september-recap.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="ogs-editor-0.10.html">OGS Editor 0.10 and live session materials</a>
|
||||
@@ -172,23 +196,8 @@ It's time to create simple Mahjong solitaire game.</p>
|
||||
<a href="ogs-editor-0.9.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="may-live-session-announcement.html">Live session: 28 May 2016</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2016-05-17 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>We're glad to annouce that the <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session will take place on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio+May+live+session&iso=20160528T12&p1=37&ah=3">28 May 2016 at 12:00 CEST</a>. Join us!</p>
|
||||
<p>. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="may-live-session-announcement.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 5 of 7</p>
|
||||
<p class="pagination_title">Page 5 of 8</p>
|
||||
<p>
|
||||
<a href="index4.html">« Newer</a>
|
||||
<a href="index6.html">Older »</a>
|
||||
|
||||
@@ -30,6 +30,21 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="may-live-session-announcement.html">Live session: 28 May 2016</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2016-05-17 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>We're glad to annouce that the <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session will take place on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio+May+live+session&iso=20160528T12&p1=37&ah=3">28 May 2016 at 12:00 CEST</a>. Join us!</p>
|
||||
<p>. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="may-live-session-announcement.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="may-live-session-decision.html">May live session (Editor 0.9)</a>
|
||||
@@ -165,27 +180,8 @@
|
||||
<a href="livesession-editor-07.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="soon-game-creation-editor-07.html">SOON: Creating a simple game live (Editor 0.7)</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2015-11-02 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>As we have promised, we are ready to give you Editor 0.7 which is capable of creating the complete test chamber. However, after recreating the test chamber ourselves, it became clear that:</p>
|
||||
<ol>
|
||||
<li>it takes more than 8 hours to recreate it (too long)</li>
|
||||
<li>it's inappropriate to be presented in the form of an article (too boring)</li>
|
||||
</ol>
|
||||
<p>Therefore we decided to hold a live session at <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> SOON to show you how to create a simple <a title="Whac-a-mole" href="http://google.com/search?q=whac+a+mole">whac-a-mole like game</a> from scratch.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="soon-game-creation-editor-07.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 6 of 7</p>
|
||||
<p class="pagination_title">Page 6 of 8</p>
|
||||
<p>
|
||||
<a href="index5.html">« Newer</a>
|
||||
<a href="index7.html">Older »</a>
|
||||
|
||||
@@ -30,6 +30,25 @@
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="soon-game-creation-editor-07.html">SOON: Creating a simple game live (Editor 0.7)</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2015-11-02 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>As we have promised, we are ready to give you Editor 0.7 which is capable of creating the complete test chamber. However, after recreating the test chamber ourselves, it became clear that:</p>
|
||||
<ol>
|
||||
<li>it takes more than 8 hours to recreate it (too long)</li>
|
||||
<li>it's inappropriate to be presented in the form of an article (too boring)</li>
|
||||
</ol>
|
||||
<p>Therefore we decided to hold a live session at <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> SOON to show you how to create a simple <a title="Whac-a-mole" href="http://google.com/search?q=whac+a+mole">whac-a-mole like game</a> from scratch.. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="soon-game-creation-editor-07.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="bye-desura-hello-humblebundle.html">Desura no more, hello Humble Bundle Widget</a>
|
||||
@@ -183,27 +202,11 @@
|
||||
<a href="user-servey-finish-promise.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="2014-another-year-passed.html">And another year has passed</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2014-12-31 12:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>Hello!</p>
|
||||
<p>So, this year comes to the end. There were very little publications from us during this year. We haven't stopped working, but right now our work is in the phase, when we have nothing to show. And the spare time of the team members is rarely more then 30-40 hours a month.</p>
|
||||
<p>But our work continues. And you can find out some details in the new <a href="exaggerated-expectations.html">article from our programmer Michael Kapelko</a>.</p>
|
||||
<p>. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="2014-another-year-passed.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 7 of 7</p>
|
||||
<p class="pagination_title">Page 7 of 8</p>
|
||||
<p>
|
||||
<a href="index6.html">« Newer</a>
|
||||
<a href="index8.html">Older »</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
63
en/news/index8.html
Normal file
63
en/news/index8.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!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/index8.html">EN</a>
|
||||
<a href="../../ru/news/index8.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>
|
||||
<center>
|
||||
<h1>News</h1>
|
||||
|
||||
<div class="news_item">
|
||||
<h2 class="news_item_title">
|
||||
<a href="2014-another-year-passed.html">And another year has passed</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2014-12-31 12:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<p>Hello!</p>
|
||||
<p>So, this year comes to the end. There were very little publications from us during this year. We haven't stopped working, but right now our work is in the phase, when we have nothing to show. And the spare time of the team members is rarely more then 30-40 hours a month.</p>
|
||||
<p>But our work continues. And you can find out some details in the new <a href="exaggerated-expectations.html">article from our programmer Michael Kapelko</a>.</p>
|
||||
<p>. . .</p>
|
||||
</div>
|
||||
<div class="news_item_more">
|
||||
<a href="2014-another-year-passed.html">Continue reading</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="pagination_title">Page 8 of 8</p>
|
||||
<p>
|
||||
<a href="index7.html">« Newer</a>
|
||||
</p>
|
||||
|
||||
|
||||
<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>
|
||||
109
en/news/memory-text-ui.html
Normal file
109
en/news/memory-text-ui.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!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/memory-text-ui.html">EN</a>
|
||||
<a href="../../ru/news/memory-text-ui.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="memory-text-ui.html">"Memory" text UI</a>
|
||||
</h2>
|
||||
<p class="news_item_date">
|
||||
2024-06-14 00:00
|
||||
</p>
|
||||
<div class="news_item_contents">
|
||||
<h1 id="memorytextui">"Memory" text UI</h1>
|
||||
<p>In May I implemented text UI for "Memory" game in Python. And converted it to C++
|
||||
by the instrument under development.</p>
|
||||
<p>Game logic cycle implementation lead to the creation of a controller that manages
|
||||
context. Creating the controller in Python was straightforward. C++ version took
|
||||
some time, because the controller needs <a href="https://en.cppreference.com/w/cpp/utility/any">std::any</a>, which is part of C++17.
|
||||
The instrument under development is limited to C++11 in order to support OpenWrt.</p>
|
||||
<p>Here's how much code I wrote (in lines):</p>
|
||||
<ul>
|
||||
<li>(Python) Portable logic code: 360</li>
|
||||
<li>(Python) Portable testing code: 565</li>
|
||||
<li>(Python) Unportable code of controller, input/output, etc.: 350</li>
|
||||
<li>(C++) Ported logic code: 360</li>
|
||||
<li>(C++) Ported testing code: 586</li>
|
||||
<li>(C++) Unportable code of controller, input/output, etc.: 565</li>
|
||||
</ul>
|
||||
<p>Here's the same data in per cent:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Language</th>
|
||||
<th>Total lines of code</th>
|
||||
<th>Portable/ported</th>
|
||||
<th>Unportable</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Python</td>
|
||||
<td>1275 (<strong>100%</strong>)</td>
|
||||
<td>925 (<strong>72%</strong>)</td>
|
||||
<td>350 (<strong>28%</strong>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>C++</td>
|
||||
<td>1511 (<strong>100%</strong>)</td>
|
||||
<td>946 (<strong>62%</strong>)</td>
|
||||
<td>565 (<strong>38%</strong>)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Thus, the development of C++ version of "Memory" game was 62% lines
|
||||
of code cheaper than if it would be without the instrument. Nice figures.</p>
|
||||
<p>Here's how "Memory" text UI looks like now:</p>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/tChSjw5W8KQ?si=WO5MYLCBhgstVshl" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
<h1 id="juneplans">June plans</h1>
|
||||
<p>I'll make a graphical UI for Python version of "Memory" game.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function () {
|
||||
this.page.url = "https://opengamestudio.org/en/news/memory-text-ui.html";
|
||||
this.page.identifier = "memory-text-ui.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>
|
||||
Reference in New Issue
Block a user