GET Cross Platform Chandelier / Sudo Null IT News FREE

In the article GameDev and the candelabrum, we described the process of porting the game Maryage to Android. The game came out quite successful and almost now after the release, we began to plan a cross-political platform variant with a further concenter connected online. Unity3d was chosen as the platform. The development process took about six months.

Interesting? Seminal fluid under the cat!

The undertaking

Thusly, the political program is selected, the performers, too, seem to be perfoliate and decipherable, no visible problems are visible on the apparent horizon.
Development can be conditionally two-chambered into 2 parts - backend (hereinafter referred to as logic) and frontend (Graphical user interface with platform features, hereinafter referred to as client). Unity3d was chosen as the platform (that's how it will be further in the text and then that they don't talk about rebranding and the miss of "3d" units themselves). The logic has already been written and worked perfectly. The only trouble was that the language in which the logical system was engrossed was coffee, and only C # or JS was proper for the selected platform. Accordingly, the main labor was to port the existing code to valid C # codification, while maintaining one to one functionality.
The customer portion has already been implemented, but like the logic, it was stiffly tied to the implementation of the GUI in Android. Accordingly, the client had to write from scratch, according to technically competent TK in the form of the idiomatic expression "so that it was the synoptic as in the Humanoid version" :)

Logical system Porting

The task was to do this every bit rapidly as possible with minimal rewriting. Simply a whole series of problems still had to atomic number 4 faced.

In C # there is none extensible type enum, and in our Orientation this type was used very widely: notice suits and ranks, card game themselves, conventions, bets and whists, courageous states. In some cases, we managed to puzzle out by with the basic enum in C #. Just in most cases, enums were more just enumerated types: a variety of data was take a hop to them and there were helper methods. I did not want to lose altogether this in the ported code. As a result, a minimally similar Java class Enum for C # was made. All master enum-s became separate classes with preservation of the early data and functionality, normal enum-s from C # were attached to them, which set the sequence (Enum.ordinal () method) and enumerated name (Enum.name ()), as well as used in switch..case.

The heavy legacy of Delphi likewise made itself felt when porting to C #. Most of the logic was written in internal procedures with shared variables. In Java, this was solved relatively only - by inner classes. In C #, although at that place are inner classes, they are similar to static classes in Java, that is, they cannot use the fields and methods of the container class. I had to add sitelinks.

Disdain the richer selection of arrays in C #, there was no replaceable Java functionality there. The problem is that an array of the soma int [] [] cannot be created by a single operator corresponding new int [10] [20]. It was not imaginable to switch to rectangular arrays everywhere; in some cases, subarrays were used individually. I had to write supporter methods that completely create a multidimensional array.

There were other unpleasant inconveniences:

  • switch..case requiring break level in the very next-to-last condition, including default;
  • mass replacement of boolean with bool;
  • final exam cleanup, or replacement with readonly / sealed;
  • the absence of an unsigned shift to the right (>>>) expected to the presence of unsigned types;
  • the goto operator, which in Java controls transitions in nested loops, but in C # retains its ancient intention.

But whol this was revealed by the compiler. Merely I had to cut off the Coffee representative byte type and change it to the sbyte analog from C # without any help oneself.

Customer effectuation

All graphic subject was completely (with small fixes) borrowed from the Android version. NGUI was chosen as a GUI framework - there were nobelium options here in rationale: work with atlases, optimization past rendering with minimization of DrawCalls, a compos mentis content organization using unity3d message system. Zero wonder the important developer of this framework is now sawing the orthodox GUI for unity3d.

All placid was sorted into analytical groups and collected in atlases supported on the limitation of 2048x2048 dots per telamon:


Atlas of metropolis icons (there is still a place for at any rate 6 cities).


Atlas of the main controls used on all "screens".

So much an organization of computer graphic subject allowed to reduce the number of DrawCalls in the peak to 15 (for example, when opening a scrolled bid panel and opening a card with visual settings).

One of the problems was the need to "do everything the identical as on Android," namely, adjusting controls for screen resolution. Usually, all controls "stick" to the edges of the screen and slither apart / skid with them, in this case this option was unacceptable. As a result, a solution was written that worked approximately accordant to the following scheme:

  • set the reference resolution (1280x800 was elite);
  • place controls how they should look right;
  • hang up happening controls helpers for proportional scaling / repositioning;
  • profit.

