+ OGS Mahjong 2: Demo 2
+
+We are glad to announce the release of the second demonstration of OGS Mahjong 2.
+The purposes of this release were to refine our development techniques and
+build a solid cross-platform foundation.
+Release
+Run the latest version of OGS Mahjong 2 in your web browser:
+http://ogstudio.github.io/ogs-mahjong
+You are encouraged to run the game with seed
parameter like this:
+http://ogstudio.github.io/ogs-mahjong?seed=0
+This allows you to play the same layout each time you launch the game.
+Each seed uniquely identifies the placement of tiles. Thus, different seeds
+give you a different experience.
+Development techniques and foundation
+During the second demonstration development, we switched from standard
+development to example-driven one. This resulted in the
+creation of three distinct repositories to back the development of OGS Mahjong 2:
+
+- OpenSceneGraph cross-platform examples repository provides cross-platform foundation like resource handling, render window setup, etc.
+- OGS Mahjong components repository provides Mahjong specific functionality like parsing layout, matching tiles, etc.
+- OGS Mahjong repository contains snapshots of
OGS Mahjong components
features that comprise specific game version. E.g., Demo 2
version is almost identical to 05.ColorfulStatus example of OGS Mahjong components
.
+
+Beyond Mahjong solitaire
+In addition to seed
parameter, you can let the game use remote layout hosted at GitHub:
+http://ogstudio.github.io/ogs-mahjong?seed=0&layout=github://OGStudio/ogs-mahjong-components/data/cat.layout
+Utilizing remote resources is an extremely powerful approach allowing anyone
+to create a layout of his/her choice and see the layout in action instantly.
+Our next step is to turn game logic into a resource, too.
+
+
+
+
+
+
Examples and dependencies
Examples of HTTP client and node selection
Once we finished working on the remote debugging example and
reported its completion, we were surprised by the fact
-that secure HTTP connection between a debugged application and debug broker
-was only working in the web version of the example. Desktop and mobile versions
-only worked with insecure HTTP.
-Since current debug scheme has no authentication, insecure debugging over HTTP
-doesn't really hurt. However, if we want to access resources located at popular
-sites like GitHub and BitBucket, we have to support secure HTTP.
-The need to support HTTPS on each platform spurred us to create
-HTTP client example. Turned out, each platform had its own
-preferred way of doing secure HTTP:
-
-- web (Emscripten) provides Fetch API
-- desktop is fine with Mongoose and OpenSSL
-- Android provides HttpUrlConnection in Java
-- iOS provides NSURLSession in Objective-C
-
-The need to support different languages on different platforms resulted
-in the creation of so-called 'host-guest' pattern:
-
-- guest (platform agnostic)
-- provides networking representation
-- used by cross-platform C++ code
-
-
-- host (specific platform)
-- polls guest for pending requests
-- processes them
-- reports results back to the guest
-
-
-
-Node selection example was straightforward and caused no troubles.
-The change in handling dependencies
-For over a year we had to deal with the following
-shortcomings when building OpenSceneGraph across platforms
-using conventional methods:
-
-- macOS builds failing due to certain compile flags we use
-- hacking PNG plugin safety guards to have PNG support under Android
-- iOS simulator and device builds of the same example being in separate Xcode projects
-- OpenSceneGraph taking 20-30 minutes to build
-
-These shortcomings were slowing us down and complicating the development of
-new examples. Upon hitting these problems ten more times this month we decided
-it was time to solve them once and for all. Now OpenSceneGraph is built as part
-of each example in 2-3 minutes, and there's no more dependency magic involved.
-We took the same approach of building dependencies as part of each example to
-other external libraries like Mongoose and libpng-android, too.
-With these obstacles out of the way, we can now iterate faster. Just in time
-for the next technical demonstration of Mahjong 2!
-That's it for describing two new OpenSceneGraph cross-platform examples and
-the change in handling dependencies.
-
-
-
+
- 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 …
-
-
- Read More
-
-
-