Parcourir la source

Статья за июнь | June article

master
Михаил Капелько il y a 1 semaine
Parent
révision
432705609e
20 fichiers modifiés avec 704 ajouts et 263 suppressions
  1. +44
    -0
      en/news/2024-06_memory-text-ui.md
  2. +22
    -19
      en/news/index.html
  3. +19
    -17
      en/news/index2.html
  4. +17
    -17
      en/news/index3.html
  5. +17
    -25
      en/news/index4.html
  6. +25
    -16
      en/news/index5.html
  7. +16
    -20
      en/news/index6.html
  8. +21
    -18
      en/news/index7.html
  9. +63
    -0
      en/news/index8.html
  10. +109
    -0
      en/news/memory-text-ui.html
  11. +44
    -0
      ru/news/2024-06_memory-text-ui.md
  12. +21
    -19
      ru/news/index.html
  13. +19
    -17
      ru/news/index2.html
  14. +17
    -17
      ru/news/index3.html
  15. +17
    -24
      ru/news/index4.html
  16. +24
    -16
      ru/news/index5.html
  17. +16
    -20
      ru/news/index6.html
  18. +21
    -18
      ru/news/index7.html
  19. +63
    -0
      ru/news/index8.html
  20. +109
    -0
      ru/news/memory-text-ui.html

+ 44
- 0
en/news/2024-06_memory-text-ui.md Voir le fichier

@@ -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

+ 22
- 19
en/news/index.html Voir le fichier

@@ -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>


+ 19
- 17
en/news/index2.html Voir le fichier

@@ -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>


+ 17
- 17
en/news/index3.html Voir le fichier

@@ -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>


+ 17
- 25
en/news/index4.html Voir le fichier

@@ -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>


+ 25
- 16
en/news/index5.html Voir le fichier

@@ -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>


+ 16
- 20
en/news/index6.html Voir le fichier

@@ -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>


+ 21
- 18
en/news/index7.html Voir le fichier

@@ -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
- 0
en/news/index8.html Voir le fichier

@@ -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
- 0
en/news/memory-text-ui.html Voir le fichier

@@ -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>

+ 44
- 0
ru/news/2024-06_memory-text-ui.md Voir le fichier

@@ -0,0 +1,44 @@
Title: Текстовый интерфейс «Памяти»
Date: 2024-06-14 00:00
Category: News
Slug: memory-text-ui
Lang: ru

# Текстовый интерфейс «Памяти»

В мае реализовал текстовый интерфейс игры «Память» на Python. В C++ перевёл инструментом.

Реализация логического игрового цикла привела к появлению контроллера, управляющего
контекстом. Создание контроллера на Python прошло без происшествий, а вот с версией
для C++ пришлось помучиться. Мучения были вызваны тем, что контроллер использует
[std::any][any] из C++17, а инструмент ограничен C++11 с целью поддержки OpenWrt.

Что касается объёма кода, то картина получилась следующей (в строках):

* (Python) Портируемый код логики: 360
* (Python) Портируемый код тестов: 565
* (Python) Непортируемый код контроллера, ввода-вывода и т.п.: 350
* (C++) Портированный код логики: 360
* (C++) Портированный код тестов: 586
* (C++) Непортируемый код контроллера, ввода-вывода и т.п.: 565

В процентах выглядит это так:

| Язык | Всего строк кода | Портируемого | Непортируемого |
| --- | --- | --- | --- |
| Python | 1275 (**100%**) | 925 (**72%**) | 350 (**28%**) |
| C++ | 1511 (**100%**) | 946 (**62%**) | 565 (**38%**) |

Выходит, что разработка версии игры «Память» на языке С++ оказалась на
62% строк кода дешевле, чем была бы без использования инструмента. Цифры
приятные.

Сам текстовый интерфейс игры «Память» на текущий момент выглядит следующим образом:

<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>

# Планы на июнь

В июне сделаю простейший графический интерфейс для версии Python.

[any]: https://en.cppreference.com/w/cpp/utility/any

+ 21
- 19
ru/news/index.html Voir le fichier