When launched at any resolution, the screen superlative is always considered adequate to 800 virtual points, and the width varies depending on the scene. Helpers at the starting signal consider the relationship between the old aspect and the raw one, reported to the results they perform repositioning and zooming.

Reference firmness (1280x800).


Wider aspect (1136x640) - stripes are viewable at the edges.


The same answer (1136x640), the result of working out helpers - information technology can glucinium seen that the controls are placed proportionately wider, and the background is scaled.

As a result, everything was done on the reference resolution + tested on the narrowest aspect (4: 3).

It was also necessary to implement not-measure behavior of controls, which, thanks to the unified message system NGUI, turned out to be comparatively simple. This is how LongPress buttons, creeping air with trim, and Grid with enlivened repositioning of elements were implemented. I besides had to patch few places of standard components for adaptation to the visualize (UIPopup was able to display the pop-fly part in the nominative parent, and not in the current one - problems with clipping pop-up content by UIPanel components were solved; centering the scroll panel by the nestling learned to brush off unfit elements and others immature fixes).

Totally the client's work was divided into "screens" with a garter of the local logic of behavior on a particular "screen": the main menu screen, the "education" settings screen, City of London selection CRT screen in the "tournament", the screen of the game itself, etc. This allowed United States to abridge the consignment connected the graphic part in terms of memory consumption at each moment of time - when consignment the next "screen", altogether loaded objects were destroyed and the locomotive could clear the disentangled memory board OR use it to load new resources. Between the scenes, only a few unkillable objects "come around" that provide access to user information in terms of settings, close selected items, etc.

By the time the work began on the customer English, the API for interaction with logical system was not approved, and then information technology was decided to divide wholly the game mechanics into unintegrated modules (managing a hard of cards for each user, controlling the "waving" of card game, managing bets, managing text edition messages for players and the information panel , direction of gimpy settings, local anaesthetic state, etc.) with access to them from anywhere in the secret plan process through singletones. At the Saami time, something was written like tests directly inside the client, yanking all addressable methods to verify the correct operation of this entire economy. All animations and other things work in one stream, finished coroutines, in that location is nothing unscheduled here.

Outward systems

This may include the implementation of IAP-functionality, banner advertising, Tapjoy-client for receiving in-game currency for free for certain actions of the advertising political platform and GoogleAnalytics. Soom.la

was primitively chosen as the IAP framework : a cross-political program API, bread and butter for two major fluid platforms, seamless integration without crutches around Android startup inauguration patching and it's all for nothing. It's enough to compare the horrors of consolidation of prime31 divisions, when they forcedly grinded manifestos alone for their loved ones + had distinct APIs on diametrical platforms to understand that this model is simply ringing. In the future (if thither is a involve for a winphone translation and soomla does not receive regular sustain), a passage to Unibill is possible .

Admob acted as a streamer provider, and a product from http://www.neatplug.com was elect as the client for IT . The reason is the homophonic - soft desegregation, a unified API, defend for the two main mobile platforms, the cost of the universal version for 2 platforms is $ 56 (versus $ 50 for to each one platform for prime31 and the jambs described above for IAP). One not quite adequate demeanor of the fabric was found when the banners were completely positioned at different DPIs, so equally a result, it was decided to limit ourselves to definitive binding to the borders of the screen.

A a client for Tapjoy, a standard framework from the site itself acted. The code for correct work in the editor was slightly finished, the general integration did not cause any problems, IT was enough 4-5 starts of the progress in the copycat to check the triggering of events away logs.

GoogleAnalytics is successful, modified from the adaptation for Web sites. The lead is a cross-weapons platform solution via WWW that does not require native versions of libraries for different platforms for $ 50.

Pairing Logic and Client

After 4 months, the prototypical version of the logic appeared and it could begin to dock with the client. The logical system itself was formed American Samoa an independent application, spinning in an endless iteration, allowing queuing up teams and pulling contributor methods in case of outgoing commands. As a result, the logic in unity3d was wrapped in code that controls its get-go in a separate screw thread and provides transit of commands in some directions (ut not forget that data types, method signatures, etc. are wholly incompatible, because both systems were developed in isolation from each other and two different performers). Oddly enough, everything grew together surprisingly shield-shaped and the management team fell well on the client modules.

Place Runtime Issues

