diff --git a/en/news/2024-06_memory-text-ui.md b/en/news/2024-06_memory-text-ui.md new file mode 100644 index 0000000..ab86373 --- /dev/null +++ b/en/news/2024-06_memory-text-ui.md @@ -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: + + + +# June plans + +I'll make a graphical UI for Python version of "Memory" game. + +[any]: https://en.cppreference.com/w/cpp/utility/any diff --git a/en/news/index.html b/en/news/index.html index 5df7341..cc1d9d6 100644 --- a/en/news/index.html +++ b/en/news/index.html @@ -30,6 +30,27 @@
+ 2024-06-14 00:00 +
+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, 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):. . .
+- 2020-01-01 00:00 -
-Anyone, who watches our progress long enough, can say that we restarted the development from scratch plenty of times.
-Even before releasing "OGS Mahjong", 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 "OGS Mahjong". It's true, but not entirely.
-When "OGS Mahjong" 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.. . .
-Page 1 of 7
+Page 1 of 8
diff --git a/en/news/index2.html b/en/news/index2.html index 49598b7..498b557 100644 --- a/en/news/index2.html +++ b/en/news/index2.html @@ -30,6 +30,24 @@+ 2020-01-01 00:00 +
+Anyone, who watches our progress long enough, can say that we restarted the development from scratch plenty of times.
+Even before releasing "OGS Mahjong", 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 "OGS Mahjong". It's true, but not entirely.
+When "OGS Mahjong" 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.. . .
+- 2018-04-20 00:00 -
-This article summarizes the work we did to produce the first two cross-platform OpenSceneGraph examples.
-By the time the first technology demonstration of OGS Mahjong 2 has been released, we've already had issue request (to explain how to load images with OpenSceneGraph on Android) hanging for some time. We considered creating a new tutorial for OpenSceneGraph cross-platform guide 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 OpenSceneGraph cross-platform examples were born.. . .
-Page 2 of 7
+Page 2 of 8
« Newer Older » diff --git a/en/news/index3.html b/en/news/index3.html index 5f324ad..93fb5ec 100644 --- a/en/news/index3.html +++ b/en/news/index3.html @@ -30,6 +30,22 @@
+ 2018-04-20 00:00 +
+This article summarizes the work we did to produce the first two cross-platform OpenSceneGraph examples.
+By the time the first technology demonstration of OGS Mahjong 2 has been released, we've already had issue request (to explain how to load images with OpenSceneGraph on Android) hanging for some time. We considered creating a new tutorial for OpenSceneGraph cross-platform guide 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 OpenSceneGraph cross-platform examples were born.. . .
+- 2017-06-08 10:00 -
-This article describes problems we faced during the creation of iOS tutorial in May 2017.
-This February 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.. . .
-Page 3 of 7
+Page 3 of 8
« Newer Older » diff --git a/en/news/index4.html b/en/news/index4.html index cec445b..e676803 100644 --- a/en/news/index4.html +++ b/en/news/index4.html @@ -30,6 +30,22 @@
+ 2017-06-08 10:00 +
+This article describes problems we faced during the creation of iOS tutorial in May 2017.
+This February 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.. . .
+- 2016-10-11 00:00 -
-This article explains September 2016 live session stages: draft, rehearsal, live session itself, and publishing.
-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.
-Draft. Game creation for the first time.
-Purposes:
-Page 4 of 7
+Page 4 of 8
« Newer Older » diff --git a/en/news/index5.html b/en/news/index5.html index a516d38..99d6686 100644 --- a/en/news/index5.html +++ b/en/news/index5.html @@ -30,6 +30,30 @@
+ 2016-10-11 00:00 +
+This article explains September 2016 live session stages: draft, rehearsal, live session itself, and publishing.
+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.
+Draft. Game creation for the first time.
+Purposes:
+- 2016-05-17 00:00 -
-We're glad to annouce that the LiveCoding session will take place on 28 May 2016 at 12:00 CEST. Join us!
-. . .
-Page 5 of 7
+Page 5 of 8
« Newer Older » diff --git a/en/news/index6.html b/en/news/index6.html index 0b12e32..9dd53fe 100644 --- a/en/news/index6.html +++ b/en/news/index6.html @@ -30,6 +30,21 @@
+ 2016-05-17 00:00 +
+We're glad to annouce that the LiveCoding session will take place on 28 May 2016 at 12:00 CEST. Join us!
+. . .
+- 2015-11-02 00:00 -
-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:
-Therefore we decided to hold a live session at LiveCoding SOON to show you how to create a simple whac-a-mole like game from scratch.. . .
-Page 6 of 7
+Page 6 of 8
« Newer Older » diff --git a/en/news/index7.html b/en/news/index7.html index ad37789..78a22d1 100644 --- a/en/news/index7.html +++ b/en/news/index7.html @@ -30,6 +30,25 @@
+ 2015-11-02 00:00 +
+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:
+Therefore we decided to hold a live session at LiveCoding SOON to show you how to create a simple whac-a-mole like game from scratch.. . .
+- 2014-12-31 12:00 -
-Hello!
-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.
-But our work continues. And you can find out some details in the new article from our programmer Michael Kapelko.
-. . .
-Page 7 of 7
+Page 7 of 8
diff --git a/en/news/index8.html b/en/news/index8.html new file mode 100644 index 0000000..a49d09a --- /dev/null +++ b/en/news/index8.html @@ -0,0 +1,63 @@ + + + + + + + + + ++ 2014-12-31 12:00 +
+Hello!
+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.
+But our work continues. And you can find out some details in the new article from our programmer Michael Kapelko.
+. . .
+Page 8 of 8
++ « Newer +
+ + + ++ 2024-06-14 00:00 +
+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, 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):
+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:
+ +I'll make a graphical UI for Python version of "Memory" game.
++ 2024-06-14 00:00 +
+В мае реализовал текстовый интерфейс игры «Память» на Python. В C++ перевёл инструментом.
+Реализация логического игрового цикла привела к появлению контроллера, управляющего +контекстом. Создание контроллера на Python прошло без происшествий, а вот с версией +для C++ пришлось помучиться. Мучения были вызваны тем, что контроллер использует +std::any из C++17, а инструмент ограничен C++11 с целью поддержки OpenWrt.
+Что касается объёма кода, то картина получилась следующей (в строках):. . .
+- 2020-01-01 00:00 -
-Любой, кто следит за нашим прогрессом достаточно долго, может сказать, что мы много раз перезапускали разработку с нуля.
-Еще до выпуска "OGS Mahjong" мы несколько раз меняли технологии "под капотом". После релиза мы неоднократно делали это снова, отбрасывая уже готовые решения. -Может показаться, что сейчас у нас меньше готового, чем перед выходом "OGS Mahjong". Это правда, но не совсем.
-Когда вышел "OGS Mahjong", у нас была приятно выглядящая (на тот момент) игра с открытым исходным кодом, которая работала под Windows и Linux. С некоторой удачей и усилием в нее можно поиграть и сегодня, но уже не "из коробки".. . .
-Страница 1 из 7
+Страница 1 из 8
diff --git a/ru/news/index2.html b/ru/news/index2.html index fba807d..97f7c50 100644 --- a/ru/news/index2.html +++ b/ru/news/index2.html @@ -30,6 +30,24 @@+ 2020-01-01 00:00 +
+Любой, кто следит за нашим прогрессом достаточно долго, может сказать, что мы много раз перезапускали разработку с нуля.
+Еще до выпуска "OGS Mahjong" мы несколько раз меняли технологии "под капотом". После релиза мы неоднократно делали это снова, отбрасывая уже готовые решения. +Может показаться, что сейчас у нас меньше готового, чем перед выходом "OGS Mahjong". Это правда, но не совсем.
+Когда вышел "OGS Mahjong", у нас была приятно выглядящая (на тот момент) игра с открытым исходным кодом, которая работала под Windows и Linux. С некоторой удачей и усилием в нее можно поиграть и сегодня, но уже не "из коробки".. . .
+- 2018-04-20 00:00 -
-Эта статья резюмирует создание первых двух кросс-платформенных примеров OpenSceneGraph.
-К тому времени, как мы выпустили первую техническую демонстрацию OGS Mahjong 2, нас уже дожидался запрос на описание работы с изображениями в OpenSceneGraph на Android. Сначала мы рассматривали возможность создания нового самоучителя для кросс-платформенного руководства OpenSceneGraph, но позже мы оценили необходимые трудозатраты и посчитали их излишними для освещения такой небольшой темы (по сравнению с тем, что умеет средняя игра) как загрузка изображений. Мы решили продолжить делиться нашими знаниями в виде конкретных примеров. Так на свет появились кросс-платформенные примеры OpenSceneGraph.. . .
-Страница 2 из 7
+Страница 2 из 8
« Новее Старее » diff --git a/ru/news/index3.html b/ru/news/index3.html index 7641e51..024b55c 100644 --- a/ru/news/index3.html +++ b/ru/news/index3.html @@ -30,6 +30,22 @@
+ 2018-04-20 00:00 +
+Эта статья резюмирует создание первых двух кросс-платформенных примеров OpenSceneGraph.
+К тому времени, как мы выпустили первую техническую демонстрацию OGS Mahjong 2, нас уже дожидался запрос на описание работы с изображениями в OpenSceneGraph на Android. Сначала мы рассматривали возможность создания нового самоучителя для кросс-платформенного руководства OpenSceneGraph, но позже мы оценили необходимые трудозатраты и посчитали их излишними для освещения такой небольшой темы (по сравнению с тем, что умеет средняя игра) как загрузка изображений. Мы решили продолжить делиться нашими знаниями в виде конкретных примеров. Так на свет появились кросс-платформенные примеры OpenSceneGraph.. . .
+- 2017-06-08 10:00 -
-Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.
-В феврале мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.. . .
-Страница 3 из 7
+Страница 3 из 8
« Новее Старее » diff --git a/ru/news/index4.html b/ru/news/index4.html index 64085f8..e57b162 100644 --- a/ru/news/index4.html +++ b/ru/news/index4.html @@ -30,6 +30,22 @@
+ 2017-06-08 10:00 +
+Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.
+В феврале мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.. . .
+- 2016-10-11 00:00 -
-Эта статья описывает стадии по подготовке и проведению прямого эфира сентября 2016: черновик, репетиция, прямой эфир и публикация.
-Несмотря на то, что сам прямой эфир длится лишь несколько часов, мы готовимся к нему целый месяц. Рассмотрим каждую стадию прямого эфира подробнее.
-Черновик. Создание игры в первый раз.
-Цели:
-Страница 4 из 7
+Страница 4 из 8
« Новее Старее » diff --git a/ru/news/index5.html b/ru/news/index5.html index f3256aa..c552c64 100644 --- a/ru/news/index5.html +++ b/ru/news/index5.html @@ -30,6 +30,29 @@
+ 2016-10-11 00:00 +
+Эта статья описывает стадии по подготовке и проведению прямого эфира сентября 2016: черновик, репетиция, прямой эфир и публикация.
+Несмотря на то, что сам прямой эфир длится лишь несколько часов, мы готовимся к нему целый месяц. Рассмотрим каждую стадию прямого эфира подробнее.
+Черновик. Создание игры в первый раз.
+Цели:
+- 2016-05-17 00:00 -
-Мы рады сообщить, что трансляция LiveCoding состоится 28 мая 2016 в 13:00 MSK. Присоединяйтесь!
-. . .
-Страница 5 из 7
+Страница 5 из 8
« Новее Старее » diff --git a/ru/news/index6.html b/ru/news/index6.html index 848d234..e1a9aca 100644 --- a/ru/news/index6.html +++ b/ru/news/index6.html @@ -30,6 +30,21 @@
+ 2016-05-17 00:00 +
+Мы рады сообщить, что трансляция LiveCoding состоится 28 мая 2016 в 13:00 MSK. Присоединяйтесь!
+. . .
+- 2015-11-02 00:00 -
-Как и было обещано, мы готовы предоставить вам Редактор 0.7, с помощью которого можно создать тестовый цех. Тем не менее, после воссоздания цеха стало ясно, что:
-Поэтому мы решили провести прямую трансляцию на LiveCoding СКОРО, чтобы показать, как создать простую игру типа "поймай крота" с нуля.. . .
-Страница 6 из 7
+Страница 6 из 8
« Новее Старее » diff --git a/ru/news/index7.html b/ru/news/index7.html index 4c6f50e..df4286d 100644 --- a/ru/news/index7.html +++ b/ru/news/index7.html @@ -30,6 +30,25 @@
+ 2015-11-02 00:00 +
+Как и было обещано, мы готовы предоставить вам Редактор 0.7, с помощью которого можно создать тестовый цех. Тем не менее, после воссоздания цеха стало ясно, что:
+Поэтому мы решили провести прямую трансляцию на LiveCoding СКОРО, чтобы показать, как создать простую игру типа "поймай крота" с нуля.. . .
+- 2014-12-31 12:00 -
-Привет.
-Подходит к концу год, в течение которого мы разместили на сайте рекордно малое количество новостей. Мы не прекратили разработку, однако пока она находится в фазе "показывать нечего", а свободного времени, которое можно уделять проекту, у каждого из его участников сейчас найдется редко больше чем 30-40 часов в месяц.
-Но работа продвигается, и подробнее о ней расскажет статья нашего программиста Михаила Капелько.
-. . .
-Страница 7 из 7
+Страница 7 из 8
diff --git a/ru/news/index8.html b/ru/news/index8.html new file mode 100644 index 0000000..816874c --- /dev/null +++ b/ru/news/index8.html @@ -0,0 +1,63 @@ + + + + + + + + + ++ 2014-12-31 12:00 +
+Привет.
+Подходит к концу год, в течение которого мы разместили на сайте рекордно малое количество новостей. Мы не прекратили разработку, однако пока она находится в фазе "показывать нечего", а свободного времени, которое можно уделять проекту, у каждого из его участников сейчас найдется редко больше чем 30-40 часов в месяц.
+Но работа продвигается, и подробнее о ней расскажет статья нашего программиста Михаила Капелько.
+. . .
+Страница 8 из 8
++ « Новее +
+ + + ++ 2024-06-14 00:00 +
+В мае реализовал текстовый интерфейс игры «Память» на Python. В C++ перевёл инструментом.
+Реализация логического игрового цикла привела к появлению контроллера, управляющего +контекстом. Создание контроллера на Python прошло без происшествий, а вот с версией +для C++ пришлось помучиться. Мучения были вызваны тем, что контроллер использует +std::any из C++17, а инструмент ограничен C++11 с целью поддержки OpenWrt.
+Что касается объёма кода, то картина получилась следующей (в строках):
+В процентах выглядит это так:
+Язык | +Всего строк кода | +Портируемого | +Непортируемого | +
---|---|---|---|
Python | +1275 (100%) | +925 (72%) | +350 (28%) | +
C++ | +1511 (100%) | +946 (62%) | +565 (38%) | +
Выходит, что разработка версии игры «Память» на языке С++ оказалась на +62% строк кода дешевле, чем была бы без использования инструмента. Цифры +приятные.
+Сам текстовый интерфейс игры «Память» на текущий момент выглядит следующим образом:
+ +В июне сделаю простейший графический интерфейс для версии Python.
+