@@ -30,6 +30,26 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="memory-text-ui.html">Текстовый интерфейс «Памяти»</a>
</h2>
<p class="news_item_date">
2024-06-14 00:00
</p>
<div class="news_item_contents">
<h1 id="">Текстовый интерфейс «Памяти»</h1>
<p>В мае реализовал текстовый интерфейс игры «Память» на Python. В C++ перевёл инструментом.</p>
<p>Реализация логического игрового цикла привела к появлению контроллера, управляющего
контекстом. Создание контроллера на Python прошло без происшествий, а вот с версией
для C++ пришлось помучиться. Мучения были вызваны тем, что контроллер использует
<a href="https://en.cppreference.com/w/cpp/utility/any">std::any</a> из C++17, а инструмент ограничен C++11 с целью поддержки OpenWrt.</p>
<p>Что касается объёма кода, то картина получилась следующей (в строках):. . .</p>
</div>
<div class="news_item_more">
<a href="memory-text-ui.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="memory-logic.html">Игровая логика «Памяти»</a>
@@ -211,26 +231,8 @@ Ubuntu Edge</a>. Особенностью продукта должна была
<a href="teaching-to-program-2019.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Минусы и плюсы начинания с начала</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>Любой, кто следит за нашим прогрессом достаточно долго, может сказать, что мы много раз перезапускали разработку с нуля.</p>
<p>Еще до выпуска <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a> мы несколько раз меняли технологии "под капотом". После релиза мы неоднократно делали это снова, отбрасывая уже готовые решения.
Может показаться, что сейчас у нас меньше готового, чем перед выходом <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>. Это правда, но не совсем.</p>
<p>Когда вышел <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>, у нас была приятно выглядящая (на тот момент) игра с открытым исходным кодом, которая работала под Windows и Linux. С некоторой удачей и усилием в нее можно поиграть и сегодня, но уже не "из коробки".. . .</p>
</div>
<div class="news_item_more">
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 1 из 7</p>
<p class="pagination_title">Страница 1 из 8</p>
<p>
<a href="index2.html">Старее »</a>
</p>


+ 19
- 17
ru/news/index2.html Voir le fichier

@@ -30,6 +30,24 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Минусы и плюсы начинания с начала</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>Любой, кто следит за нашим прогрессом достаточно долго, может сказать, что мы много раз перезапускали разработку с нуля.</p>
<p>Еще до выпуска <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a> мы несколько раз меняли технологии "под капотом". После релиза мы неоднократно делали это снова, отбрасывая уже готовые решения.
Может показаться, что сейчас у нас меньше готового, чем перед выходом <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>. Это правда, но не совсем.</p>
<p>Когда вышел <a href="../game/ogs-mahjong-1.html">"OGS Mahjong"</a>, у нас была приятно выглядящая (на тот момент) игра с открытым исходным кодом, которая работала под Windows и Linux. С некоторой удачей и усилием в нее можно поиграть и сегодня, но уже не "из коробки".. . .</p>
</div>
<div class="news_item_more">
<a href="the-pros-and-cons-of-restarting-from-scratch.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="on-the-way-to-durable-applications.html">На пути к долговечным приложениям</a>
@@ -185,24 +203,8 @@
<a href="example-driven-development.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="openscenegraph-examples.html">Кросс-платформенные примеры OpenSceneGraph</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 отображает куб" /></p>
<p>Эта статья резюмирует создание первых двух кросс-платформенных примеров OpenSceneGraph.</p>
<p>К тому времени, как мы выпустили <a href="mahjong-techdemo1-gameplay.html">первую техническую демонстрацию OGS Mahjong 2</a>, нас уже дожидался <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">запрос на описание работы с изображениями</a> в OpenSceneGraph на Android. Сначала мы рассматривали возможность создания нового самоучителя для <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">кросс-платформенного руководства OpenSceneGraph</a>, но позже мы оценили необходимые трудозатраты и посчитали их излишними для освещения такой небольшой темы (по сравнению с тем, что умеет средняя игра) как загрузка изображений. Мы решили продолжить делиться нашими знаниями в виде конкретных примеров. Так на свет появились <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples">кросс-платформенные примеры OpenSceneGraph</a>.. . .</p>
</div>
<div class="news_item_more">
<a href="openscenegraph-examples.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 2 из 7</p>
<p class="pagination_title">Страница 2 из 8</p>
<p>
<a href="index.html">« Новее</a>
<a href="index3.html">Старее »</a>


+ 17
- 17
ru/news/index3.html Voir le fichier

@@ -30,6 +30,22 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="openscenegraph-examples.html">Кросс-платформенные примеры OpenSceneGraph</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 отображает куб" /></p>
<p>Эта статья резюмирует создание первых двух кросс-платформенных примеров OpenSceneGraph.</p>
<p>К тому времени, как мы выпустили <a href="mahjong-techdemo1-gameplay.html">первую техническую демонстрацию OGS Mahjong 2</a>, нас уже дожидался <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">запрос на описание работы с изображениями</a> в OpenSceneGraph на Android. Сначала мы рассматривали возможность создания нового самоучителя для <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">кросс-платформенного руководства OpenSceneGraph</a>, но позже мы оценили необходимые трудозатраты и посчитали их излишними для освещения такой небольшой темы (по сравнению с тем, что умеет средняя игра) как загрузка изображений. Мы решили продолжить делиться нашими знаниями в виде конкретных примеров. Так на свет появились <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples">кросс-платформенные примеры OpenSceneGraph</a>.. . .</p>
</div>
<div class="news_item_more">
<a href="openscenegraph-examples.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="mahjong-techdemo1-gameplay.html">Первая технодемка OGS Mahjong 2: Игровая механика</a>
@@ -185,24 +201,8 @@
<a href="openscenegraph-cross-platform-guide.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="ios-tutorial.html">Самоучитель iOS</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="Земля и ракета" /></p>
<p>Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p>
<p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">В феврале</a> мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.. . .</p>
</div>
<div class="news_item_more">
<a href="ios-tutorial.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 3 из 7</p>
<p class="pagination_title">Страница 3 из 8</p>
<p>
<a href="index2.html">« Новее</a>
<a href="index4.html">Старее »</a>


+ 17
- 24
ru/news/index4.html Voir le fichier

@@ -30,6 +30,22 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="ios-tutorial.html">Самоучитель iOS</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="Земля и ракета" /></p>
<p>Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p>
<p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">В феврале</a> мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.. . .</p>
</div>
<div class="news_item_more">
<a href="ios-tutorial.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="osg-sample.html">Приложение OpenSceneGraph</a>
@@ -176,31 +192,8 @@
<a href="2016-tech-showcases.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="2016-september-recap.html">Сентябрь 2016 кратко</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="Маджонг, созданный в прямом эфире" /></p>
<p>Эта статья описывает стадии по подготовке и проведению прямого эфира сентября 2016: черновик, репетиция, прямой эфир и публикация.</p>
<p>Несмотря на то, что сам прямой эфир длится лишь несколько часов, мы готовимся к нему целый месяц. Рассмотрим каждую стадию прямого эфира подробнее.</p>
<ol>
<li><p><strong>Черновик.</strong> Создание игры в первый раз.</p>
<p>Цели:</p>
<ul>
<li>проверить наши технологии и исправить основные ошибки;</li>
<li>узнать о неудобствах использования технологий, чтобы исправить их в следующей итерации разработки;. . .</li></ul></li>
</ol>
</div>
<div class="news_item_more">
<a href="2016-september-recap.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 4 из 7</p>
<p class="pagination_title">Страница 4 из 8</p>
<p>
<a href="index3.html">« Новее</a>
<a href="index5.html">Старее »</a>


+ 24
- 16
ru/news/index5.html Voir le fichier

@@ -30,6 +30,29 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="2016-september-recap.html">Сентябрь 2016 кратко</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="Маджонг, созданный в прямом эфире" /></p>
<p>Эта статья описывает стадии по подготовке и проведению прямого эфира сентября 2016: черновик, репетиция, прямой эфир и публикация.</p>
<p>Несмотря на то, что сам прямой эфир длится лишь несколько часов, мы готовимся к нему целый месяц. Рассмотрим каждую стадию прямого эфира подробнее.</p>
<ol>
<li><p><strong>Черновик.</strong> Создание игры в первый раз.</p>
<p>Цели:</p>
<ul>
<li>проверить наши технологии и исправить основные ошибки;</li>
<li>узнать о неудобствах использования технологий, чтобы исправить их в следующей итерации разработки;. . .</li></ul></li>
</ol>
</div>
<div class="news_item_more">
<a href="2016-september-recap.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="ogs-editor-0.10.html">OGS Editor 0.10 и материалы прямого эфира</a>
@@ -172,23 +195,8 @@
<a href="ogs-editor-0.9.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="may-live-session-announcement.html">Прямой эфир: 28 мая 2016</a>
</h2>
<p class="news_item_date">
2016-05-17 00:00
</p>
<div class="news_item_contents">
<p>Мы рады сообщить, что трансляция <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> состоится <a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=%D0%9C%D0%B0%D0%B9%D1%81%D0%BA%D0%B8%D0%B9+%D0%BF%D1%80%D1%8F%D0%BC%D0%BE%D0%B9+%D1%8D%D1%84%D0%B8%D1%80+Open+Game+Studio&iso=20160528T13&p1=166&ah=3">28 мая 2016 в 13:00 MSK</a>. Присоединяйтесь!</p>
<p>. . .</p>
</div>
<div class="news_item_more">
<a href="may-live-session-announcement.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 5 из 7</p>
<p class="pagination_title">Страница 5 из 8</p>
<p>
<a href="index4.html">« Новее</a>
<a href="index6.html">Старее »</a>


+ 16
- 20
ru/news/index6.html Voir le fichier

@@ -30,6 +30,21 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="may-live-session-announcement.html">Прямой эфир: 28 мая 2016</a>
</h2>
<p class="news_item_date">
2016-05-17 00:00
</p>
<div class="news_item_contents">
<p>Мы рады сообщить, что трансляция <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> состоится <a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=%D0%9C%D0%B0%D0%B9%D1%81%D0%BA%D0%B8%D0%B9+%D0%BF%D1%80%D1%8F%D0%BC%D0%BE%D0%B9+%D1%8D%D1%84%D0%B8%D1%80+Open+Game+Studio&iso=20160528T13&p1=166&ah=3">28 мая 2016 в 13:00 MSK</a>. Присоединяйтесь!</p>
<p>. . .</p>
</div>
<div class="news_item_more">
<a href="may-live-session-announcement.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="may-live-session-decision.html">Майский прямой эфир (Редактор 0.9)</a>
@@ -163,27 +178,8 @@
<a href="livesession-editor-07.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="soon-game-creation-editor-07.html">СКОРО: Создание простой игры в прямом эфире (Редактор 0.7)</a>
</h2>
<p class="news_item_date">
2015-11-02 00:00
</p>
<div class="news_item_contents">
<p>Как и было обещано, мы готовы предоставить вам Редактор 0.7, с помощью которого можно создать тестовый цех. Тем не менее, после воссоздания цеха стало ясно, что:</p>
<ol>
<li>это занимает более 8 часов (слишком долго)</li>
<li>описание в виде статьи не подходит по формату (слишком скучно)</li>
</ol>
<p>Поэтому мы решили провести прямую трансляцию на <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> СКОРО, чтобы показать, как создать простую <a title="Whac-a-mole" href="http://google.com/search?q=whac+a+mole">игру типа "поймай крота"</a> с нуля.. . .</p>
</div>
<div class="news_item_more">
<a href="soon-game-creation-editor-07.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 6 из 7</p>
<p class="pagination_title">Страница 6 из 8</p>
<p>
<a href="index5.html">« Новее</a>
<a href="index7.html">Старее »</a>


+ 21
- 18
ru/news/index7.html Voir le fichier

@@ -30,6 +30,25 @@
<center>
<h1>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="soon-game-creation-editor-07.html">СКОРО: Создание простой игры в прямом эфире (Редактор 0.7)</a>
</h2>
<p class="news_item_date">
2015-11-02 00:00
</p>
<div class="news_item_contents">
<p>Как и было обещано, мы готовы предоставить вам Редактор 0.7, с помощью которого можно создать тестовый цех. Тем не менее, после воссоздания цеха стало ясно, что:</p>
<ol>
<li>это занимает более 8 часов (слишком долго)</li>
<li>описание в виде статьи не подходит по формату (слишком скучно)</li>
</ol>
<p>Поэтому мы решили провести прямую трансляцию на <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> СКОРО, чтобы показать, как создать простую <a title="Whac-a-mole" href="http://google.com/search?q=whac+a+mole">игру типа "поймай крота"</a> с нуля.. . .</p>
</div>
<div class="news_item_more">
<a href="soon-game-creation-editor-07.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="bye-desura-hello-humblebundle.html">Прощай, Desura. Здравствуй, Humble Bundle Widget</a>
@@ -178,27 +197,11 @@
<a href="user-servey-finish-promise.html">Читать далее</a>
</div>
</div>
<div class="news_item">
<h2 class="news_item_title">
<a href="2014-another-year-passed.html">И вот прошел еще один год</a>
</h2>
<p class="news_item_date">
2014-12-31 12:00
</p>
<div class="news_item_contents">
<p>Привет.</p>
<p>Подходит к концу год, в течение которого мы разместили на сайте рекордно малое количество новостей. Мы не прекратили разработку, однако пока она находится в фазе "показывать нечего", а свободного времени, которое можно уделять проекту, у каждого из его участников сейчас найдется редко больше чем 30-40 часов в месяц.</p>
<p>Но работа продвигается, и подробнее о ней расскажет <a href="exaggerated-expectations.html">статья нашего программиста Михаила Капелько</a>.</p>
<p>. . .</p>
</div>
<div class="news_item_more">
<a href="2014-another-year-passed.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 7 из 7</p>
<p class="pagination_title">Страница 7 из 8</p>
<p>
<a href="index6.html">« Новее</a>
<a href="index8.html">Старее »</a>
</p>