One non-so-funny story happened with the work of logic in a separate wander. As you know, on iOS information technology is forbidden to use any non-native code, therefore unity3d when exporting a projection runs managed assemblies through AOT, generating output libraries that are already linked to the system ones + all sorts of glue wrappers on obj-c are added to dock all this of good. Moreover, a separate chassis is made for the emulator, in which there is JIT and everything will work as it works in the editor program - this is important, because errors that occur along material hardware can never go on either in the editor or in the copycat.
Those. in fact, when running on real hardware - no debugging of the project, only to the touch happening the logs and tie.
So, back to the thread issue. Information technology seems that everything worked, and then suddenly IT began to fall, dropping the covering entirely. According to the xcode logs, it clad that the crash occurs deep in Single-channel runtime after career Thread.Sleep () operating room Thread.Current.IsAlive if the thread was interrupted (but not every time). Those. received crash on a prognosticate of standard methods at seemingly standard effort to disturb a stream. The funny thing is that on the JIT adaptation of the fles (e.g., Mechanical man, standalone, webplayer) everything worked kayoed as it should. Using the sack method, the to a higher place methods were resolute, leading to doss down. Atomic number 3 a solvent, it was decided to abandon the forced interruption of the teem, and instead signal to the logic that it would atomic number 4 time to cease, and then wait for the stream to close. Crash disappeared and never returned.

The second job was the erroneous calculation of the behavior of AI when using the two-base hit typewrite precisely after processing AOT and when running on real hardware. We had to catch out through the collection of a tempestuous number of logs containing the calculations victimized in the analysis of the game scheme. The log sized of each test game exceeded 40 Bachelor of Medicine of unadorned text. All this had to be somehow collected at heart an application running on serious ironware and also removed to the outside. At first in that location was an attempt to cod logs through GoogleDocs, but the speed and allowed mass were depressing, so a server was quickly codified in node.js, which receives data via post-requests and glues them into a local text file. From the applications programme side, everything was implemented in the phase of a caching queue of log entries + dumping when overflowing through a standard WWW to a self-made http-host.

Testing

The entire testing march was carried out using the https://testflightapp.com platform , both for liaise Android builds and for all stages of development for iOS. UIID numbers of testers' devices were collected (automatically, through with the client GUI after registration), the provision-profile was updated, and builds were already collected with installation permissions for the listed remote devices. Afterwards construction the ipa physique, it bu poured through the admin control panel to the test flight and access code was granted with email alerts for entirely testers. It was enough for them to enter the client and click the build button, everything happened automatically. No additional integration with testflight services was carried out, because this would entail another integration with native libraries, and would hardly bring any gain.

If you neediness to do well - do it yourself!

We did not social club reviews to encourage the Humanoid version of the game, simply for iOS we decided to order one review along a popular resource. It's too early to talk about its financial side, but I need to apportion my impressions about the quality of the brushup. After payment, an order of magnitude verification varsity letter and a review request were received. The review itself for approval came on time, only it would be better non to open it. Not only did the individual who wrote the review did not even bother to press threesome (!) Buttons on the main screen and did not even try to realize how the game works (I agree, this is not a solitaire), but he did not cognize how to write. To boot to technical mistakes, the article was well-lined of phrases like "you need to grievance as many points A possible, which are calculated from the points." Copy-glue of Wikipedia and our assistant under the sauce of three-year-old from the eighth grade plain did non suit us and we wrote the review ourselves.

Summary

Unity3d is currently the best program for creating cross-platform games. We did not have any special problems with creating the GUI, although the integration of various plugins took much many time than originally intended. Also, do non update the plugins or Unity3d itself if everything deeds for you and in that location are no extra days for a pleasant pursuit. And do not draw a blank that there will be no guaranteed cross-platform, you must make up prepared to debug logic happening all platforms.
For Android, we have decided so out-of-the-way not to use the cross-platform version, since devices based on 2.2 and 2.3 (which are old by 4% and 10% of users, respectively) simply do not pull it, descending out of OutOfMemory. We hope that these devices volition soon be a thing of the past, thereby simplifying the maturation of the online interpretation.

DOWNLOAD HERE

GET Cross Platform Chandelier / Sudo Null IT News FREE

Posted by: howellhige1935.blogspot.com

0 Response to "GET Cross Platform Chandelier / Sudo Null IT News FREE"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel