Opensource Game Studiohttp://opengamestudio.org/2018-04-20T00:00:00+03:00OpenSceneGraph cross-platform examples2018-04-20T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2018-04-20:openscenegraph-examples.html<p><img alt="Screenshot" src="http://opengamestudio.org/2018-04-20-openscenegraph-examples.png" /></p>
<p>This article summarizes the work we did to produce the first two
cross-platform OpenSceneGraph examples.</p>
<p>By the time <a href="http://opengamestudio.org/mahjong-techdemo1-gameplay.html">the first technology demonstration of OGS Mahjong 2</a>
has been released, we've already had <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">issue request</a>
(to explain how to load images with OpenSceneGraph on Android) hanging for some
time. We considered creating a new tutorial for
<a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> at first. However, we realized
that it's time-consuming and excessive for such a tiny topic (compared to
what an average game has) as image loading. We decided to continue sharing our
knowledge in the form of concrete examples. That's how
<a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples">OpenSceneGraph cross-platform examples</a> were born.</p>
<p>Each example:</p>
<ul>
<li>explains crucial code necessary to perform a specific task</li>
<li>accents platform-specific nuances</li>
<li>provides implementations to cover desktop, mobile, and web platforms</li>
<li>provides a web build to showcase results</li>
</ul>
<p>The first two examples cover the following topics:</p>
<ul>
<li>Embed resource into executable: this greatly simplifies resource handling across platforms</li>
<li>Use PNG images with PNG plugins: this explains the requirements necessary to build and use PNG plugins</li>
</ul>
<p>We will be adding new examples as we proceed with OGS Mahjong 2 development.</p>
<p>That's it for summarizing the work we did to produce the first two cross-platform OpenSceneGraph examples.</p>First techdemo of OGS Mahjong 2: Gameplay2018-02-16T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2018-02-16:mahjong-techdemo1-gameplay.html<p><img alt="Screenshot" src="http://opengamestudio.org/2018-02-16-mahjong-techdemo1-gameplay.png" /></p>
<p>We are glad to announce the release of the first technical demonstration of
OGS Mahjong 2. The purpose of this release was to verify gameplay across
supported platforms.</p>
<p>Get techdemo for your platform:</p>
<ul>
<li>Run <a href="https://ogstudio.github.io/game-mahjong/versions/013/mjin-player.html">Web version</a> in your browser</li>
<li>Get <a href="https://drive.google.com/open?id=1KW8IEN8Dpz8ODeg8BctVSJyzj9-AL9hR">Android version</a></li>
<li>Get <a href="https://drive.google.com/open?id=1oj0-OXSmEatttzn86u2vgP9SRAIC0ozB">Windows version</a></li>
<li>Get <a href="https://drive.google.com/open?id=1EX7kLIThLiMz9_W7VmBPySms3mlrF-i6">Linux version</a></li>
<li>Get <a href="https://drive.google.com/open?id=1KWnvbHzan8MpMcZPG2QC-7KWoEYbqrM2">macOS version</a></li>
</ul>
<p>Notes:</p>
<ul>
<li>iOS version is not released because it cannot be easily shared outside AppStore.</li>
<li>Launch <code>run</code> script under Linux and macOS.</li>
<li>Linux version is only available in 64-bit variant.</li>
<li>macOS version should run on macOS Sierra or newer.</li>
</ul>
<p>That's it for now, have a nice testing!</p>Mahjong recreation start2018-01-26T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2018-01-26:mahjong-recreation-start.html<p><img alt="Screenshot" src="http://opengamestudio.org/2018-01-26-mahjong-recreation-start.png" /></p>
<p>This article describes the start of Mahjong game recreation.</p>
<p><strong>Plan</strong></p>
<p>We started Mahjong recreation endeavour by composing a brief plan to get gameplay with minimal graphics:</p>
<ul>
<li>Load single layout</li>
<li>Place tiles in layout positions</li>
<li>Distinguish tiles</li>
<li>Implement selection</li>
<li>Implement matching</li>
</ul>
<p>Just like any other plan, this one looked fine at first sight. However, once you get down to work, new details start to come out. This plan was no exception. Below are a few problems that came out during development.</p>
<p><strong>Problem №1: provide binary resources across supported platforms</strong></p>
<p>Mahjong is going to be available on desktop, mobile, and web. Each of these platforms has its constraints on accessing external files:</p>
<ul>
<li>Desktop can access almost any file</li>
<li>Android/iOS have limited access to file system</li>
<li>Web does not have any file system at all</li>
</ul>
<p>To provide a unified way for accessing resources, we decided to include them into final executable. This decision led to the birth of <strong>mjin-resource</strong> and <strong>mahjong-data</strong> projects.</p>
<p><a href="https://bitbucket.org/ogstudio/mjin-resource">mjin-resource</a>:</p>
<ul>
<li>converts binary files to C header files with the help of <strong>xxd</strong> utility</li>
<li>generates MJIN project that contains generated headers to be compiled into static library</li>
<li>provides C++ interface for accessing generated resources</li>
</ul>
<p><a href="https://bitbucket.org/ogstudio-games/mahjong-data">mahjong-data</a> is an example of such generated MJIN project that is referenced by <a href="https://bitbucket.org/ogstudio-games/mahjong">mahjong</a> project.</p>
<p><strong>Problem №2: load PNG images across supported platforms</strong></p>
<p>To load PNG, we use corresponding OpenSceneGraph plugin. We built it for desktop with no issues. Building for web (Emscripten) turned out to be more difficult: Emscripten provides its own version of <strong>libpng</strong>, which OpenSceneGraph build script can't detect. We had to work around several OpenSceneGraph checks to successfully build the plugin for Emscripten.
Building the plugin for Android and iOS is still waiting for us. Once we get PNG plugin working across supported platforms, we are going to publish a new tutorial for <a href="https://github.com/ogstudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a> to cover PNG image loading. We already got a <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues/4">request to describe image loading</a>.</p>
<p><strong>Development</strong></p>
<p><a href="http://opengamestudio.org/lets-go.html">As you know</a>, we published OpenSceneGraph cross-platform guide to make OpenSceneGraph community stronger. We value education, and we love to share our knowledge. That's why we decided to develop Mahjong in small reproducible chunks uniquely identified by internal versions. These versions are available in <a href="https://bitbucket.org/ogstudio-games/mahjong">mahjong repository</a>.</p>
<p>We also provide <a href="http://ogstudio.github.io/game-mahjong">version history and web releases of each internal version</a> for the following reasons:</p>
<ul>
<li>education: show how development looks like internally</li>
<li>accessibility: provide older versions for comparison</li>
</ul>
<p><strong>Current Mahjong game status</strong></p>
<p>As of the time of this writing, we have implemented tile selection. <a href="https://ogstudio.github.io/game-mahjong/versions/010/mjin-player.html">Try it in your browser!</a></p>
<p>Once we finish tile matching implementation, we are going to publish the intermediate result for all supported platforms.</p>
<p>That's it for describing the start of Mahjong game recreation.</p>The year of lessons2017-12-31T22:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-12-31:the-year-of-lessons.html<p><img alt="Screenshot" src="http://opengamestudio.org/2017-12-31-celebration.jpg" /></p>
<p>So, the year 2017 is approaching its finale, the year's results have already
been summed up. We're going to take a break from igniting the fireworks or
preparation of the champagne so that we can designate our goal for the
following year.</p>
<p>As it may be clear from other articles on the site, half of our plans in 2017
were destined to be completed at least approximately as we assumed. The other
half was changed significantly.</p>
<p>During the year, people joined the team and left it. As a result, we meet the
end of the year with exactly the same team as 365 days ago. It made us think.
A lot. But We'll save the story for another time.</p>
<p>There will be exactly one goal for 2018. We will take all the results, and then
we will make a new mahjong game. We're already know how to make a mahjong
solitaire so we will begin with it. This time, it will be cross-platform.
We will definitely try to cover Windows, Linux, macOs, Web, and Android.
We can't promis anything about the iOS right now (although we'll see what
we can do).</p>
<p>There is no point in writing more than We want to say. We learned a lot for
this year, and we will try to apply all this knowledge to achieve more in the
next one. We wish everyone a Happy New Year. Stay tuned.</p>
<p>The Opensource Game Studio Team.</p>2017 summary2017-11-22T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-11-22:2017-summary.html<p><img alt="Screenshot" src="http://opengamestudio.org/2017-11-22-2017-summary.png" /></p>
<p>It's time to step back to see our accomplishments in 2017 and how they connect to the overall goal of Opensource Game Studio project.</p>
<p><strong>Brief history</strong></p>
<p>Opensource Game Studio project is 12 years old now.</p>
<p><strong>2005.</strong> We started the project with a <a href="https://www.linuxquestions.org/questions/general-10/the-creation-of-the-best-rpg-355858/">fanatic call</a> to create the best game ever. Probably right after finishing Half-Life 2 or Morrowind. 99.99% of those who wanted to participate weathered during a couple of years leaving only the two of us: Michael (coding) and Ivan (the rest).
The project was in a constant turmoil because we had no clear purpose and discipline. Thus, we only got a handful of demonstrations during that period.</p>
<p><strong>2010.</strong> The first year for us to admit we failed big time. After accepting the failure, we have set Mahjong game as our initial target. We also realized that if we want the game out, we must work every day. We didn't get anywhere by working on weekends because they often collided with family time.</p>
<p><strong>2012, 2013.</strong> We released Mahjong 1.0 and Mahjong 1.1 correspondingly. We created a complete, polished game in 3-4 years after failing to provide anything of value during previous 5 years. To this date, Mahjong is the best and only game we released so far. We're still proud of it because it still feels great.</p>
<p><strong>2015.</strong> We showcased the first version of our game toolset. After releasing Mahjong, we decided to spend time on building toolset that would allow us to develop games faster.</p>
<p><strong>2016.</strong> We recreated Mahjong gameplay with our game toolset. However, we quickly realized that desktop only game toolset is a dead end. It led us to research mobile platforms.</p>
<p><strong>Last year</strong></p>
<p><strong>2016, October.</strong> We started mobile platforms' research by making simple straightforward OpenSceneGraph application run under Android.</p>
<p><strong>2017, January.</strong> We got the Android version working and started iOS and Web research.</p>
<p><strong>2017, February.</strong> We made the sample application work everywhere: desktop, mobile, web.</p>
<p>Researching mobile and web took us about five months. We spent that much time because there was no documentation on how to run OpenSceneGraph across platforms. We had to step in and create said documentation.</p>
<p><strong>2017, July.</strong> We published <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide">OpenSceneGraph cross-platform guide</a>, which describes how to create a simple OpenSceneGraph application and make it run on desktop, mobile, and web. To this date, this is our most popular GitHub repository.</p>
<p><strong>2017, November.</strong> We published simple <a href="https://ogstudio.github.io/game-memory-colors/tutorial-5.3/mjin-player.html">Memory: Colors game</a> and the <a href="https://bitbucket.org/ogstudio-games/memory-colors">guide</a> on how to create the game from scratch. The game is powered by MJIN, our new cross-platform game toolset that we started this summer.</p>
<p>Currently MJIN toolset is in its infancy. MJIN needs a real game to flourish. That's why we are already working on cross-platform Mahjong. We'll do our best to make Mahjong faster this time.</p>Back to the Static2017-10-16T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-10-16:back-to-the-static.html<p><img alt="Back to the Static" src="http://opengamestudio.org/2017-10-16-back-to-the-static.png" /></p>
<p>We have been using Wordpress as our website engine for more than seven years. And now it's time to move forward. Or backward.
For some time we've been tracking the development of the new breed of website engines - static site generators.
It seems that this is the technology capable of changing past into future.</p>
<p>A static website is more straightforward, quicker and more secure. And with the help of generators, it is also as easy to manage, as the dynamic website.
So, we are starting our site anew with the help of the <a href="https://blog.getpelican.com/">Pelican</a>.
Right now it doesn't have all the content from our old site, but we'll add most of it soon.</p>The birth of MJIN world2017-09-10T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-09-10:mjin-world-birth.html<p><img alt="The birth of MJIN world" src="http://opengamestudio.org/2017-09-mjin-world-birth.png" /></p>
<p>This article describes the birth of MJIN world in August 2017.</p>
<p><strong>mjin-player</strong></p>
<p>As you know, <a href="http://opengamestudio.org/scripting-research.html">we spent July to research scripting</a>. We found a solution that satisfies the following criteria. Scripts should:</p>
<ol>
<li>run unchanged on all supported platforms</li>
<li>allow extending C++ code</li>
</ol>
<p>We have verified the second criterion by writing a sample application. The first criterion was taken for granted because it SHOULD be true.</p>
<p>At the time, we saw two ways to verify the first criterion:</p>
<ol>
<li>create one sample application for each platform to verify scripting only</li>
<li>create a single cross-platform application, which can run any code</li>
</ol>
<p>We chose the second approach because it is more beneficial in the long run. As you might have guessed, <a href="https://bitbucket.org/ogstudio/mjin-player">mjin-player</a> is that application.</p>
<p>mjin-player serves as a base for the rest of MJIN projects to make them run on all supported platforms. However, there's no magic trick to hide the projects from the platform, and there was no such intention. Instead, mjin-player provides a consistent set of rules how other MJIN projects should be structured to be able to run on all supported platforms.</p>
<p><strong>mjin-application</strong></p>
<p>This set of rules for MJIN projects is packaged into <a href="https://bitbucket.org/ogstudio/mjin-application">mjin-application</a>. mjin-application is a library that provides basic functionality every MJIN project would need and nothing more. For instance, mjin-application does not and will not contain scripting or any other specific functionality.</p>
<p><strong>MJIN world</strong></p>
<p>So what is <a href="https://bitbucket.org/ogstudio/mjin">MJIN world</a>? It's a set of projects that constitute our game development tools. mjin-player and mjin-application are the first bricks of the newly born MJIN world. A lot more to come. Stay tuned for the brighter MJIN future.</p>
<p>That's it for describing the birth of MJIN world in August 2017.</p>Scripting research2017-08-16T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-08-16:scripting-research.html<p><img alt="Scripting research" src="http://opengamestudio.org/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+03:00Opensource Game Studiotag:opengamestudio.org,2017-07-17:openscenegraph-cross-platform-guide.html<p><img alt="OpenSceneGraph guide" src="http://opengamestudio.org/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>
<p>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.</p>
<p>We have been doing OpenSceneGraph cross-platform guide for two main reasons:</p>
<ol>
<li>Keep OpenSceneGraph cross-platform knowledge in easily accessible and reproducible form</li>
<li>Share the knowledge with OpenSceneGraph community to make it stronger</li>
</ol>
<p>We believe we succeeded in both. Here's why:</p>
<ol>
<li>The guide repository has more <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/stargazers">stars</a> (aka "likes") than any other repository of ours</li>
<li>OpenSceneGraph project leader Robert Osfield said <a href="http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg74815.html">"Great work"</a>, which means a lot</li>
<li>The guide already has <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/issues">two issues</a></li>
</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+03:00Opensource Game Studiotag:opengamestudio.org,2017-06-08:ios-tutorial.html<p><img alt="iOS tutorial" src="http://opengamestudio.org/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>
<p>The first question we had to answer was: should the sample application be part of Xcode project or be a separately built library?</p>
<p>We had to consider the following facts:</p>
<ol>
<li>Xcode project can use C++ directly (thanks to Objective-C++) without stuff like JNI<ul>
<li>There's no need for a separate library (+ application)</li>
<li>Creating a separate library is an additional work (- library)</li>
</ul>
</li>
<li>OpenSceneGraph builds libraries<ul>
<li>It's easier to use standard build process (+ library)</li>
<li>It's harder to create custom build process just for a single platform (- application)</li>
</ul>
</li>
<li>OpenSceneGraph uses CMake build system, which is not supported by Xcode<ul>
<li>Xcode project can't include CMake files (- application)</li>
<li>It's easy to create custom CMake file that includes OpenSceneGraph CMake file to build a single library (+ library)</li>
</ul>
</li>
<li>CMake can generate Xcode project<ul>
<li>It's possible to create a CMake file that builds both OpenSceneGraph and the sample application (+ application)</li>
<li>Xcode is the de-facto tool to create Xcode projects; it's easier to use standard build process (+ library)</li>
</ul>
</li>
</ol>
<p>After evaluating the pros and cons of each approach, we decided to turn the sample application into a library and include it in Xcode project. The downside of this approach is that simulator and real device builds need separate library builds.</p>
<h3>Refactoring</h3>
<p>The second question we had to answer was: should there be a single source code base for all platforms or several ones, one for each platform?</p>
<p>While doing Android tutorial we used single source code base because it worked fine for desktop and Android. As we started to work through iOS tutorial, it became apparent that particular features may or may not work on some platforms. For example, one feature may work on desktop and iOS, but not Android. Another feature may work on iOS and Android, but not desktop. Since we didn't want to pollute the code with #ifdefs, we started to put each platform combination into a separate file. The number of files grew rapidly. The files were reusable, but it became extremely hard to see the whole picture.</p>
<p>At this point, we realized there's the second question. We reminded ourselves that the main purpose of the sample source code is to teach how to do basic OpenSceneGraph things, not create a reusable library with API that is stable across several years.</p>
<p>That's when our home grown feature tool came into play. With its help, we separated the code into several parts, which in the end produce just two files for each platform:</p>
<ol>
<li>functions.h - contains reusable classless functions</li>
<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>OpenSceneGraph sample2017-05-12T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-05-12:osg-sample.html<p><img alt="OSG sample" src="http://opengamestudio.org/2017-05_osg-sample.png" /></p>
<p>This article describes creation of the tutorials for building sample OpenSceneGraph application under Linux, macOS, Windows, and Android in April 2017.</p>
<p>Previous tutorials described how to install OpenSceneGraph under Linux, macOS, Windows and render a model using the standard <strong>osgviewer</strong> tool. This time we worked on a <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide-application">sample OpenSceneGraph application</a> that would run under Linux, macOS, Windows, and Android.</p>
<p>The application is very basic and has the following features:</p>
<ol>
<li>Render window creation</li>
<li>Model loading</li>
<li>Model rendering with simple GLSL shaders</li>
<li>Model motion with a mouse under Linux, macOS, Windows and a finger under Android</li>
</ol>
<p>Creating the tutorials for Linux, macOS, Windows was so easy and straightforward, that it only took us half a month. We spent the second half of the month creating Android tutorial.</p>
<p>Our <a href="http://opengamestudio.org/2016-october-recap.html">first successful Android build</a> last year included hacks and non-obvious steps to make OpenSceneGraph run under Android. This time we wanted a cleaner, faster, and cheaper approach.</p>
<p>The approach we ended up with requires just a few files and a few changes to the original Android Studio project (with C++ support) to make sample OpenSceneGraph application run under Android.</p>
<p>Here's a quick rundown of the files:</p>
<ol>
<li>GLES2 surface</li>
<li>Render activity to render to the surface</li>
<li>Native library Java interface</li>
<li>Native library C++ implementation</li>
<li>CMake file to build native library</li>
<li>Render activity layout</li>
<li>Model to display</li>
</ol>
<p>Here's a quick rundown of the project changes:</p>
<ol>
<li>Update Android manifest to use GLES2 and render activity</li>
<li>Reference native library's CMake file in the project's CMake file</li>
</ol>
<p>OpenSceneGraph documentation suggests building OpenSceneGraph outside Android Studio with CMake. However, this approach has the following limitations:</p>
<ol>
<li>You have to build OpenSceneGraph for each target architecture</li>
<li>You have to manually copy/reference built OpenSceneGraph libraries into Android Studio project</li>
</ol>
<p>Our approach includes building OpenSceneGraph for those target architectures that Android Studio project is built for. Also, OpenSceneGraph is already referenced, so no extra work is required: you just need to rebuild the project, and you're done.</p>
<p>That's it for describing the creation of the tutorials for building sample OpenSceneGraph application under Linux, macOS, Windows, and Android in April 2017.</p>It's all fine2017-04-07T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-04-07:its-all-fine.html<p><img alt="ItsAllFine" src="http://opengamestudio.org/2017-04_its-all-fine.png" /></p>
<p>This article describes creation of the first four OpenSceneGraph tutorials in March 2017.</p>
<p>The <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/">first four OpenSceneGraph tutorials</a> explain how to create a cube model with Blender and display the model under Linux, macOS, or Windows using OpenSceneGraph tool called osgviewer.</p>
<p>The whole process of creating a single tutorial turned out to be pretty daunting because it includes several tasks:</p>
<ol>
<li>Record original video depicting one or more steps</li>
<li>Name the steps as clear as possible</li>
<li>Select the parts of the video that display the step</li>
<li>Remove the parts of the video that bare no value, e.g., waiting in the middle of compilation</li>
<li>Select a single frame to best represent current step, e.g., typing a specific command</li>
<li>Add a detailed description to article, why current step should have been taken</li>
<li>Proof-read the article</li>
<li>Correct typos and video timing</li>
<li>Review the whole video</li>
<li>Upload the video to YouTube with timestamps of steps for easier navigation</li>
</ol>
<p>Some of those tasks had to be repeated multiple times until the combination of video, text, and article was clear and logical.</p>
<p>Overall, it took us 30 hours to create the tutorials. The whole process gave us a lot of experience, which will help us in shaping learning materials for our technologies in the future. We don't know how they will look like exactly, but they will definitely be better.</p>
<p>That's it for describing creation of the first four OpenSceneGraph tutorials in March 2017.</p>Let's go2017-03-16T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-03-16:lets-go.html<p><img alt="Let's go" src="http://opengamestudio.org/2017-03_lets-go.png" /></p>
<p>In this article we describe our progress in January and February of 2017: rendering under iOS/Web and a new tutorial tool.</p>
<p><strong>Rendering under iOS/Web</strong></p>
<p>To our surprise, we got a simple red cube rendered under <a href="https://twitter.com/OpenGameStudio/status/826816343433498627">iOS</a> and <a href="https://twitter.com/OpenGameStudio/status/829731986264698881">Web</a> pretty fast: in early February. However, this is only the beginning of this year's challenge to support Android, iOS, and Web platforms. There's a long and bumpy road ahead of us as we need a lot more on each platform before we can claim a success: visual effects, Python scripting, data archives.</p>
<p>Since it took us about four months to get to mobile and web platforms, we decided to share our knowledge and help OpenSceneGraph community with a guide that shows how to use OpenSceneGraph on desktop, mobile, and web. We believe the more widespread OpenSceneGraph is, the stronger our technology becomes. As Isaac Newton said, "If I have seen further, it is by standing on the shoulders of giants." OpenSceneGraph is our giant.</p>
<p><strong>Tutorial tool</strong></p>
<p>Having conducted four live sessions before, it was clear the guide needs videos depicting every nuance. However, bare video alone is only good for showing what to do and not for explaining why do it in a certain way. That's why we decided to combine video with text in the forms of video subtitles and separate articles.</p>
<p>To combine text and video, we first tried <a href="http://openshotvideo.com">OpenShot</a>. It worked well, but we quickly saw its limitations:</p>
<ul>
<li>Too much time is spent on adjusting time frames and animations</li>
<li>Project file and original resources are hard to track with VCS</li>
</ul>
<p>Since OpenSceneGraph cross-platform guide would consist of several tutorials, we decided to automate the process. Brief research revealed a great multimedia framework called <a href="http://mltframework.org">MLT</a>, which powers OpenShot itself. With MLT we got our tutorial tool in no time.</p>
<p>Currently, the tutorial tool allows anyone to combine text and video using a simple text file like this:</p>
<div class="highlight"><pre>background bg.png
text 5 Let's install Blender
video 0:6 install_blender.mp4
text 5 Installing it with apt
video 6:26 install_blender.mp4
text 5 We're still installing it
video 26:56 install_blender.mp4
text 5 Congratulations! We just finished installing Blender
</pre></div>
<p>This is the actual script. See the final result <a href="https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/tutorial-tool">here</a>.</p>
<p>That's it for describing our progress in January and February of 2017: rendering under iOS/Web and the new tutorial tool.</p>The year of challenges2017-01-25T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2017-01-25:the-year-of-challenges.html<p><img alt="The year of challenges" src="http://opengamestudio.org/2017-01_the-year-of-challenges.png" /></p>
<p>This article describes our plans for 2017.</p>
<p>Our past plans suggested we would have Android platform support by this time. However, we have a long way to go, before we can declare Android support. See for yourself:</p>
<p><img alt="Android rendering" src="http://opengamestudio.org/2017-01_mjin-android-gles.png" /></p>
<p>Some people would consider this a failure. We don't. We see a chance to start low and jump high!</p>
<p>Having only worked with liberal and forgiving desktop environments, Android was a complete surprise for us. Android punished us for everything: memory, resources, graphics. The usual Android response was either a crash, or an empty screen.
At the same time, such a harsh environment highlighted weak spots in our technologies and helped us see where to go next.</p>
<p>This month we start working on iOS platform support, even though we have only scratched Android. Why? Because it's a lot easier to get those red cubes rendered on iOS without polishing Android first. We don't want to spend months polishing Android only to find out later we had to implement certain feature differently so that it works on all supported platforms.</p>
<p>And right after we get those cubes rendered on iOS, we start to work on bringing them to Web.</p>
<p><strong>You got it right: we challenge ourselves with support for Android, iOS, and Web this year.</strong></p>
<p>That's it for describing our plans for 2017.</p>Happy 20172016-12-31T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-12-31:2017-happy-new-year.html<p><img alt="Happy new year" src="http://opengamestudio.org/2016-12-31_happy-new-year.png" /></p>
<p>Okay. It's been a hard year for everyone in the team. And it's almost over. Praise it ends! Praise the new one!</p>
<p>It may seem, that our progress stalled. Three years ago we announced the beginning of a new project (two to be precise), and now we still working on the engine and editor, haven't even started creating the actual game.</p>
<p>If you were monitoring our news during the year, you know that we held several live sessions, showing in the real time how to use our tools to create some simple games. Each session was a step in a long road to our goal. While preparing for these live sessions, we added necessary building blocks, that will be needed to create almost any game.</p>
<p>Future live sessions and technical previews will add even more, so at some point in future (i hope not very distant), we will have everything we need to sit down and build our planned game from these blocks.</p>
<p>So, the project isn't dead; the idea was not thrown away. But there is a lot of work to be done before we can start making the game, and there are only two of us, using our spare time.
So. You want our game to become a reality? Join us. Together we will rule the galaxy. Or just wait and see. We didn't stop several years ago. We won't stop now.
After all, there is only one way to create a fine tool (and it's our initial goal if you remember) - we need to use it ourselves.
We will. Stay tuned.</p>
<p>Happy 2017. Let it be simple.</p>November 2016 recap2016-12-15T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-12-15:2016-november-recap.html<p><img alt="November recap" src="http://opengamestudio.org/2016-12-15_2016-november-recap.png" /></p>
<p>This article describes the start of MJIN library separation into modules.</p>
<p>Once we built OpenSceneGraph for Android, it became obvious that some MJIN functionality is not suitable for Android. For example, UIQt provides a basis for OGS Editor UI. Since OGS Editor is a desktop application, we don't need UIQt for Android.</p>
<p>We decided to have a look at two approaches to separate MJIN into modules: build-time separation and run-time one.
<strong>Build-time</strong> separation means MJIN becomes highly configurable and each platform gets specifically tailored MJIN build.
<strong>Run-time</strong> separation means MJIN is divided into smaller libraries that are connected at run-time, which makes it easy to change functionality without rebuilding.</p>
<p><strong>Run-time separation research.</strong></p>
<p>Since run-time separation has more benefits, we started researching it first.
The easiest way to achieve it was to use C API, because C ABI rules are much simpler than C++ one's.</p>
<p>We created a sample project consisting of the application, library, and plugin.
<strong>The application</strong> has been linked to the library and used it to load the plugin.
<strong>The library</strong> provided functions to register plugins and call their functions.
<strong>The plugin</strong> provided functions for the library and called library functions.</p>
<p>The research was successful: the sample project worked correctly under Linux and Windows. However, since MJIN is currently a single large entity, we postponed C API application until we finish build-time separation.</p>
<p><strong>Build-time separation start.</strong></p>
<p>We extracted the following modules from MJIN:</p>
<ul>
<li>
<p>Android: provides Java Native Interface (JNI) to MJIN</p>
</li>
<li>
<p>Sound: provides access to OpenAL</p>
</li>
<li>
<p>UIQt: provides access to Qt UI</p>
</li>
</ul>
<p>Sound and UIQt modules are currently statically linked into MJIN library, while Android module is already a separate library due to JNI requirements.</p>
<p>In the coming year, we're going to significantly restructure MJIN so that it suits as many platforms as possible.</p>
<p>That's it for describing the start of MJIN library separation into modules.</p>October 2016 recap2016-11-19T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-11-19:2016-october-recap.html<p><img alt="October recap" src="http://opengamestudio.org/2016-11-19_2016-october-recap.png" /></p>
<p>This article describes how we spent a month building OpenSceneGraph (OSG) for Android: the first attempt to build OSG, the search for OSG alternatives, and the success in building OSG.</p>
<p><strong>First attempt to build OSG.</strong></p>
<p>Having no prior knowledge of Android development, we grabbed the latest Android Studio and started doing beginner tutorials.
We passed Java part pretty fast. Everything worked out of the box. Then came C++ part and related problems.</p>
<p><strong>CMake. </strong>To work with C++, Android Studio uses custom CMake, which conflicts with the system one. This was a clear indication that we had to set up a separate development environment specifically for Android.</p>
<p><strong>KVM. </strong>We got Ubuntu under VirtualBox installed. All went fine until we tried to use Android Emulator. Turned out, VirtualBox could not run Android Emulator, because a virtual machine cannot provide kernel virtualization inside already virtualized environment.</p>
<p><strong>Chroot for Android. </strong>Since we had a successful experience with chroot to build OGS Editor before, we decided to place Android development environment into chroot. With minor tweaking, we could finally run Android Emulator and build C++ project.</p>
<p><strong>OSG. </strong>Building OSG seemed like a piece of cake at the time. However, all we got was a crash. Thinking that we got it wrong the first time, we tried to rebuild OSG once again. And the same crash again.
Searching for the problem did not reveal any hint.
Nobody helped us at the OSG mailing list.</p>
<p>We were in despair.</p>
<p><strong>The search for OSG alternatives.</strong></p>
<p>Since OSG community did not help us, we decided to search for an alternative open source project to fit our Android needs (and may be more).</p>
<p>And we found it: <a href="http://babylonhx.gamestudiohx.com/">BabylonHX</a>. The home page looked awesome: it rendered WebGL in the background!
We thought we finally found the gem we were looking for. However, the example on the home page simply did not work.</p>
<p>You can probably understand our feelings at the time.</p>
<p><strong>The success in building OSG.</strong></p>
<p>We realized nobody would make OSG work under Android for us. We had to do it ourselves.</p>
<p>Since <a href="http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4">OSG 3.4 document</a> on building for Android was very short, we no longer trusted it and headed to <a href="http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/44-building-openscenegraph-for-android-3-0-3-0-1">original OSG 3.0 document</a>.
While following it, we faced a dead link to third party dependencies.
The search for an alternative download link lead us to a <a href="https://xinyustudio.wordpress.com/2013/09/24/install-osg-for-android-on-ubuntu-13-04-step-by-step-tutorials/">2013 tutorial</a> on building OSG 3.0 for Android.</p>
<p>After following the tutorial, we finally got OSG to run under Android!
But there was a nuance: both OSG and Android tools used in the tutorial were ancient.
In a few days, we gradually updated both OSG and Android tools to their latest versions.</p>
<p>During the update process, we learned two things that prevented us from having OSG to work in the first place:</p>
<ul>
<li>Android API headers changed in NDK r12</li>
<li>OSG only works as a static library under Android</li>
</ul>
<p>That's it for describing how we spent the month building OSG for Android: the first attempt to build OSG, the search for OSG alternatives, and the success in building OSG.</p>Technology showcases2016-10-31T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-10-31:2016-tech-showcases.html<p><img alt="TechShowcases" src="http://opengamestudio.org/2016-10-31_tech-showcases.png" /></p>
<p>In this article, we take another look at 2015-2016 live sessions' format and introduce a new showcase format for 2017.</p>
<p><strong>2015 and 2016: live sessions.</strong></p>
<p>As you know, we use live sessions to show the state of our technology and create a small functional game from scratch.
We have conducted four live sessions in the past year, which gave birth to the following small games:
<table>
<tr>
<th><strong>№</strong></th>
<th><strong>Created game</strong></th>
<th><strong>Live session date</strong></th>
</tr>
<tr>
<td>1</td>
<td>Whac-a-mole</td>
<td>November 2015</td>
</tr>
<tr>
<td>2</td>
<td>Rolling ball</td>
<td>February 2016</td>
</tr>
<tr>
<td>3</td>
<td>Domino</td>
<td>May 2016</td>
</tr>
<tr>
<td>4</td>
<td>Mahjong Solitaire</td>
<td>September 2016</td>
</tr>
</table></p>
<p>We spent four months to prepare for these live sessions.
It has been an extremely useful experience for us. However, 2017 will have only 2 live sessions.
Why? We want to spend more time on actual development!</p>
<p><strong>2017: live sessions + technical previews.</strong></p>
<p>Starting next year, we will be doing technical previews twice a year. A technical preview is another way to show the state of our technology, but without creating new games and conducting live sessions.</p>
<p>Here's an approximate schedule of technical previews and live sessions for 2017:
<table>
<tr>
<th><strong>№</strong></th>
<th><strong>Month</strong></th>
<th><strong>Showcase type</strong></th>
<th><strong>Topic</strong></th>
</tr>
<tr>
<td>1</td>
<td>January</td>
<td>Technical preview</td>
<td>Android platform support</td>
</tr>
<tr>
<td>2</td>
<td>April</td>
<td>Live session</td>
<td>Android game creation</td>
</tr>
<tr>
<td>3</td>
<td>July</td>
<td>Technical preview</td>
<td>To be announced</td>
</tr>
<tr>
<td>4</td>
<td>October</td>
<td>Live session</td>
<td>To be announced</td>
</tr>
</table></p>
<p>That's it for taking another look at 2015-2016 live sessions' format and introducing the new showcase format for 2017.</p>September 2016 recap2016-10-11T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-10-11:2016-september-recap.html<p><img alt="September recap" src="http://opengamestudio.org/2016-10-11_september-recap.png" /></p>
<p>This article explains September 2016 live session stages: draft, rehearsal, live session itself, and publishing.</p>
<p>Even though live session takes only a few hours, we devote a whole month to prepare for it. Let's have a look at live session stages in detail.</p>
<ol>
<li>
<p><strong>Draft.</strong> Game creation for the first time.</p>
<p>Purposes:</p>
<ul>
<li>test our technologies and fix major bugs;</li>
<li>discover usability issues to fix in the next development iteration;</li>
<li>list exact steps to reproduce the game later;</li>
<li>create draft version of the game assets (models, textures, sounds, scripts).</li>
</ul>
<p>Upon stage completion, we announce live session date and show you the game preview.</p>
</li>
<li>
<p><strong>Rehearsal.</strong> Game recreation.</p>
<p>Purposes:</p>
<ul>
<li>make sure we have no major bugs left;</li>
<li>record the whole process of the game creation;</li>
<li>create final game assets.</li>
</ul>
<p>This is 99% the game we publish later.</p>
</li>
<li>
<p><strong>Live session.</strong> Reassembling the game live in front of you.</p>
<p>Purposes:</p>
<ul>
<li>show how easy it is to create a game;</li>
<li>walk you through nuances of game creation;</li>
<li>get feedback from you;</li>
<li>answer your questions.</li>
</ul>
<p>We take game assets from the rehearsal and use them to quickly reassemble the game in just a few hours.</p>
</li>
<li>
<p><strong>Publishing.</strong> The release of our technologies' last version, live session materials, and stand alone game.</p>
</li>
</ol>
<p>That's it for explaining September 2016 live session stages: draft, rehearsal, live session itself, and publishing.</p>OGS Editor 0.10 and live session materials2016-10-03T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-10-03:ogs-editor-0.10.html<p><img alt="ogs-editor-0.10" src="http://opengamestudio.org/2016-10-03_ogs-editor-0.10.png" /></p>
<p>Note: we won't release 0.10 for macOS due to technical difficulties with the build system. macOS support will be back for 0.11.</p>
<ul>
<li><strong>OGS Editor 0.10</strong> <a href="https://sourceforge.net/projects/osrpgcreation/files/Editor/jenkins/51_2016-10-01_06-39-48_0.10.0/">is available at SourceForge</a>. Simply unpack the archive and launch the run script.</li>
<li><strong>Mahjong Solitaire game</strong> <a href="https://sourceforge.net/projects/osrpgcreation/files/Games/MahjongSolitaire/">is available at SourceForge</a>, too. Simply unpack the archive and launch the run script.</li>
<li><strong>Live session project</strong> <a href="https://github.com/OGStudio/mahjong-solitaire-livesession">is available at GitHub</a>.</li>
<li><strong>Live session recording</strong> <a href="https://youtu.be/g8Tyj_YH2Qc?list=PLWMTZqE4MAMJzBnXS9qU_ObWnzJuskI3F">is available at YouTube</a>. The video depicts the whole process of creating Mahjong Solitaire from scratch using <a href="https://github.com/OGStudio/mahjong-solitaire-rehearsal">rehearsal project</a> resources.</li>
</ul>A few words about live session yesterday2016-09-26T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-26:yesterdays-live-session-short-overview.html<iframe width="560" height="315" src="https://www.youtube.com/embed/_t8TGhSgJG4" frameborder="0" allowfullscreen></iframe>
<p>Mahjong Solitaire was successfully created, and it took less than 4 hours.
We will publish live session materials later this week.</p>
<p>Thank you for joining us.</p>Live session is in 24 hours2016-09-24T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-24:september-live-session-announcement-tomorrow.html<iframe width="560" height="315" src="https://www.youtube.com/embed/Fj4yHG-mV1U" frameborder="0" allowfullscreen></iframe>
<p>Get ready for <a href="https://www.livecoding.tv/kornerr">live session</a>, it's about to happen in 24 hours!</p>Live session: 25 September 20162016-09-17T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-17:september-live-session-announcement.html<iframe width="560" height="315" src="https://www.youtube.com/embed/Y5hOGKcQ8wA" frameborder="0" allowfullscreen></iframe>
<p>We will hold <a href="https://www.livecoding.tv/kornerr">live session</a> on <a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio+September+2016+live+session&iso=20160925T12&p1=37&ah=2">25 September 2016 at 12:00 CEST</a>
It's time to create simple Mahjong solitaire game.</p>August 2016 recap2016-09-03T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-09-03:2016-august-recap.html<p><img alt="2016-august-recap" src="http://opengamestudio.org/2016-09-03_august-recap.png" /></p>
<p>This article explains the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p>
<p><strong>UIQt module</strong> is a collection of UI components backed by Qt. We only use it for Editor UI at the moment.</p>
<p>Here is a list of UIQt module components with their description and current code size:<table>
<tr>
<th><strong>№</strong></th>
<th><strong>Component</strong></th>
<th><strong>Description</strong></th>
<th><strong>Size (B)</strong></th>
<th><strong>Size (%)</strong></th>
</tr>
<tr>
<td>1</td>
<td>UIQtAction</td>
<td>Actions (events) for menus</td>
<td>11224</td>
<td>9</td>
</tr>
<tr>
<td>2</td>
<td>UIQtAux</td>
<td>Initializes Qt and main window. Provides widget resolution by name to other components</td>
<td>15518</td>
<td>12</td>
</tr>
<tr>
<td>3</td>
<td>UIQtDock</td>
<td>Widget docks</td>
<td>5273</td>
<td>4</td>
</tr>
<tr>
<td>4</td>
<td>UIQtFileDialog</td>
<td>File selection dialogs</td>
<td>8960</td>
<td>7</td>
</tr>
<tr>
<td>5</td>
<td>UIQtMenu</td>
<td>Menus for main window and pop-ups (like node's add/copy/paste/delete menu)</td>
<td>4566</td>
<td>3</td>
</tr>
<tr>
<td>6</td>
<td>UIQtMenuBar</td>
<td>Menu bar for main window</td>
<td>4222</td>
<td>3</td>
</tr>
<tr>
<td>7</td>
<td>UIQtRunner</td>
<td>Allows to start QApplication</td>
<td>2450</td>
<td>2</td>
</tr>
<tr>
<td>8</td>
<td>UIQtThumbnailDialog</td>
<td>Dialog with thumbnail images</td>
<td>18615</td>
<td>14</td>
</tr>
<tr>
<td>9</td>
<td>UIQtToolBar</td>
<td>Tool bar for main window</td>
<td>4276</td>
<td>3</td>
</tr>
<tr>
<td>10</td>
<td>UIQtTree</td>
<td>Provides complex widgets like Scene tree and Property browser</td>
<td>51216</td>
<td>39</td>
</tr>
<tr>
<td>11</td>
<td>UIQtWidget</td>
<td>Common widget properties like focus and visibility</td>
<td>5465</td>
<td>4</td>
</tr>
</table></p>
<p><strong>UIQt module refactoring</strong> purpose was to replace old State API with new Environment API, which allows to achieve the same functionality with less code, i.e., makes development easier and faster.</p>
<p>Refactoring started in July and should have been done the same month. However, we only finished the work in August. Initial plan assumed 28 hours would be enough, but we spent 65 instead. We estimated planned time by relying on the number of public API calls of each component. That worked fine for small components, because the number of their public API calls was roughly equal to the number of their features, and features themselves were very small. However, it totally failed for UIQtTree, which contains 39% of UIQt module code, because there was no direct connection between public API and features.</p>
<p><strong>Feature based development approach</strong> was born as a result of UIQtTree refactoring struggle. Since Qt uses MVC, UIQtTree component consists of several classes. By the time UIQtTree could display and manage a hierarchy of items, the component was already 27K in size. We noticed UIQtTree started to require abnormal amount of development time even for tiny features. This was an obvious <a href="http://kornerr.blogspot.com/2012/04/complexity-conservation-law-complexity.html">quantitative complexity</a> manifestation.</p>
<p>We decided to separate UIQtTree into base part and additional ones. Base would only contain minimal code required by all features. Addition would contain specific feature code and could be safely modified. In the case of UIQtTree, item hierarchy display and modification is the minimal functionality, while item renaming is an addition.</p>
<p>Here is a list of current UIQtTree features:</p>
<table>
<tr>
<th>**№**</th>
<th>**Feature**</th>
<th>**Description**</th>
<th>**Size (B)**</th>
<th>**Size (%)**</th>
</tr>
<tr>
<td>1</td>
<td>Base</td>
<td>Allows to construct item hierarchy, modify it, and display it</td>
<td>26966</td>
<td>52</td>
</tr>
<tr>
<td>2</td>
<td>Item open state</td>
<td>Keeps track of collapsed/expanded item properties</td>
<td>3094</td>
<td>6</td>
</tr>
<tr>
<td>3</td>
<td>Item renaming</td>
<td>Allows to rename an item</td>
<td>3471</td>
<td>7</td>
</tr>
<tr>
<td>4</td>
<td>Item selection</td>
<td>Allows to get/set selected item</td>
<td>2338</td>
<td>5</td>
</tr>
<tr>
<td>5</td>
<td>Item value</td>
<td>Provides 2nd and the rest columns for items, used by Property browser</td>
<td>1307</td>
<td>3</td>
</tr>
<tr>
<td>6</td>
<td>Item value editing</td>
<td>Allows to edit item values with a default editor widget</td>
<td>1996</td>
<td>4</td>
</tr>
<tr>
<td>7</td>
<td>Item value editing with combobox</td>
<td>Provides combobox editor</td>
<td>5819</td>
<td>11</td>
</tr>
<tr>
<td>8</td>
<td>Item value editing with spinner</td>
<td>Provides spinbox editor</td>
<td>5290</td>
<td>10</td>
</tr>
<tr>
<td>9</td>
<td>Menu</td>
<td>Provides pop-up menu</td>
<td>1248</td>
<td>2</td>
</tr>
</table>
<p>Here's an example of UIQtTree Menu feature file: <a href="https://bitbucket.org/ogstudio-history/mjin/src/0c4cc3c3213f4687c0f3bd6a5426a6054cadd79b/f/TREE_MENU.cpp?at=Studio+0.10&fileviewer=file-view-default">TREE_MENU</a>.</p>
<p><strong>Benefits of the approach</strong> include:</p>
<ol>
<li>Faster code reading/understanding due to small size</li>
<li>Easier and safer modification due to isolated code</li>
</ol>
<p>There's a drawback, too: new approach requires learning.</p>
<p>That's it for the most important technical details about development in August: UIQt module, its refactoring, a new feature based development approach, and its benefits.</p>We’re back to social networks2016-08-18T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-08-18:back-to-social-networks.html<p>If you follow us on <a href="https://www.facebook.com/groups/162611230470183/">Facebook</a>, <a href="https://twitter.com/OpenGameStudio">Twitter</a>, or <a href="https://new.vk.com/opengamestudo">VK</a> you noticed we started to use them again. That's no coincidence: we're finally ready to communicate our progress verbally after 4 years of almost silent development.</p>
<p>Follow us to stay up-to-date!</p>Once Mahjong – always Mahjong2016-08-10T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-08-10:once-mahjong-always-mahjong.html<p>We started Opensource Game Studio project a long time ago. We wanted to provide open source community with tools to create games. However, it was unclear what tools' purpose was. So we decided to start small: create a game first.</p>
<p>It took us 3 years to reach the first goal: we released OGS Mahjong 1.0 in 2012. Even for a hobby project (we spend about 40 hours a month) it's too long.</p>
<p>Upon the game release we got it: <strong>Tools are means to save development time</strong>.</p>
<p>We spent 4 more years to develop them. Now is the time to prove they are worth every single day spent. How? We will <strong>recreate Mahjong solitaire mode</strong> in just a few hours!</p>
<p>Join our next live session in September.</p>May 2016 live session materials2016-05-29T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-05-29:ogs-editor-0.9.html<iframe width="560" height="315" src="https://www.youtube.com/embed/8gHYOkMRoos?list=PLWMTZqE4MAMKp3wP1N63xbdhdgfKi-d-J" frameborder="0" allowfullscreen></iframe>
<p>This time we have shown how to create a simple Domino based game. Below you can find all materials related to the game creation.</p>
<ol>
<li>Editor 0.9 for Linux (Debian based), OS X (10.9+), Windows <a title="SourceForge" href="https://sourceforge.net/projects/osrpgcreation/files/Editor/jenkins/49_2016-05-24_04-48-47_0.9.0/">is available at SourceForge</a>. Simply unpack it and launch the run script.</li>
<li>Domino project created during live session <a title="GitHub" href="https://github.com/OGStudio/domino-livesession">is available at GitHub</a>.</li>
<li>Domino rehearsal videos referenced during live session <a title="YouTube" href="https://www.youtube.com/playlist?list=PLWMTZqE4MAMKp3wP1N63xbdhdgfKi-d-J">are available at YouTube</a></li>
<li>Domino rehearsal project referenced during live session <a title="GitHub" href="https://github.com/OGStudio/domino-rehearsal">is available at GitHub</a>.</li>
</ol>
<p>The next live session will be held in September 2016.</p>Live session: 28 May 20162016-05-17T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-05-17:may-live-session-announcement.html<p>We're glad to annouce that the <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session will take place on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio+May+live+session&iso=20160528T12&p1=37&ah=3">28 May 2016 at 12:00 CEST</a>. Join us!</p>May live session (Editor 0.9)2016-04-24T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-04-24:may-live-session-decision.html<p>As you know, the previously published roadmap assumed, that we would hold a live session in April and it would feature a ping-pong game created with Editor 0.9.</p>
<p>We have to admit, our abilities to plan are not yet good enough. That's why the next live session will take place by the end of May. The exact date will be announced later.</p>
<p>Here's a short preview of the coming game:
<iframe width="560" height="315" src="https://www.youtube.com/embed/V3EvCVPc6kg" frameborder="0" allowfullscreen></iframe></p>"Rolling ball" live session videos and downloads2016-02-10T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-02-10:rolling-ball.html<p>Since we held 2 live sessions to create "Rolling ball" game, here are 2 YouTube videos of the process:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/70Jny1xJxK8" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="http://www.youtube.com/embed/851IlFT7y18" frameborder="0" allowfullscreen></iframe>
<p>"Rolling ball" game for Linux (Debian based), OS X (10.9+), Windows <a title="SourceForge" href="http://sourceforge.net/projects/osrpgcreation/files/Games/RollingBall/">is available at SourceForge</a>.
Simply unpack it and launch the run script.</p>
<p>Editor 0.8 <a title="SourceForge" href="http://sourceforge.net/projects/osrpgcreation/files/Editor/jenkins/46_2016-01-30_22-20-41_0.8.0/">is available at SourceForge</a>, too.</p>
<p>"Rolling ball" project for the Editor <a title="GitHub" href="https://github.com/OGStudio/rollingBall.ogs/archive/master.zip">is available at GitHub</a>.</p>
<p>To open it in the Editor:</p>
<ul>
<li>replace slideDown.ogs with rollingBall.ogs you downloaded</li>
<li>rename rollingBall.ogs to slideDown.ogs</li>
</ul>
<p>Since live session took us so long, we decided to concentrate on polishing. Editor already has a lot of features, but their use is inconvenient. We will fix major obstacles for the next Editor release.</p>Game creation live session (part 2): 7 February 20162016-02-02T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-02-02:rolling-ball-live-session-pt2.html<p>Unfortunately, we have failed to finish creation of the simple "Rolling ball" game in 3 hours. That's why we will hold the second <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio%3A+Game+creation+live+session%2C+part+2&iso=20160207T12&p1=37&ah=3">7 February 2016 at 12:00 CET</a>. Let's finish the game!</p>Game creation live session: 31 January 20162016-01-25T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-01-25:january-live-session-announcement.html<p>We're glad to annouce that the <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session will take place on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Open+Game+Studio%3A+Game+creation+live+session&iso=20160131T12&p1=37&ah=3">31 January 2016 at 12:00 CET</a>. Join us!</p>SOON: Creating a simple game live (Editor 0.8)2016-01-21T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2016-01-21:january-live-session-decision.html<p>We are ready to present Editor 0.8 with Player. The live session will be held at <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> SOON. We will show you how to create a simple game with sounds from scratch. And this time it will not need an Editor to run.
The exact date and time is to be announced in the coming days. Stay tuned!</p>Roadmap for 20162015-12-26T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2015-12-26:2016-roadmap.html<p>As you know, according to the <a href="{filename}/articles/2015-07-19-roadmap.md">previously published roadmap</a>, we now have sound system in place. However, we decided to go further and implement the first version of Player. We wanted to get it done by December, but, unfortunately, more work resulted in the change of dates.</p>
<p>Here's the revised roadmap for the first half of 2016:</p>
<ol>
<li>Editor + Player 0.8.0 (January 2016): Sound system, Whac-a-mole game with sounds</li>
<li>Editor + Player 0.9.0 (April 2016): Networking system, simple ping pong game for 2 players over the net</li>
<li>Editor + Player 0.10.0 (July 2016): Polishing, "Shuan" prototype</li>
</ol>Live session video and downloads2015-11-15T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2015-11-15:livesession-materials-editor-07.html<p>If you missed the live session, you can watch it here:
<a href="https://www.livecoding.tv/video/kornerr/playlists/whac-a-mole-from-scratch/">https://www.livecoding.tv/video/kornerr/playlists/whac-a-mole-from-scratch/</a></p>
<p>You can download the resulting project here:
<a href="https://github.com/OGStudio/liveSessionWhacAMole/archive/master.zip">https://github.com/OGStudio/liveSessionWhacAMole/archive/master.zip</a></p>
<p>The latest editor can be found here:
<a href="http://sourceforge.net/projects/osrpgcreation/files/Editor/jenkins/42_2015-11-13_08-16-46_0.7.4/">http://sourceforge.net/projects/osrpgcreation/files/Editor/jenkins/42_2015-11-13_08-16-46_0.7.4/</a></p>
<p>Download the editor archive, unpack, delete the wam.ogs folder, copy wam.ogs from the live session archive to the editor folder.</p>
<ul>
<li>in Windows - run the <code>run.bat</code> file.</li>
<li>in Linux and OSX - run the <code>run</code> file.</li>
</ul>Creating a simple game live: 15 November 20152015-11-09T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2015-11-09:livesession-editor-07.html<p>We're glad to annouce that the <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> session will take place on <a title="Local time" href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Whac-a-mole+game+from+scratch+live&iso=20151115T12&p1=37&ah=3">15 November 2015 at 12:00 CET</a>. Join us!</p>SOON: Creating a simple game live (Editor 0.7)2015-11-02T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2015-11-02:soon-game-creation-editor-07.html<p>As we have promised, we are ready to give you Editor 0.7 which is capable of creating the complete test chamber. However, after recreating the test chamber ourselves, it became clear that:</p>
<ol>
<li>it takes more than 8 hours to recreate it (too long)</li>
<li>it's inappropriate to be presented in the form of an article (too boring)</li>
</ol>
<p>Therefore we decided to hold a live session at <a title="LiveCoding" href="https://www.livecoding.tv/kornerr">LiveCoding</a> SOON to show you how to create a simple <a title="Whac-a-mole" href="http://google.com/search?q=whac+a+mole">whac-a-mole like game</a> from scratch.</p>
<p>Currently we are busy making final preparations, so we'll tell you the exact time and date this week. Stay tuned!</p>Desura no more, hello Humble Bundle Widget2015-07-23T00:00:00+03:00Opensource Game Studiotag:opengamestudio.org,2015-07-23:bye-desura-hello-humblebundle.html<p>After the recent bankruptcy of Desura's parent company, we decided, that we need a new place for our Deluxe version. Something better, more modern and more trustworthy. We have chosen the Humble Widget, with which you can buy the deluxe version of the game without leaving our site.</p>
<p>Here it is:</p>
<iframe src="https://www.humblebundle.com/widget/v2/product/ogsmahjong/ySGF3h34?theme=transparent-light" width="526" height="325" style="border: none;" scrolling="no" frameborder="0"></iframe>
<p>We haven't received a single penny from Desura (due to the minimal cache out limitations), but if you bought the deluxe version from them and experiencing any problems with downloading it (right now we see no problems with that), send us a letter, tell your name on Desura, we'll figure something out.</p>