+ 63
- 0
ru/news/index8.html Voir le fichier

@@ -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="../../ru/news/index.html">Новости</a>
<a href="../../ru/game/index.html">Игры</a>
<a href="../../ru/tool/index.html">Инструменты</a>
<a href="../../ru/page/about.html">О нас</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>Новости</h1>

<div class="news_item">
<h2 class="news_item_title">
<a href="2014-another-year-passed.html">И вот прошел еще один год</a>
</h2>
<p class="news_item_date">
2014-12-31 12:00
</p>
<div class="news_item_contents">
<p>Привет.</p>
<p>Подходит к концу год, в течение которого мы разместили на сайте рекордно малое количество новостей. Мы не прекратили разработку, однако пока она находится в фазе "показывать нечего", а свободного времени, которое можно уделять проекту, у каждого из его участников сейчас найдется редко больше чем 30-40 часов в месяц.</p>
<p>Но работа продвигается, и подробнее о ней расскажет <a href="exaggerated-expectations.html">статья нашего программиста Михаила Капелько</a>.</p>
<p>. . .</p>
</div>
<div class="news_item_more">
<a href="2014-another-year-passed.html">Читать далее</a>
</div>
</div>

<p class="pagination_title">Страница 8 из 8</p>
<p>
<a href="index7.html">« Новее</a>
</p>


<div id="footer">
Сайт сгенерирован <a href="http://opengamestudio.org/pskov/ru">ПСКОВОМ</a>
из <a href="http://github.com/ogstudio/site-opengamestudio">этого исходного кода</a>.
</div>
</center>
</body>
</html>

+ 109
- 0
ru/news/memory-text-ui.html Voir le fichier

@@ -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="../../ru/news/index.html">Новости</a>
<a href="../../ru/game/index.html">Игры</a>
<a href="../../ru/tool/index.html">Инструменты</a>
<a href="../../ru/page/about.html">О нас</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">В новостях...</h3>
<center>
<div class="news_item">
<h2 class="news_item_title">
<a href="memory-text-ui.html">Текстовый интерфейс «Памяти»</a>
</h2>
<p class="news_item_date">
2024-06-14 00:00
</p>
<div class="news_item_contents">
<h1 id="">Текстовый интерфейс «Памяти»</h1>
<p>В мае реализовал текстовый интерфейс игры «Память» на Python. В C++ перевёл инструментом.</p>
<p>Реализация логического игрового цикла привела к появлению контроллера, управляющего
контекстом. Создание контроллера на Python прошло без происшествий, а вот с версией
для C++ пришлось помучиться. Мучения были вызваны тем, что контроллер использует
<a href="https://en.cppreference.com/w/cpp/utility/any">std::any</a> из C++17, а инструмент ограничен C++11 с целью поддержки OpenWrt.</p>
<p>Что касается объёма кода, то картина получилась следующей (в строках):</p>
<ul>
<li>(Python) Портируемый код логики: 360</li>
<li>(Python) Портируемый код тестов: 565</li>
<li>(Python) Непортируемый код контроллера, ввода-вывода и т.п.: 350</li>
<li>(C++) Портированный код логики: 360</li>
<li>(C++) Портированный код тестов: 586</li>
<li>(C++) Непортируемый код контроллера, ввода-вывода и т.п.: 565</li>
</ul>
<p>В процентах выглядит это так:</p>
<table>
<thead>
<tr>
<th>Язык</th>
<th>Всего строк кода</th>
<th>Портируемого</th>
<th>Непортируемого</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>Выходит, что разработка версии игры «Память» на языке С++ оказалась на
62% строк кода дешевле, чем была бы без использования инструмента. Цифры
приятные.</p>
<p>Сам текстовый интерфейс игры «Память» на текущий момент выглядит следующим образом:</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="-1">Планы на июнь</h1>
<p>В июне сделаю простейший графический интерфейс для версии Python.</p>
</div>
</div>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "https://opengamestudio.org/ru/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>Пожалуйста, включите JavaScript для просмотра <a href="https://disqus.com/?ref_noscript">комментариев на платформе Disqus.</a></noscript>
<div id="footer">
Сайт сгенерирован <a href="http://opengamestudio.org/pskov/ru">ПСКОВОМ</a>
из <a href="http://github.com/ogstudio/site-opengamestudio">этого исходного кода</a>.
</div>
</center>
</body>
</html>

Chargement…
Annuler
Enregistrer