diff --git a/2017-08-scripting-research.png b/2017-08-scripting-research.png new file mode 100644 index 0000000..a2cfb8d Binary files /dev/null and b/2017-08-scripting-research.png differ diff --git a/README.md b/README.md index 4f045f4..0b26923 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,9 @@ Opensource Game Studio home website. The site is served at [http://localhost:8000](http://localhost:8000). +### Generate public copy + +`cd pelican` + +`pelican -s publishconf.py` + diff --git a/archives.html b/archives.html index 79dcd7d..6e06447 100644 --- a/archives.html +++ b/archives.html @@ -50,61 +50,25 @@ - + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sat 01 July 2017Ср 16 Август 2017Scripting research
Пн 17 Июль 2017 OpenSceneGraph cross-platform guide
Thu 08 June 2017Чт 08 Июнь 2017 iOS tutorial
Sat 03 June 2017Сб 03 Июнь 2017 Pelican review
Thu 01 June 2017Чт 01 Июнь 2017 My first review
Sun 01 January 2017kr10
Sun 01 January 2017kr9
Sun 01 January 2017kr8
Sun 01 January 2017kr7
Sun 01 January 2017kr6
Sun 01 January 2017kr5
Sun 01 January 2017kr4
Sun 01 January 2017kr3
Sun 01 January 2017kr2
Sun 01 January 2017kr1
diff --git a/author/opensource-game-studio.html b/author/opensource-game-studio.html index 25065ef..12729d7 100644 --- a/author/opensource-game-studio.html +++ b/author/opensource-game-studio.html @@ -47,52 +47,82 @@ +
+

Scripting research

+
Ср 16 Август 2017 + ru + +

Scripting research

+

This article describes scripting research in July 2017.

+

Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.

+

OGS Editor 0.10 supports Python for such a code thanks to SWIG. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.

+

Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like Kivy, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.

+

Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.

+

Our secondary goal for using a scripting language was to allow to extend C++ code.

+

OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.

+

To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.

+

First, we evaluated Python for the role of cross-platform scripting language.

+

Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at PyPy, another Python implementation. It also did not mention support for mobile and web platforms.

+

This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.

+

Second, we evaluated Wren for the role of cross-platform scripting language.

+

Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.

+

Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author had no time to document how to do the embedding in the first place. When we asked for the time estimates of publishing the critical part of the documentation, we just got a reference to another issue where the other guy was asking the same question half a year ago!

+

That's when we ended our relationship with Wren.

+

Third, we evaluated Chai for the role of cross-platform scripting language.

+

Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. We asked for help, but nobody replied.

+

We had to end our relationship with Chai.

+

Fourth, we evaluated Lua for the role of cross-platform scripting language.

+

Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the C API chapter we had no clue how to inherit a class inside Lua.

+

This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found Sol2. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and got the help! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but the author helped us out again. In the end, we succeeded in inheriting a class and overriding its behaviour.

+

That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.

+

This search for a scripting language taught us one important lesson: people matter, not technologies.

+

There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.

+

That's it for describing scripting research in July 2017.

Category: News + +

+ + +
+ + +
+ + + + +

OpenSceneGraph cross-platform guide

-
Sat 01 July 2017 +
Пн 17 Июль 2017 ru -

OpenSceneGraph guide

+

OpenSceneGraph guide

This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.

June marked the finish of OpenSceneGraph cross-platform guide with the publishing of the last (initially planned) tutorial. The tutorial describes how to build and run sample OpenSceneGraph application in Web using Emscripten. -In case you missed it, here's a link to the final application. Open it in your web browser.

-

We started to compose the guide in February when we successfully managed to render a simple model on mobile and web. -We spent 120 hours in five months to produce ten tutorials of the guide.

-

We have been doing OpenSceneGraph cross-platform guide for two main reasons:

-
    -
  1. Keep OpenSceneGraph cross-platform knowledge in easily accessible and reproducible form
  2. -
  3. Share the knowledge with OpenSceneGraph community to make it stronger
  4. -
-

We believe we succeeded in both. Here's why:

-
    -
  1. The guide repository has more stars (aka "likes") than any other repository of ours
  2. -
  3. OpenSceneGraph project leader Robert Osfield said "Great work", which means a lot
  4. -
  5. The guide already has two issues
  6. -
-

Reaching our goal of researching OpenSceneGraph cross-platform development and providing the knowledge back to the community just made us happier.

-

However, our journey does not stop here. Using the knowledge of the guide, we now continue to work on bringing our tools to support mobile and web, just as we promised in January.

-

That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.

Category: News +In case you missed it, here ...

Category: News

-
- - + Read More
- +

iOS tutorial

-
Thu 08 June 2017 +
Чт 08 Июнь 2017 ru -

iOS tutorial

+

iOS tutorial

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 …

Category: News +

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

Category: News

@@ -106,7 +136,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.

Pelican review

-
Sat 03 June 2017 +
Сб 03 Июнь 2017 ru

So far so nice. Pelican is really cool, and provides a quick starting guided @@ -126,7 +156,7 @@ to get up and running real fast.

My first review

-
Thu 01 June 2017 +
Чт 01 Июнь 2017 ru

Here is a full review, guys.

Category: Review @@ -138,121 +168,12 @@ to get up and running real fast.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Page 1 of 2
+
Page 1 of 1

- Next »

diff --git a/author/opensource-game-studio2.html b/author/opensource-game-studio2.html index 821d4bb..2337109 100644 --- a/author/opensource-game-studio2.html +++ b/author/opensource-game-studio2.html @@ -48,9 +48,27 @@ + + + + +

kr4

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr4

@@ -68,7 +86,7 @@

kr3

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr3

@@ -86,7 +104,7 @@

kr2

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr2

@@ -104,7 +122,7 @@

kr1

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr1

diff --git a/category/news.html b/category/news.html index fe0614d..04d48da 100644 --- a/category/news.html +++ b/category/news.html @@ -47,52 +47,82 @@ +
+

Scripting research

+
Ср 16 Август 2017 + ru + +

Scripting research

+

This article describes scripting research in July 2017.

+

Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.

+

OGS Editor 0.10 supports Python for such a code thanks to SWIG. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.

+

Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like Kivy, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.

+

Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.

+

Our secondary goal for using a scripting language was to allow to extend C++ code.

+

OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.

+

To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.

+

First, we evaluated Python for the role of cross-platform scripting language.

+

Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at PyPy, another Python implementation. It also did not mention support for mobile and web platforms.

+

This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.

+

Second, we evaluated Wren for the role of cross-platform scripting language.

+

Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.

+

Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author had no time to document how to do the embedding in the first place. When we asked for the time estimates of publishing the critical part of the documentation, we just got a reference to another issue where the other guy was asking the same question half a year ago!

+

That's when we ended our relationship with Wren.

+

Third, we evaluated Chai for the role of cross-platform scripting language.

+

Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. We asked for help, but nobody replied.

+

We had to end our relationship with Chai.

+

Fourth, we evaluated Lua for the role of cross-platform scripting language.

+

Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the C API chapter we had no clue how to inherit a class inside Lua.

+

This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found Sol2. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and got the help! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but the author helped us out again. In the end, we succeeded in inheriting a class and overriding its behaviour.

+

That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.

+

This search for a scripting language taught us one important lesson: people matter, not technologies.

+

There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.

+

That's it for describing scripting research in July 2017.

Category: News + +

+ + +
+ + +
+ + + + +

OpenSceneGraph cross-platform guide

-
Sat 01 July 2017 +
Пн 17 Июль 2017 ru -

OpenSceneGraph guide

+

OpenSceneGraph guide

This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.

June marked the finish of OpenSceneGraph cross-platform guide with the publishing of the last (initially planned) tutorial. The tutorial describes how to build and run sample OpenSceneGraph application in Web using Emscripten. -In case you missed it, here's a link to the final application. Open it in your web browser.

-

We started to compose the guide in February when we successfully managed to render a simple model on mobile and web. -We spent 120 hours in five months to produce ten tutorials of the guide.

-

We have been doing OpenSceneGraph cross-platform guide for two main reasons:

-
    -
  1. Keep OpenSceneGraph cross-platform knowledge in easily accessible and reproducible form
  2. -
  3. Share the knowledge with OpenSceneGraph community to make it stronger
  4. -
-

We believe we succeeded in both. Here's why:

-
    -
  1. The guide repository has more stars (aka "likes") than any other repository of ours
  2. -
  3. OpenSceneGraph project leader Robert Osfield said "Great work", which means a lot
  4. -
  5. The guide already has two issues
  6. -
-

Reaching our goal of researching OpenSceneGraph cross-platform development and providing the knowledge back to the community just made us happier.

-

However, our journey does not stop here. Using the knowledge of the guide, we now continue to work on bringing our tools to support mobile and web, just as we promised in January.

-

That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.

Category: News +In case you missed it, here ...

Category: News

-
- - + Read More
- +

iOS tutorial

-
Thu 08 June 2017 +
Чт 08 Июнь 2017 ru -

iOS tutorial

+

iOS tutorial

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 …

Category: News +

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

Category: News

diff --git a/category/review.html b/category/review.html index 23ec48c..cc5c05f 100644 --- a/category/review.html +++ b/category/review.html @@ -49,7 +49,7 @@

Pelican review

-
Sat 03 June 2017 +
Сб 03 Июнь 2017 ru

So far so nice. Pelican is really cool, and provides a quick starting guided @@ -71,7 +71,7 @@ to get up and running real fast.

My first review

-
Thu 01 June 2017 +
Чт 01 Июнь 2017 ru

Here is a full review, guys.

Category: Review @@ -83,157 +83,12 @@ to get up and running real fast.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Page 1 of 2
+
Page 1 of 1

- Next »

diff --git a/category/review2.html b/category/review2.html index 8e115b5..f72df82 100644 --- a/category/review2.html +++ b/category/review2.html @@ -50,7 +50,7 @@

kr2

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr2

@@ -68,7 +68,7 @@

kr1

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr1

diff --git a/feeds/all.atom.xml b/feeds/all.atom.xml index b47621b..7f3786a 100644 --- a/feeds/all.atom.xml +++ b/feeds/all.atom.xml @@ -1,8 +1,61 @@ -Opensource Game Studiohttps://ogstudio.github.io/2017-07-01T00:00:00+07:00OpenSceneGraph cross-platform guide2017-07-01T00:00:00+07:002017-07-01T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-01:/openscenegraph-cross-platform-guide.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> -<p>This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.</p> -<p>June marked the finish of <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> with the publishing of the last (initially planned) tutorial. The tutorial describes <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">how to build and run sample OpenSceneGraph application in Web</a> using Emscripten. -In case you missed it, here's …</p><p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> +Opensource Game Studiohttps://ogstudio.github.io/2017-08-16T00:00:00+07:00Scripting research2017-08-16T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-08-16:scripting-research.html<p><img alt="Scripting research" src="https://ogstudio.github.io/2017-08-scripting-research.png" /></p> +<p>This article describes scripting research in July 2017.</p> +<p><strong>Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.</strong></p> +<p>OGS Editor 0.10 supports Python for such a code thanks to <a href="http://swig.org/">SWIG</a>. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.</p> +<p>Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like <a href="https://kivy.org">Kivy</a>, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.</p> +<p>Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.</p> +<p><strong>Our secondary goal for using a scripting language was to allow to extend C++ code.</strong></p> +<p>OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.</p> +<p>To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.</p> +<p><strong>First, we evaluated Python for the role of cross-platform scripting language.</strong></p> +<p>Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at <a href="http://pypy.org">PyPy</a>, another Python implementation. It also did not mention support for mobile and web platforms.</p> +<p>This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.</p> +<p><strong>Second, we evaluated <a href="http://wren.io">Wren</a> for the role of cross-platform scripting language.</strong></p> +<p>Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.</p> +<p>Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author <a href="http://wren.io/embedding-api.html">had no time to document how to do the embedding in the first place</a>. When <a href="https://github.com/munificent/wren/issues/465">we asked for the time estimates of publishing</a> the critical part of the documentation, <a href="https://github.com/munificent/wren/issues/402">we just got a reference to another issue</a> where the other guy was asking the same question half a year ago!</p> +<p>That's when we ended our relationship with Wren.</p> +<p><strong>Third, we evaluated <a href="http://chaiscript.com">Chai</a> for the role of cross-platform scripting language.</strong></p> +<p>Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. <a href="http://discourse.chaiscript.com/t/cannot-call-a-function-that-accepts-a-string-and-a-vector/334">We asked for help</a>, but nobody replied.</p> +<p>We had to end our relationship with Chai.</p> +<p><strong>Fourth, we evaluated Lua for the role of cross-platform scripting language.</strong></p> +<p>Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the <a href="https://www.lua.org/pil/24.html">C API</a> chapter we had no clue how to inherit a class inside Lua.</p> +<p>This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found <a href="http://sol2.rtfd.io">Sol2</a>. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and <a href="https://github.com/ThePhD/sol2/issues/465">got the help</a>! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but <a href="https://github.com/ThePhD/sol2/issues/468">the author helped us out again</a>. In the end, we succeeded in inheriting a class and overriding its behaviour.</p> +<p>That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.</p> +<p><strong>This search for a scripting language taught us one important lesson: people matter, not technologies.</strong></p> +<p>There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.</p> +<p>That's it for describing scripting research in July 2017.</p>Изучение скриптования2017-08-16T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-08-16:scripting-research-ru.html<p><img alt="Изучение скриптования" src="https://ogstudio.github.io/2017-08-scripting-research.png" /></p> +<p>Эта статья описывает изучение скриптования в июле 2017.</p> +<p><strong>Наша основная цель использования скриптового языка - это наличие платформо-независимого кода, выполняемого без изменений на каждой поддерживаемой платформе.</strong></p> +<p>Редактор 0.10 использует Python в качестве подобного кода с помощью <a href="http://swig.org/">SWIG</a>. SWIG позволяет использовать практически любой код C/C++ из языков вроде Python, Ruby, Lua, Java, C# и т.д.. SWIG помог нам впервые оценить прелесть платформо-независимого кода. К сожалению, SWIG работает лишь в одном направлении: из C/C++ в язык назначения. Это приводит к тому, что основное приложение должно быть написано на языке назначения, а код C/C++ может быть использован лишь в виде библиотеки.</p> +<p>Основное приложение на языке Python вполне подходит для десктопа, но не для мобилок и веба, где языки C и C++ являются единственными языками, поддерживаемыми нативно на каждой платформе. Конечно, существуют проекты вроде <a href="https://kivy.org">Kivy</a>, которые позволяет разрабатывать кросс-платформенные приложения на Python, но они не поддерживаются нативно. Отсутствие нативной поддержки выливается в огромную головную боль при изменении API у Android и iOS.</p> +<p>Необходимость в приложении на C/C++ и поддержке скриптов приводит к обязательному интерпретированию скриптового языка самим приложением. Это как раз то, что SWIG, Kivy и подобные проекты не позволяют сделать.</p> +<p><strong>Наша вторичная цель использования скриптового языка - это возможность расширения кода C++.</strong></p> +<p>Одни модули Редактора 0.10 написаны на C++, а другие на Python. С точки зрения основного приложения, все модули равны. Для приложения нет никакой разницы, на каком языке написан конкретный модуль.</p> +<p>Для достижения этой гибкости мы ввели так называемое Окружение (Environment). Каждый модуль регистрирует ключи (keys), на которые он отвечает, а Окружение доставляет соответствующие сообщения. Технически такое поведение можно достигнуть с помощью наследования базового класса и переопределения его методов как в C++, так и в скриптовом языке.</p> +<p><strong>Python был первым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.</strong></p> +<p>Т.к. мы уже использовали Python, то логично было начать изучение с него. Мы хотели проверить, можно ли запустить код Python на каждой поддерживаемой платформе. К сожалению, результаты были удручающими, т.к. документация CPython (реализация Python, используемая по умолчанию на десктопе) никак не упоминала ни мобилки, ни веб. Всё, что мы нашли, - это пара форков CPython лохматых годов, которые якобы работают либо на Android, либо на iOS. Такой раздрай нас не устроил. +Мы также рассмотрели <a href="http://pypy.org">PyPy</a>, ещё одну реализацию Python, но она тоже не содержала информации о мобилках и вебе.</p> +<p>Это было чётким сигналом об отсутствии интереса к мобилками и вебу со стороны сообщества Python. Либо об отсутствии времени даже на то, чтобы описать использование Python на данных платформах. В любом случае, такое положение вещей нас не устроило.</p> +<p><strong><a href="http://wren.io">Wren</a> был вторым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.</strong></p> +<p>Wren был первым языком из длинного списка малоизвестных скриптовых языков.</p> +<p>Wren преподносился как небольшой и простой язык. Согласно документации, основная цель Wren - это быть встроенным в приложение. По иронии судьбы, у автора <a href="http://wren.io/embedding-api.html">не было времени описать в документации встраивание Wren</a> в приложение. Когда мы <a href="https://github.com/munificent/wren/issues/465">спросили о сроках публикации</a> этой критически важной части документации, мы <a href="https://github.com/munificent/wren/issues/402">получили в ответ ссылку на тикет</a>, в котором другой человек спрашивал тот же самый вопрос полгода назад!</p> +<p>На этом мы закончили отношения с Wren.</p> +<p><strong><a href="http://chaiscript.com">Chai</a> был третьим языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.</strong></p> +<p>Chai был в том же длинном списке малоизвестных скриптовых языков. Он преподносился как язык, специально предназначенный для встраивания в приложения C++. Мы без проблем вызвали функцию C++ из Chai, но нам не удалось вызвать метод класса. <a href="http://discourse.chaiscript.com/t/cannot-call-a-function-that-accepts-a-string-and-a-vector/334">Мы попросили о помощи</a>, но ответом была лишь тишина.</p> +<p>Нам пришлось завершить отношения с Chai.</p> +<p><strong>Lua был четвёртым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.</strong></p> +<p>Lua является популярным языком для встраивания. Мы решили попробовать очевидный вариант. Документация выглядела многообещающе, однако под конец чтения главы <a href="https://www.lua.org/pil/24.html">C API</a> у нас не было ни малейшего представления, как наследовать класс C++ в Lua.</p> +<p>Этот вопрос заставил нас найти библиотеку, которая смогла бы на него ответить: <a href="http://sol2.rtfd.io">Sol2</a>. Первая попытка вызвать функцию C++ из Lua провалилась. Правда, на этот раз наш вопрос был услышан, и <a href="https://github.com/ThePhD/sol2/issues/465">мы получили ответ</a>! Мы были сильно удивлены. +Далее мы попытались наследовать класс C++ в Lua, чтобы переопределить методы класса. Нам это не удалось с первого раза, но автор Sol2 <a href="https://github.com/ThePhD/sol2/issues/468">снова помог нам</a>.</p> +<p>В тот момент мы поняли, что это начало долгого и взаимовыгодного сотрудничества с Sol2/Lua.</p> +<p><strong>Поиск скриптового языка открыл для нас следующую истину: люди важнее технологий.</strong></p> +<p>Существует множество скриптовых языков, которые выглядят привлекательно на первый взгляд, но которые мертвы. Почему? Потому что у некоторых авторов нет времени на пользователей. В ответ пользователи предпочитают не тратить своё время на проекты подобных авторов.</p> +<p>На этом мы заканчиваем описание изучения скриптования в июле 2017.</p>OpenSceneGraph cross-platform guide2017-07-17T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-17:openscenegraph-cross-platform-guide.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png" /></p> <p>This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.</p> <p>June marked the finish of <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> with the publishing of the last (initially planned) tutorial. The tutorial describes <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">how to build and run sample OpenSceneGraph application in Web</a> using Emscripten. In case you missed it, here's a <a href="https://ogstudio.github.io/openscenegraph-cross-platform-guide/">link to the final application</a>. Open it in your web browser.</p> @@ -21,10 +74,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g </ol> <p>Reaching our goal of researching OpenSceneGraph cross-platform development and providing the knowledge back to the community just made us happier.</p> <p>However, our journey does not stop here. Using the knowledge of the guide, we now continue to work on bringing our tools to support mobile and web, just as we <a href="http://opengamestudio.org/lang/en/news/2456">promised in January</a>.</p> -<p>That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.</p>OpenSceneGraph cross-platform guide2017-07-01T00:00:00+07:002017-07-01T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-01:/openscenegraph-cross-platform-guide-ru.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> -<p>Эта статья резюмирует создание кросс-платформенного руководства OpenSceneGraph.</p> -<p>Июнь ознаменовал собой окончание работы над <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">кросс-платформенным руководством OpenSceneGraph</a>. Мы опубликовали последний самоучитель (из изначально запланированных). Этот самоучитель описывает <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">сборку и запуск примера приложения OpenSceneGraph в вебе</a> с помощью Emscripten. -Если вы упустили этот самоучитель, то вот <a href="https://ogstudio.github.io/openscenegraph-cross-platform-guide/">ссылка на приложение</a> из него. Откройте …</p><p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> +<p>That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.</p>OpenSceneGraph cross-platform guide2017-07-17T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-17:openscenegraph-cross-platform-guide-ru.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png" /></p> <p>Эта статья резюмирует создание кросс-платформенного руководства OpenSceneGraph.</p> <p>Июнь ознаменовал собой окончание работы над <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">кросс-платформенным руководством OpenSceneGraph</a>. Мы опубликовали последний самоучитель (из изначально запланированных). Этот самоучитель описывает <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">сборку и запуск примера приложения OpenSceneGraph в вебе</a> с помощью Emscripten. Если вы упустили этот самоучитель, то вот <a href="https://ogstudio.github.io/openscenegraph-cross-platform-guide/">ссылка на приложение</a> из него. Откройте ссылку в веб-браузере.</p> @@ -43,9 +93,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g </ol> <p>В конце концов, мы просто рады тому факту, что изучили кросс-платформенную разработку с OpenSceneGraph и поделились этим знанием с сообществом.</p> <p>Тем не менее, наше путешествие на этом не окончено. Используя знания руководства, мы продолжаем работу над тем, чтобы добавить в свои инструменты поддержку мобилок и веба, как мы <a href="http://opengamestudio.org/lang/ru/news/2456">обещали в январе</a>.</p> -<p>На этом мы заканчиваем резюме о создании кросс-платформенного руководства OpenSceneGraph.</p>iOS tutorial2017-06-08T10:00:00+07:002017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:/ios-tutorial.html<p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></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 …</p><p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></p> +<p>На этом мы заканчиваем резюме о создании кросс-платформенного руководства OpenSceneGraph.</p>iOS tutorial2017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:ios-tutorial.html<p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png" /></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> <h3>Native library</h3> @@ -84,9 +132,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g <li>main.h - contains the rest of the sample application code</li> </ol> <p>Their contents differ slightly for each platform, but it's easy to see the whole picture now.</p> -<p>That's it for describing problems we faced during the creation of iOS tutorial in May 2017.</p>Самоучитель iOS2017-06-08T10:00:00+07:002017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:/ios-tutorial-ru.html<p><img alt="Самоучитель iOS" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></p> -<p>Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p> -<p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">В феврале</a> мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой …</p><p><img alt="Самоучитель iOS" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></p> +<p>That's it for describing problems we faced during the creation of iOS tutorial in May 2017.</p>Самоучитель iOS2017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:ios-tutorial-ru.html<p><img alt="Самоучитель iOS" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png" /></p> <p>Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p> <p><a href="https://twitter.com/OpenGameStudio/status/826816343433498627">В феврале</a> мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.</p> <h3>Нативная библиотека</h3> @@ -125,56 +171,10 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g <li>main.h - содержит остальной код приложения</li> </ol> <p>Их содержимое несколько отличается для каждой из платформ, но наличие всего двух файлов позволяет увидеть общую картину.</p> -<p>На этом мы заканчиваем описание проблем, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p>Pelican review2017-06-03T22:00:00+07:002017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:/pelican-review.html<p>So far so nice. Pelican is really cool, and provides a quick starting guided -to get up and running real fast.</p> -<p>Much more smooth than Jekyll.</p> -<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p><p>So far so nice. Pelican is really cool, and provides a quick starting guided +<p>На этом мы заканчиваем описание проблем, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.</p>Pelican review2017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:pelican-review.html<p>So far so nice. Pelican is really cool, and provides a quick starting guided to get up and running real fast.</p> <p>Much more smooth than Jekyll.</p> -<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p>Обзор Pelican2017-06-03T22:00:00+07:002017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:/pelican-review-ru.html<p>Пока что полёт нормальный. Pelican действительно крут, позволяет -быстро всё настроить и запуститься.</p> -<p>Намного легче, чем Jekyll.</p> -<p>&lt;3 Python и его экосистему. Что-то просто ЛЕГЧЕ в Python.</p><p>Пока что полёт нормальный. Pelican действительно крут, позволяет +<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p>Обзор Pelican2017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:pelican-review-ru.html<p>Пока что полёт нормальный. Pelican действительно крут, позволяет быстро всё настроить и запуститься.</p> <p>Намного легче, чем Jekyll.</p> -<p>&lt;3 Python и его экосистему. Что-то просто ЛЕГЧЕ в Python.</p>My first review2017-06-01T10:20:00+07:002017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:/keyboard-review.html<p>Here is a full review, guys.</p><p>Here is a full review, guys.</p>Моё первое ревью2017-06-01T10:20:00+07:002017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:/keyboard-review-ru.html<p>Вот и моё первое ревью, чуввви.</p><p>Вот и моё первое ревью, чуввви.</p>kr102017-01-01T10:04:00+07:002017-01-01T10:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr10.html<p>kr10</p> -<p>LANG: en</p><p>kr10</p> -<p>LANG: en</p>kr102017-01-01T10:04:00+07:002017-01-01T10:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr10-ru.html<p>kr10</p> -<p>LANG: ru</p><p>kr10</p> -<p>LANG: ru</p>kr92017-01-01T09:04:00+07:002017-01-01T09:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr9.html<p>kr9</p> -<p>LANG: en</p><p>kr9</p> -<p>LANG: en</p>kr92017-01-01T09:04:00+07:002017-01-01T09:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr9-ru.html<p>kr9</p> -<p>LANG: ru</p><p>kr9</p> -<p>LANG: ru</p>kr82017-01-01T08:04:00+07:002017-01-01T08:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr8.html<p>kr8</p> -<p>LANG: en</p><p>kr8</p> -<p>LANG: en</p>kr82017-01-01T08:04:00+07:002017-01-01T08:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr8-ru.html<p>kr8</p> -<p>LANG: ru</p><p>kr8</p> -<p>LANG: ru</p>kr72017-01-01T07:04:00+07:002017-01-01T07:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr7.html<p>kr7</p> -<p>LANG: en</p><p>kr7</p> -<p>LANG: en</p>kr72017-01-01T07:04:00+07:002017-01-01T07:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr7-ru.html<p>kr7</p> -<p>LANG: ru</p><p>kr7</p> -<p>LANG: ru</p>kr62017-01-01T06:04:00+07:002017-01-01T06:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr6.html<p>kr6</p> -<p>LANG: en</p><p>kr6</p> -<p>LANG: en</p>kr62017-01-01T06:04:00+07:002017-01-01T06:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr6-ru.html<p>kr6</p> -<p>LANG: ru</p><p>kr6</p> -<p>LANG: ru</p>kr52017-01-01T05:04:00+07:002017-01-01T05:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr5.html<p>kr5</p> -<p>LANG: en</p><p>kr5</p> -<p>LANG: en</p>kr52017-01-01T05:04:00+07:002017-01-01T05:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr5-ru.html<p>kr5</p> -<p>LANG: ru</p><p>kr5</p> -<p>LANG: ru</p>kr42017-01-01T04:04:00+07:002017-01-01T04:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr4.html<p>kr4</p> -<p>LANG: en</p><p>kr4</p> -<p>LANG: en</p>kr42017-01-01T04:04:00+07:002017-01-01T04:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr4-ru.html<p>kr4</p> -<p>LANG: ru</p><p>kr4</p> -<p>LANG: ru</p>kr32017-01-01T03:04:00+07:002017-01-01T03:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr3.html<p>kr3</p> -<p>LANG: en</p><p>kr3</p> -<p>LANG: en</p>kr32017-01-01T03:04:00+07:002017-01-01T03:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr3-ru.html<p>kr3</p> -<p>LANG: ru</p><p>kr3</p> -<p>LANG: ru</p>kr22017-01-01T02:04:00+07:002017-01-01T02:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr2.html<p>kr2</p> -<p>LANG: en</p><p>kr2</p> -<p>LANG: en</p>kr22017-01-01T02:04:00+07:002017-01-01T02:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr2-ru.html<p>kr2</p> -<p>LANG: ru</p><p>kr2</p> -<p>LANG: ru</p>kr12017-01-01T01:04:00+07:002017-01-01T01:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr1.html<p>kr1</p> -<p>LANG: en</p><p>kr1</p> -<p>LANG: en</p>kr12017-01-01T01:04:00+07:002017-01-01T01:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr1-ru.html<p>kr1</p> -<p>LANG: ru</p><p>kr1</p> -<p>LANG: ru</p> \ No newline at end of file +<p>&lt;3 Python и его экосистему. Что-то просто ЛЕГЧЕ в Python.</p>My first review2017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:keyboard-review.html<p>Here is a full review, guys.</p>Моё первое ревью2017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:keyboard-review-ru.html<p>Вот и моё первое ревью, чуввви.</p> \ No newline at end of file diff --git a/feeds/news.atom.xml b/feeds/news.atom.xml index 3c32ded..c7f8648 100644 --- a/feeds/news.atom.xml +++ b/feeds/news.atom.xml @@ -1,8 +1,34 @@ -Opensource Game Studio - Newshttps://ogstudio.github.io/2017-07-01T00:00:00+07:00OpenSceneGraph cross-platform guide2017-07-01T00:00:00+07:002017-07-01T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-01:/openscenegraph-cross-platform-guide.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> -<p>This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.</p> -<p>June marked the finish of <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> with the publishing of the last (initially planned) tutorial. The tutorial describes <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">how to build and run sample OpenSceneGraph application in Web</a> using Emscripten. -In case you missed it, here's …</p><p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png"></p> +Opensource Game Studiohttps://ogstudio.github.io/2017-08-16T00:00:00+07:00Scripting research2017-08-16T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-08-16:scripting-research.html<p><img alt="Scripting research" src="https://ogstudio.github.io/2017-08-scripting-research.png" /></p> +<p>This article describes scripting research in July 2017.</p> +<p><strong>Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.</strong></p> +<p>OGS Editor 0.10 supports Python for such a code thanks to <a href="http://swig.org/">SWIG</a>. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.</p> +<p>Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like <a href="https://kivy.org">Kivy</a>, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.</p> +<p>Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.</p> +<p><strong>Our secondary goal for using a scripting language was to allow to extend C++ code.</strong></p> +<p>OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.</p> +<p>To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.</p> +<p><strong>First, we evaluated Python for the role of cross-platform scripting language.</strong></p> +<p>Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at <a href="http://pypy.org">PyPy</a>, another Python implementation. It also did not mention support for mobile and web platforms.</p> +<p>This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.</p> +<p><strong>Second, we evaluated <a href="http://wren.io">Wren</a> for the role of cross-platform scripting language.</strong></p> +<p>Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.</p> +<p>Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author <a href="http://wren.io/embedding-api.html">had no time to document how to do the embedding in the first place</a>. When <a href="https://github.com/munificent/wren/issues/465">we asked for the time estimates of publishing</a> the critical part of the documentation, <a href="https://github.com/munificent/wren/issues/402">we just got a reference to another issue</a> where the other guy was asking the same question half a year ago!</p> +<p>That's when we ended our relationship with Wren.</p> +<p><strong>Third, we evaluated <a href="http://chaiscript.com">Chai</a> for the role of cross-platform scripting language.</strong></p> +<p>Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. <a href="http://discourse.chaiscript.com/t/cannot-call-a-function-that-accepts-a-string-and-a-vector/334">We asked for help</a>, but nobody replied.</p> +<p>We had to end our relationship with Chai.</p> +<p><strong>Fourth, we evaluated Lua for the role of cross-platform scripting language.</strong></p> +<p>Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the <a href="https://www.lua.org/pil/24.html">C API</a> chapter we had no clue how to inherit a class inside Lua.</p> +<p>This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found <a href="http://sol2.rtfd.io">Sol2</a>. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and <a href="https://github.com/ThePhD/sol2/issues/465">got the help</a>! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but <a href="https://github.com/ThePhD/sol2/issues/468">the author helped us out again</a>. In the end, we succeeded in inheriting a class and overriding its behaviour.</p> +<p>That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.</p> +<p><strong>This search for a scripting language taught us one important lesson: people matter, not technologies.</strong></p> +<p>There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.</p> +<p>That's it for describing scripting research in July 2017.</p>OpenSceneGraph cross-platform guide2017-07-17T00:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-07-17:openscenegraph-cross-platform-guide.html<p><img alt="OpenSceneGraph guide" src="https://ogstudio.github.io/2017-07-openscenegraph-guide.png" /></p> <p>This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.</p> <p>June marked the finish of <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> with the publishing of the last (initially planned) tutorial. The tutorial describes <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.10.SampleWeb">how to build and run sample OpenSceneGraph application in Web</a> using Emscripten. In case you missed it, here's a <a href="https://ogstudio.github.io/openscenegraph-cross-platform-guide/">link to the final application</a>. Open it in your web browser.</p> @@ -21,9 +47,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g </ol> <p>Reaching our goal of researching OpenSceneGraph cross-platform development and providing the knowledge back to the community just made us happier.</p> <p>However, our journey does not stop here. Using the knowledge of the guide, we now continue to work on bringing our tools to support mobile and web, just as we <a href="http://opengamestudio.org/lang/en/news/2456">promised in January</a>.</p> -<p>That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.</p>iOS tutorial2017-06-08T10:00:00+07:002017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:/ios-tutorial.html<p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></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 …</p><p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png"></p> +<p>That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.</p>iOS tutorial2017-06-08T10:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-08:ios-tutorial.html<p><img alt="iOS tutorial" src="https://ogstudio.github.io/2017-06-08-ios-refactoring.png" /></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> <h3>Native library</h3> @@ -62,4 +86,4 @@ We spent 120 hours in five months to produce ten tutorials of the guide.</p&g <li>main.h - contains the rest of the sample application code</li> </ol> <p>Their contents differ slightly for each platform, but it's easy to see the whole picture now.</p> -<p>That's it for describing problems we faced during the creation of iOS tutorial in May 2017.</p> \ No newline at end of file +<p>That's it for describing problems we faced during the creation of iOS tutorial in May 2017.</p> \ No newline at end of file diff --git a/feeds/review.atom.xml b/feeds/review.atom.xml index f6842bb..bbc688d 100644 --- a/feeds/review.atom.xml +++ b/feeds/review.atom.xml @@ -1,28 +1,5 @@ -Opensource Game Studio - Reviewhttps://ogstudio.github.io/2017-06-03T22:00:00+07:00Pelican review2017-06-03T22:00:00+07:002017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:/pelican-review.html<p>So far so nice. Pelican is really cool, and provides a quick starting guided +Opensource Game Studiohttps://ogstudio.github.io/2017-06-03T22:00:00+07:00Pelican review2017-06-03T22:00:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-03:pelican-review.html<p>So far so nice. Pelican is really cool, and provides a quick starting guided to get up and running real fast.</p> <p>Much more smooth than Jekyll.</p> -<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p><p>So far so nice. Pelican is really cool, and provides a quick starting guided -to get up and running real fast.</p> -<p>Much more smooth than Jekyll.</p> -<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p>My first review2017-06-01T10:20:00+07:002017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:/keyboard-review.html<p>Here is a full review, guys.</p><p>Here is a full review, guys.</p>kr102017-01-01T10:04:00+07:002017-01-01T10:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr10.html<p>kr10</p> -<p>LANG: en</p><p>kr10</p> -<p>LANG: en</p>kr92017-01-01T09:04:00+07:002017-01-01T09:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr9.html<p>kr9</p> -<p>LANG: en</p><p>kr9</p> -<p>LANG: en</p>kr82017-01-01T08:04:00+07:002017-01-01T08:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr8.html<p>kr8</p> -<p>LANG: en</p><p>kr8</p> -<p>LANG: en</p>kr72017-01-01T07:04:00+07:002017-01-01T07:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr7.html<p>kr7</p> -<p>LANG: en</p><p>kr7</p> -<p>LANG: en</p>kr62017-01-01T06:04:00+07:002017-01-01T06:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr6.html<p>kr6</p> -<p>LANG: en</p><p>kr6</p> -<p>LANG: en</p>kr52017-01-01T05:04:00+07:002017-01-01T05:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr5.html<p>kr5</p> -<p>LANG: en</p><p>kr5</p> -<p>LANG: en</p>kr42017-01-01T04:04:00+07:002017-01-01T04:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr4.html<p>kr4</p> -<p>LANG: en</p><p>kr4</p> -<p>LANG: en</p>kr32017-01-01T03:04:00+07:002017-01-01T03:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr3.html<p>kr3</p> -<p>LANG: en</p><p>kr3</p> -<p>LANG: en</p>kr22017-01-01T02:04:00+07:002017-01-01T02:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr2.html<p>kr2</p> -<p>LANG: en</p><p>kr2</p> -<p>LANG: en</p>kr12017-01-01T01:04:00+07:002017-01-01T01:04:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-01-01:/kr1.html<p>kr1</p> -<p>LANG: en</p><p>kr1</p> -<p>LANG: en</p> \ No newline at end of file +<p>I &lt;3 Python and its ecosystem. Something is just EASIER in Python.</p>My first review2017-06-01T10:20:00+07:00Opensource Game Studiotag:ogstudio.github.io,2017-06-01:keyboard-review.html<p>Here is a full review, guys.</p> \ No newline at end of file diff --git a/index.html b/index.html index 178d4a9..4674474 100644 --- a/index.html +++ b/index.html @@ -47,52 +47,82 @@ +
+

Scripting research

+
Ср 16 Август 2017 + ru + +

Scripting research

+

This article describes scripting research in July 2017.

+

Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.

+

OGS Editor 0.10 supports Python for such a code thanks to SWIG. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.

+

Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like Kivy, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.

+

Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.

+

Our secondary goal for using a scripting language was to allow to extend C++ code.

+

OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.

+

To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.

+

First, we evaluated Python for the role of cross-platform scripting language.

+

Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at PyPy, another Python implementation. It also did not mention support for mobile and web platforms.

+

This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.

+

Second, we evaluated Wren for the role of cross-platform scripting language.

+

Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.

+

Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author had no time to document how to do the embedding in the first place. When we asked for the time estimates of publishing the critical part of the documentation, we just got a reference to another issue where the other guy was asking the same question half a year ago!

+

That's when we ended our relationship with Wren.

+

Third, we evaluated Chai for the role of cross-platform scripting language.

+

Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. We asked for help, but nobody replied.

+

We had to end our relationship with Chai.

+

Fourth, we evaluated Lua for the role of cross-platform scripting language.

+

Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the C API chapter we had no clue how to inherit a class inside Lua.

+

This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found Sol2. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and got the help! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but the author helped us out again. In the end, we succeeded in inheriting a class and overriding its behaviour.

+

That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.

+

This search for a scripting language taught us one important lesson: people matter, not technologies.

+

There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.

+

That's it for describing scripting research in July 2017.

Category: News + +

+ + +
+ + +
+ + + + +

OpenSceneGraph cross-platform guide

-
Sat 01 July 2017 +
Пн 17 Июль 2017 ru -

OpenSceneGraph guide

+

OpenSceneGraph guide

This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.

June marked the finish of OpenSceneGraph cross-platform guide with the publishing of the last (initially planned) tutorial. The tutorial describes how to build and run sample OpenSceneGraph application in Web using Emscripten. -In case you missed it, here's a link to the final application. Open it in your web browser.

-

We started to compose the guide in February when we successfully managed to render a simple model on mobile and web. -We spent 120 hours in five months to produce ten tutorials of the guide.

-

We have been doing OpenSceneGraph cross-platform guide for two main reasons:

-
    -
  1. Keep OpenSceneGraph cross-platform knowledge in easily accessible and reproducible form
  2. -
  3. Share the knowledge with OpenSceneGraph community to make it stronger
  4. -
-

We believe we succeeded in both. Here's why:

-
    -
  1. The guide repository has more stars (aka "likes") than any other repository of ours
  2. -
  3. OpenSceneGraph project leader Robert Osfield said "Great work", which means a lot
  4. -
  5. The guide already has two issues
  6. -
-

Reaching our goal of researching OpenSceneGraph cross-platform development and providing the knowledge back to the community just made us happier.

-

However, our journey does not stop here. Using the knowledge of the guide, we now continue to work on bringing our tools to support mobile and web, just as we promised in January.

-

That's it for summarizing the work we did to produce OpenSceneGraph cross-platform guide.

Category: News +In case you missed it, here ...

Category: News

-
- - + Read More
- +

iOS tutorial

-
Thu 08 June 2017 +
Чт 08 Июнь 2017 ru -

iOS tutorial

+

iOS tutorial

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 …

Category: News +

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

Category: News

@@ -106,7 +136,7 @@ We spent 120 hours in five months to produce ten tutorials of the guide.

Pelican review

-
Sat 03 June 2017 +
Сб 03 Июнь 2017 ru

So far so nice. Pelican is really cool, and provides a quick starting guided @@ -126,7 +156,7 @@ to get up and running real fast.

My first review

-
Thu 01 June 2017 +
Чт 01 Июнь 2017 ru

Here is a full review, guys.

Category: Review @@ -138,121 +168,12 @@ to get up and running real fast.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Page 1 of 2
+
Page 1 of 1

- Next »

diff --git a/index2.html b/index2.html index 0987448..8f2dedd 100644 --- a/index2.html +++ b/index2.html @@ -48,9 +48,27 @@ + + + + +

kr4

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr4

@@ -68,7 +86,7 @@

kr3

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr3

@@ -86,7 +104,7 @@

kr2

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr2

@@ -104,7 +122,7 @@

kr1

-
Sun 01 January 2017 +
Вс 01 Январь 2017 ru

kr1

diff --git a/ios-tutorial-ru.html b/ios-tutorial-ru.html index 794a531..afd5a3d 100644 --- a/ios-tutorial-ru.html +++ b/ios-tutorial-ru.html @@ -50,10 +50,10 @@ title="Permalink to Самоучитель iOS">Самоучитель iOS -
Thu 08 June 2017 +
Чт 08 Июнь 2017 en -

Самоучитель iOS

+

Самоучитель iOS

Эта статья описывает проблемы, с которыми мы столкнулись во время создания самоучителя для iOS в мае 2017.

В феврале мы сумели отобразить простую модель под iOS за считанные дни. Это дало нам уверенность, что самоучитель для iOS мы сделаем столь же быстро. Тем не менее, реальность напомнила нам о простой вещи: быстро сделать можно лишь поделку на коленке, работающую только у самого разработчика; над логически связанным примером, работающим у всех, придётся попотеть.

Нативная библиотека

diff --git a/ios-tutorial.html b/ios-tutorial.html index 2dab0d8..1965996 100644 --- a/ios-tutorial.html +++ b/ios-tutorial.html @@ -50,10 +50,10 @@ title="Permalink to iOS tutorial">iOS tutorial -
Thu 08 June 2017 +
Чт 08 Июнь 2017 ru -

iOS tutorial

+

iOS tutorial

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.

Native library

diff --git a/keyboard-review-ru.html b/keyboard-review-ru.html index 98fb5bc..18ba4be 100644 --- a/keyboard-review-ru.html +++ b/keyboard-review-ru.html @@ -50,7 +50,7 @@ title="Permalink to Моё первое ревью">Моё первое ревью -
Thu 01 June 2017 +
Чт 01 Июнь 2017 en

Вот и моё первое ревью, чуввви.

diff --git a/keyboard-review.html b/keyboard-review.html index 5651edf..91fbf35 100644 --- a/keyboard-review.html +++ b/keyboard-review.html @@ -50,7 +50,7 @@ title="Permalink to My first review">My first review -
Thu 01 June 2017 +
Чт 01 Июнь 2017 ru

Here is a full review, guys.

diff --git a/kr1-ru.html b/kr1-ru.html deleted file mode 100644 index 264b3fc..0000000 --- a/kr1-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr1 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr1

-
- -
Sun 01 January 2017 - en - -

kr1

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr1.html b/kr1.html deleted file mode 100644 index b1e3c51..0000000 --- a/kr1.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr1 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr1

-
- -
Sun 01 January 2017 - ru - -

kr1

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr10-ru.html b/kr10-ru.html deleted file mode 100644 index 06d05a1..0000000 --- a/kr10-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr10 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr10

-
- -
Sun 01 January 2017 - en - -

kr10

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr10.html b/kr10.html deleted file mode 100644 index 00f4e94..0000000 --- a/kr10.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr10 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr10

-
- -
Sun 01 January 2017 - ru - -

kr10

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr2-ru.html b/kr2-ru.html deleted file mode 100644 index f17c312..0000000 --- a/kr2-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr2 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr2

-
- -
Sun 01 January 2017 - en - -

kr2

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr2.html b/kr2.html deleted file mode 100644 index efaf407..0000000 --- a/kr2.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr2 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr2

-
- -
Sun 01 January 2017 - ru - -

kr2

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr3-ru.html b/kr3-ru.html deleted file mode 100644 index dbf0013..0000000 --- a/kr3-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr3 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr3

-
- -
Sun 01 January 2017 - en - -

kr3

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr3.html b/kr3.html deleted file mode 100644 index 6314712..0000000 --- a/kr3.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr3 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr3

-
- -
Sun 01 January 2017 - ru - -

kr3

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr4-ru.html b/kr4-ru.html deleted file mode 100644 index 464ad14..0000000 --- a/kr4-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr4 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr4

-
- -
Sun 01 January 2017 - en - -

kr4

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr4.html b/kr4.html deleted file mode 100644 index c4fc7bf..0000000 --- a/kr4.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr4 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr4

-
- -
Sun 01 January 2017 - ru - -

kr4

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr5-ru.html b/kr5-ru.html deleted file mode 100644 index e433d8e..0000000 --- a/kr5-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr5 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr5

-
- -
Sun 01 January 2017 - en - -

kr5

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr5.html b/kr5.html deleted file mode 100644 index ad4cf58..0000000 --- a/kr5.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr5 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr5

-
- -
Sun 01 January 2017 - ru - -

kr5

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr6-ru.html b/kr6-ru.html deleted file mode 100644 index bef3cda..0000000 --- a/kr6-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr6 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr6

-
- -
Sun 01 January 2017 - en - -

kr6

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr6.html b/kr6.html deleted file mode 100644 index 8d74441..0000000 --- a/kr6.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr6 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr6

-
- -
Sun 01 January 2017 - ru - -

kr6

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr7-ru.html b/kr7-ru.html deleted file mode 100644 index 94d2f66..0000000 --- a/kr7-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr7 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr7

-
- -
Sun 01 January 2017 - en - -

kr7

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr7.html b/kr7.html deleted file mode 100644 index b58ecd7..0000000 --- a/kr7.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr7 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr7

-
- -
Sun 01 January 2017 - ru - -

kr7

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr8-ru.html b/kr8-ru.html deleted file mode 100644 index eb3c2d1..0000000 --- a/kr8-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr8 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr8

-
- -
Sun 01 January 2017 - en - -

kr8

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr8.html b/kr8.html deleted file mode 100644 index 01aa1c2..0000000 --- a/kr8.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr8 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr8

-
- -
Sun 01 January 2017 - ru - -

kr8

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr9-ru.html b/kr9-ru.html deleted file mode 100644 index d6e8f35..0000000 --- a/kr9-ru.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr9 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr9

-
- -
Sun 01 January 2017 - en - -

kr9

-

LANG: ru

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/kr9.html b/kr9.html deleted file mode 100644 index 990124d..0000000 --- a/kr9.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - kr9 - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
-

kr9

-
- -
Sun 01 January 2017 - ru - -

kr9

-

LANG: en

-

Category: Review - -

- - - -
-
- - - - - -
- - - -
-
-
-
-
-

Proudly powered by Pelican, which takes great advantage of Python.

-
-
-
-
\ No newline at end of file diff --git a/openscenegraph-cross-platform-guide-ru.html b/openscenegraph-cross-platform-guide-ru.html index 1a2faa0..8e81a0b 100644 --- a/openscenegraph-cross-platform-guide-ru.html +++ b/openscenegraph-cross-platform-guide-ru.html @@ -50,10 +50,10 @@ title="Permalink to OpenSceneGraph cross-platform guide">OpenSceneGraph cross-platform guide -
Sat 01 July 2017 +
Пн 17 Июль 2017 en -

OpenSceneGraph guide

+

OpenSceneGraph guide

Эта статья резюмирует создание кросс-платформенного руководства OpenSceneGraph.

Июнь ознаменовал собой окончание работы над кросс-платформенным руководством OpenSceneGraph. Мы опубликовали последний самоучитель (из изначально запланированных). Этот самоучитель описывает сборку и запуск примера приложения OpenSceneGraph в вебе с помощью Emscripten. Если вы упустили этот самоучитель, то вот ссылка на приложение из него. Откройте ссылку в веб-браузере.

diff --git a/openscenegraph-cross-platform-guide.html b/openscenegraph-cross-platform-guide.html index f0f2080..918a8e6 100644 --- a/openscenegraph-cross-platform-guide.html +++ b/openscenegraph-cross-platform-guide.html @@ -50,10 +50,10 @@ title="Permalink to OpenSceneGraph cross-platform guide">OpenSceneGraph cross-platform guide -
Sat 01 July 2017 +
Пн 17 Июль 2017 ru -

OpenSceneGraph guide

+

OpenSceneGraph guide

This article summarizes the work we did to produce OpenSceneGraph cross-platform guide.

June marked the finish of OpenSceneGraph cross-platform guide with the publishing of the last (initially planned) tutorial. The tutorial describes how to build and run sample OpenSceneGraph application in Web using Emscripten. In case you missed it, here's a link to the final application. Open it in your web browser.

diff --git a/pelican-review-ru.html b/pelican-review-ru.html index aec364d..5613612 100644 --- a/pelican-review-ru.html +++ b/pelican-review-ru.html @@ -50,7 +50,7 @@ title="Permalink to Обзор Pelican">Обзор Pelican -
Sat 03 June 2017 +
Сб 03 Июнь 2017 en

Пока что полёт нормальный. Pelican действительно крут, позволяет diff --git a/pelican-review.html b/pelican-review.html index 78de02e..c066025 100644 --- a/pelican-review.html +++ b/pelican-review.html @@ -50,7 +50,7 @@ title="Permalink to Pelican review">Pelican review -

Sat 03 June 2017 +
Сб 03 Июнь 2017 ru

So far so nice. Pelican is really cool, and provides a quick starting guided diff --git a/pelican/content/articles/kr1-ru.md b/pelican/content/articles/kr1-ru.md deleted file mode 100644 index 3691b7f..0000000 --- a/pelican/content/articles/kr1-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr1 -Date: 2017-01-01 1:04 -Category: Review -Slug: kr1 -Lang: ru - -kr1 - -LANG: ru - diff --git a/pelican/content/articles/kr1.md b/pelican/content/articles/kr1.md deleted file mode 100644 index 9475d72..0000000 --- a/pelican/content/articles/kr1.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr1 -Date: 2017-01-01 1:04 -Category: Review -Slug: kr1 -Lang: en - -kr1 - -LANG: en - diff --git a/pelican/content/articles/kr10-ru.md b/pelican/content/articles/kr10-ru.md deleted file mode 100644 index b839123..0000000 --- a/pelican/content/articles/kr10-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr10 -Date: 2017-01-01 10:04 -Category: Review -Slug: kr10 -Lang: ru - -kr10 - -LANG: ru - diff --git a/pelican/content/articles/kr10.md b/pelican/content/articles/kr10.md deleted file mode 100644 index f0c9656..0000000 --- a/pelican/content/articles/kr10.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr10 -Date: 2017-01-01 10:04 -Category: Review -Slug: kr10 -Lang: en - -kr10 - -LANG: en - diff --git a/pelican/content/articles/kr2-ru.md b/pelican/content/articles/kr2-ru.md deleted file mode 100644 index f21bb3f..0000000 --- a/pelican/content/articles/kr2-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr2 -Date: 2017-01-01 2:04 -Category: Review -Slug: kr2 -Lang: ru - -kr2 - -LANG: ru - diff --git a/pelican/content/articles/kr2.md b/pelican/content/articles/kr2.md deleted file mode 100644 index be80fe9..0000000 --- a/pelican/content/articles/kr2.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr2 -Date: 2017-01-01 2:04 -Category: Review -Slug: kr2 -Lang: en - -kr2 - -LANG: en - diff --git a/pelican/content/articles/kr3-ru.md b/pelican/content/articles/kr3-ru.md deleted file mode 100644 index 8665fda..0000000 --- a/pelican/content/articles/kr3-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr3 -Date: 2017-01-01 3:04 -Category: Review -Slug: kr3 -Lang: ru - -kr3 - -LANG: ru - diff --git a/pelican/content/articles/kr3.md b/pelican/content/articles/kr3.md deleted file mode 100644 index cce1f9f..0000000 --- a/pelican/content/articles/kr3.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr3 -Date: 2017-01-01 3:04 -Category: Review -Slug: kr3 -Lang: en - -kr3 - -LANG: en - diff --git a/pelican/content/articles/kr4-ru.md b/pelican/content/articles/kr4-ru.md deleted file mode 100644 index 5e34049..0000000 --- a/pelican/content/articles/kr4-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr4 -Date: 2017-01-01 4:04 -Category: Review -Slug: kr4 -Lang: ru - -kr4 - -LANG: ru - diff --git a/pelican/content/articles/kr4.md b/pelican/content/articles/kr4.md deleted file mode 100644 index 52a79d2..0000000 --- a/pelican/content/articles/kr4.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr4 -Date: 2017-01-01 4:04 -Category: Review -Slug: kr4 -Lang: en - -kr4 - -LANG: en - diff --git a/pelican/content/articles/kr5-ru.md b/pelican/content/articles/kr5-ru.md deleted file mode 100644 index 9cde176..0000000 --- a/pelican/content/articles/kr5-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr5 -Date: 2017-01-01 5:04 -Category: Review -Slug: kr5 -Lang: ru - -kr5 - -LANG: ru - diff --git a/pelican/content/articles/kr5.md b/pelican/content/articles/kr5.md deleted file mode 100644 index 945222c..0000000 --- a/pelican/content/articles/kr5.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr5 -Date: 2017-01-01 5:04 -Category: Review -Slug: kr5 -Lang: en - -kr5 - -LANG: en - diff --git a/pelican/content/articles/kr6-ru.md b/pelican/content/articles/kr6-ru.md deleted file mode 100644 index 608662e..0000000 --- a/pelican/content/articles/kr6-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr6 -Date: 2017-01-01 6:04 -Category: Review -Slug: kr6 -Lang: ru - -kr6 - -LANG: ru - diff --git a/pelican/content/articles/kr6.md b/pelican/content/articles/kr6.md deleted file mode 100644 index 98b9728..0000000 --- a/pelican/content/articles/kr6.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr6 -Date: 2017-01-01 6:04 -Category: Review -Slug: kr6 -Lang: en - -kr6 - -LANG: en - diff --git a/pelican/content/articles/kr7-ru.md b/pelican/content/articles/kr7-ru.md deleted file mode 100644 index 726a49f..0000000 --- a/pelican/content/articles/kr7-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr7 -Date: 2017-01-01 7:04 -Category: Review -Slug: kr7 -Lang: ru - -kr7 - -LANG: ru - diff --git a/pelican/content/articles/kr7.md b/pelican/content/articles/kr7.md deleted file mode 100644 index 3c19791..0000000 --- a/pelican/content/articles/kr7.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr7 -Date: 2017-01-01 7:04 -Category: Review -Slug: kr7 -Lang: en - -kr7 - -LANG: en - diff --git a/pelican/content/articles/kr8-ru.md b/pelican/content/articles/kr8-ru.md deleted file mode 100644 index a46ae34..0000000 --- a/pelican/content/articles/kr8-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr8 -Date: 2017-01-01 8:04 -Category: Review -Slug: kr8 -Lang: ru - -kr8 - -LANG: ru - diff --git a/pelican/content/articles/kr8.md b/pelican/content/articles/kr8.md deleted file mode 100644 index 0216be8..0000000 --- a/pelican/content/articles/kr8.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr8 -Date: 2017-01-01 8:04 -Category: Review -Slug: kr8 -Lang: en - -kr8 - -LANG: en - diff --git a/pelican/content/articles/kr9-ru.md b/pelican/content/articles/kr9-ru.md deleted file mode 100644 index 374460a..0000000 --- a/pelican/content/articles/kr9-ru.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr9 -Date: 2017-01-01 9:04 -Category: Review -Slug: kr9 -Lang: ru - -kr9 - -LANG: ru - diff --git a/pelican/content/articles/kr9.md b/pelican/content/articles/kr9.md deleted file mode 100644 index bec656c..0000000 --- a/pelican/content/articles/kr9.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: kr9 -Date: 2017-01-01 9:04 -Category: Review -Slug: kr9 -Lang: en - -kr9 - -LANG: en - diff --git a/scripting-research-ru.html b/scripting-research-ru.html new file mode 100644 index 0000000..0c7bf3e --- /dev/null +++ b/scripting-research-ru.html @@ -0,0 +1,139 @@ + + + + + + + Изучение скриптования + + + + + + + + + + + + + + + +

+ + + + +
+ + +
+
+
+

Изучение скриптования

+
+ +
Ср 16 Август 2017 + en + +

Изучение скриптования

+

Эта статья описывает изучение скриптования в июле 2017.

+

Наша основная цель использования скриптового языка - это наличие платформо-независимого кода, выполняемого без изменений на каждой поддерживаемой платформе.

+

Редактор 0.10 использует Python в качестве подобного кода с помощью SWIG. SWIG позволяет использовать практически любой код C/C++ из языков вроде Python, Ruby, Lua, Java, C# и т.д.. SWIG помог нам впервые оценить прелесть платформо-независимого кода. К сожалению, SWIG работает лишь в одном направлении: из C/C++ в язык назначения. Это приводит к тому, что основное приложение должно быть написано на языке назначения, а код C/C++ может быть использован лишь в виде библиотеки.

+

Основное приложение на языке Python вполне подходит для десктопа, но не для мобилок и веба, где языки C и C++ являются единственными языками, поддерживаемыми нативно на каждой платформе. Конечно, существуют проекты вроде Kivy, которые позволяет разрабатывать кросс-платформенные приложения на Python, но они не поддерживаются нативно. Отсутствие нативной поддержки выливается в огромную головную боль при изменении API у Android и iOS.

+

Необходимость в приложении на C/C++ и поддержке скриптов приводит к обязательному интерпретированию скриптового языка самим приложением. Это как раз то, что SWIG, Kivy и подобные проекты не позволяют сделать.

+

Наша вторичная цель использования скриптового языка - это возможность расширения кода C++.

+

Одни модули Редактора 0.10 написаны на C++, а другие на Python. С точки зрения основного приложения, все модули равны. Для приложения нет никакой разницы, на каком языке написан конкретный модуль.

+

Для достижения этой гибкости мы ввели так называемое Окружение (Environment). Каждый модуль регистрирует ключи (keys), на которые он отвечает, а Окружение доставляет соответствующие сообщения. Технически такое поведение можно достигнуть с помощью наследования базового класса и переопределения его методов как в C++, так и в скриптовом языке.

+

Python был первым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.

+

Т.к. мы уже использовали Python, то логично было начать изучение с него. Мы хотели проверить, можно ли запустить код Python на каждой поддерживаемой платформе. К сожалению, результаты были удручающими, т.к. документация CPython (реализация Python, используемая по умолчанию на десктопе) никак не упоминала ни мобилки, ни веб. Всё, что мы нашли, - это пара форков CPython лохматых годов, которые якобы работают либо на Android, либо на iOS. Такой раздрай нас не устроил. +Мы также рассмотрели PyPy, ещё одну реализацию Python, но она тоже не содержала информации о мобилках и вебе.

+

Это было чётким сигналом об отсутствии интереса к мобилками и вебу со стороны сообщества Python. Либо об отсутствии времени даже на то, чтобы описать использование Python на данных платформах. В любом случае, такое положение вещей нас не устроило.

+

Wren был вторым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.

+

Wren был первым языком из длинного списка малоизвестных скриптовых языков.

+

Wren преподносился как небольшой и простой язык. Согласно документации, основная цель Wren - это быть встроенным в приложение. По иронии судьбы, у автора не было времени описать в документации встраивание Wren в приложение. Когда мы спросили о сроках публикации этой критически важной части документации, мы получили в ответ ссылку на тикет, в котором другой человек спрашивал тот же самый вопрос полгода назад!

+

На этом мы закончили отношения с Wren.

+

Chai был третьим языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.

+

Chai был в том же длинном списке малоизвестных скриптовых языков. Он преподносился как язык, специально предназначенный для встраивания в приложения C++. Мы без проблем вызвали функцию C++ из Chai, но нам не удалось вызвать метод класса. Мы попросили о помощи, но ответом была лишь тишина.

+

Нам пришлось завершить отношения с Chai.

+

Lua был четвёртым языком, который мы рассмотрели в качестве платформо-независимого скриптового языка.

+

Lua является популярным языком для встраивания. Мы решили попробовать очевидный вариант. Документация выглядела многообещающе, однако под конец чтения главы C API у нас не было ни малейшего представления, как наследовать класс C++ в Lua.

+

Этот вопрос заставил нас найти библиотеку, которая смогла бы на него ответить: Sol2. Первая попытка вызвать функцию C++ из Lua провалилась. Правда, на этот раз наш вопрос был услышан, и мы получили ответ! Мы были сильно удивлены. +Далее мы попытались наследовать класс C++ в Lua, чтобы переопределить методы класса. Нам это не удалось с первого раза, но автор Sol2 снова помог нам.

+

В тот момент мы поняли, что это начало долгого и взаимовыгодного сотрудничества с Sol2/Lua.

+

Поиск скриптового языка открыл для нас следующую истину: люди важнее технологий.

+

Существует множество скриптовых языков, которые выглядят привлекательно на первый взгляд, но которые мертвы. Почему? Потому что у некоторых авторов нет времени на пользователей. В ответ пользователи предпочитают не тратить своё время на проекты подобных авторов.

+

На этом мы заканчиваем описание изучения скриптования в июле 2017.

+

Category: News + +

+ + + +
+
+ + + + + +
+ + + +
+
+
+
+
+

Proudly powered by Pelican, which takes great advantage of Python.

+
+
+
+
\ No newline at end of file diff --git a/scripting-research.html b/scripting-research.html new file mode 100644 index 0000000..d7ef525 --- /dev/null +++ b/scripting-research.html @@ -0,0 +1,141 @@ + + + + + + + Scripting research + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

Scripting research

+
+ +
Ср 16 Август 2017 + ru + +

Scripting research

+

This article describes scripting research in July 2017.

+

Our first goal of using a scripting language was to have a platform-independent code that runs unchanged on every supported platform.

+

OGS Editor 0.10 supports Python for such a code thanks to SWIG. SWIG provides a way to wrap almost any C/C++ code and use it in dozens of languages like Python, Ruby, Lua, Java, C#, etc.. SWIG really helped us taste the beauty of platform-independent code. However, SWIG only works one way: from C/C++ to a target language. This means the main application must be in the target language, and C/C++ code can only be used as a library.

+

Having the main application in Python works fine for the desktop, but not so great for mobile and web, where C and C++ are the only natively supported cross-platform languages. There are projects like Kivy, which allow you to develop cross-platform applications in Python, but they are not supported natively. This means it's a lot of headaches when Android and iOS APIs change.

+

Having the main application in C/C++ and the need to support scripting means that a scripting language should be interpreted by the application. This is what SWIG, Kivy, and similar projects are not meant to fulfill.

+

Our secondary goal for using a scripting language was to allow to extend C++ code.

+

OGS Editor 0.10 has some modules written in C++, and some in Python. The modules are equal from the perspective of the main application; it doesn't care what language the module is written in.

+

To achieve such flexibility, we introduced a so-called Environment. Each module would register the keys it responds to, and Environment would deliver corresponding messages. +Technically such behaviour is achieved by inheriting a base class and overriding its methods in both C++ and a scripting language.

+

First, we evaluated Python for the role of cross-platform scripting language.

+

Since we already used Python, we started to research the possibility to run Python code on every supported platform. The result was disappointing because CPython (the default Python implementation used on the desktop) does not mention mobile and web platforms. We only found some years old forks of CPython that were claimed to work either on Android or iOS. Such a disarray was not suitable for us. +We also had a look at PyPy, another Python implementation. It also did not mention support for mobile and web platforms.

+

This was a clear indication that Python community doesn't care for mobile and web platforms. Or that nobody had time to provide the information about building Python on such platforms. Either way, it was not acceptable for us.

+

Second, we evaluated Wren for the role of cross-platform scripting language.

+

Wren was the first scripting language we stumbled upon in the long list of non-mainstream scripting languages.

+

Wren claimed to be small and easy to learn. Wren also claimed to be intended for embedding in applications. Ironically, the author had no time to document how to do the embedding in the first place. When we asked for the time estimates of publishing the critical part of the documentation, we just got a reference to another issue where the other guy was asking the same question half a year ago!

+

That's when we ended our relationship with Wren.

+

Third, we evaluated Chai for the role of cross-platform scripting language.

+

Chai was in the long list of non-mainstream scripting languages, too. Chai was promising because it claimed to be specifically tailored for embedding in a C++ application. +We successfully managed to call a C++ function from inside Chai but failed to call a member function. We asked for help, but nobody replied.

+

We had to end our relationship with Chai.

+

Fourth, we evaluated Lua for the role of cross-platform scripting language.

+

Lua is the mainstream language for embedding. So we decided to try the obvious choice. Documentation looked promising, too. However, by the end of reading the C API chapter we had no clue how to inherit a class inside Lua.

+

This led us to search for libraries that wrap Lua C API syntax into something more meaningful for C++. That's how we found Sol2. Just as before, the first attempt to call a C++ member function from Lua failed. But unlike before, we asked for help and got the help! This was a refreshing surprise for us. +Next, we tried to inherit a class in Lua and override the class methods. We failed, but the author helped us out again. In the end, we succeeded in inheriting a class and overriding its behaviour.

+

That's when we understood it's a start for a long and mutual relationship with Sol2/Lua.

+

This search for a scripting language taught us one important lesson: people matter, not technologies.

+

There are lots of scripting languages that look shiny on the outside but are dead. Why? Because some authors don't have time for users. In return, users don't have time for the authors' projects.

+

That's it for describing scripting research in July 2017.

+

Category: News + +

+ + + +
+
+ + + + + +
+ + + + \ No newline at end of file