Examples and dependencies

Вт 21 августа 2018 ru

Screenshot

This article describes two new OpenSceneGraph cross-platform examples and the change in handling 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.

Category: News


Example-driven development

Ср 27 июня 2018 ru

Screenshot

This article explains how the third OpenSceneGraph cross-platform example opened our eyes to example-driven development.

2018-08 EDIT: the third example has been renamed to the fourth one due to the reasons described in the next article.

The third OpenSceneGraph cross-platform example

The third OpenSceneGraph cross-platform example explains how to implement …

Category: News

Read More

Mahjong recreation start

Пт 26 января 2018 ru

Screenshot

This article describes the start of Mahjong game recreation.

Plan

We started Mahjong recreation endeavour by composing a brief plan to get gameplay with minimal graphics:

  • Load single layout
  • Place tiles in layout positions
  • Distinguish tiles
  • Implement selection
  • Implement matching

Just like any other plan, this one looked fine at …

Category: News

Read More

The year of lessons

Вс 31 декабря 2017 ru

Screenshot

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.

As it may be clear from other articles …

Category: News

Read More

2017 summary

Ср 22 ноября 2017 ru

Screenshot

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.

Brief history

Opensource Game Studio project is 12 years old now.

2005. We started the project with a fanatic call to create the best game ever …

Category: News

Read More

Back to the Static

Пн 16 октября 2017 ru

Back to the Static

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 …

Category: News

Read More

The birth of MJIN world

Вс 10 сентября 2017 ru

The birth of MJIN world

This article describes the birth of MJIN world in August 2017.

mjin-player

As you know, we spent July to research scripting. We found a solution that satisfies the following criteria. Scripts should:

  1. run unchanged on all supported platforms
  2. allow extending C++ code

We have verified the second criterion by writing …

Category: News

Read More

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 …

Category: News

Read More
Page 1 of 5

Next »