Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Mobile / Android

Brick by Brick: Building a Better Game with LEGO Minifigures Online

0.00/5 (No votes)
30 Oct 2015CPOL7 min read 8.7K  
The current generation of Intel® graphics hardware extends Intel’s leadership in enabling innovation across the industry, including being fully ready for DirectX 12 and driving the adoption of advanced features by next-generation games.

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

Intel® Developer Zone offers tools and how-to information for cross-platform app development, platform and technology information, code samples, and peer expertise to help developers innovate and succeed. Join our communities for Android, Internet of Things, Intel® RealSense™ Technology, and Windows to download tools, access dev kits, share ideas with like-minded developers, and participate in hackathon’s, contests, roadshows, and local events.

Game makers now enjoy unprecedented market opportunity by offering titles that deliver advanced gaming experiences on both PCs that run Microsoft Windows* and on mobile devices that run Android*. Optimizing graphics for Intel® Core™ processors as well as Intel® Atom™ processors is rapidly becoming a strategic imperative.

With the evolution of mobile gaming beyond its roots in casual games, revenue projections in this segment are growing dramatically. In fact, market research firm Newzoo projects that mobile games will replace consoles as the largest game segment by revenue in 2015, reaching USD 30.0 billion in 2015 and USD 40.9 billion by 2017.1

Helping cement its more than 20 years of providing well-regarded games, Funcom developed LEGO* Minifigures Online (LMO) with both Intel® architecture-based 2 in 1 PCs and Android tablets as primary target devices. The company’s optimizations provide exceptional graphical experiences on both platforms, building on recognized successes by Funcom that include The Longest Journey (ranked number 59 on the MetaCritic list of the top 100 PC games of all time)2, as well as Anarchy Online*, Age of Conan*, and The Secret World*.

Advanced Pixel Synchronization Effects for Intel® Graphics Technology

The current generation of Intel® graphics hardware extends Intel’s leadership in enabling innovation across the industry, including being fully ready for DirectX* 12 and driving the adoption of advanced features by next-generation games. An excellent example is Intel’s pixel synchronization extension for DirectX 11, which enables programmable blending operations.

This set of capabilities is being widely adopted, becoming a part of the DirectX 12 standard (under the name Raster Ordered Views), being supported by graphics hardware from other manufacturers (such as Nvidia Maxwell*), and being enabled in OpenGL* with the GL_INTEL_fragment_shader_ordering extension.

Intel’s pixel synchronization extension gives developers control over the ordering of pixel shader operations. It can be used to implement functions such as custom blending, advanced volumetric shadows, and order-independent transparency. It provides a way to serialize and synchronize access to a pixel from multiple pixel shaders and to guarantee deterministic pixel changes. On Intel® hardware, the serialization is limited to directly overlapping pixels, so performance remains unchanged for the rest of the code.

Examples of algorithms that are enabled by this set of features include the following:

LEGO Minifigures Online uses AVSM to achieve advanced smoke and cloud effects on both Windows and Android. Comparisons of game scenes on Intel processor-based 2 in 1 PCs with AVSM disabled versus the same scenes with AVSM enabled are shown in Figures 1 through 4. Enhanced graphics quality using AVSM in these scenes provides a more realistic and immersive gaming experience that will also be made available for Android tablets based on Intel Atom x5 and x7 processors.

Image 1

Figure 1. "Actually Hopping Antelope – Level 2" scene with AVSM disabled

Image 2

Figure 2. "Actually Hopping Antelope – Level 2" scene with AVSM enabled

Image 3

Figure 3. "Scarlet Serrated Brainiac – Level 5" scene with AVSM disabled

Image 4

Figure 4. "Scarlet Serrated Brainiac – Level 5" scene with AVSM enabled.

Cross-Platform Playability and Scaling

LEGO Minifigures Online has been optimized for 4th generation Intel Core processors. It also provides support for both laptop and tablet modes on 2 in 1 PCs as shown in Figures 5 and 6, giving users the raw horsepower of the laptops they love in a more casual environment by converting the device to tablet mode. This flexibility allows gamers to play LMO when they want, where they want, in the mode they want – giving them more opportunity to play.

Image 5

Figure 5. "Scarlet Serrated Brainiac - Level 5" scene in Laptop Mode

Notice the larger, more conveniently located touch icons for gamers.

Image 6

Figure 6. "Scarlet Serrated Brainiac - Level 5" scene in Tablet Mode

The enhanced graphics capabilities across Intel® platforms make it possible for users on high-end Windows desktops, Windows laptops, 2 in 1 devices, and Intel Atom processor-based tablets running both Windows and Android, to all play together in the same immersive game world.

Improved Battery Life on Intel® Core™ Processors

Optimizing games to reduce power consumption is not only an important aspect of the user experience, but it can also be a critical component to getting favorable reviews. The releases of many otherwise well-received games have been marred by the dreaded one-star reviews dominated by the phrase “kills the battery."

Intel and Funcom worked together to add Battery Saving Mode as a user-controlled option in LEGO Minifigures Online, as illustrated in Figure 7. This capability can extend battery life by nearly 80 percent on 4th generation Intel Core processors and more than 100 percent on 5th generation Intel Core processors.3

Image 7

Figure 7. Battery Saving Mode in LEGO* Minifigures Online

The fundamental approach to improving battery life is to reduce the amount of work for the processor and GPU. Battery Saving Mode in LEGO Minifigures Online achieves that goal by capping framerate at 30 frames per second, disabling anisotropic filtering, post-processing FX, and anti-aliasing.

The overall effect of these measures is to reduce frame draw time, allowing the processor and GPU to enter deeper sleep states during periods of inactivity, thus improving battery life. Details of these battery-life optimizations are available in the Game Developer Conference 2015 presentation, “Power Efficient Programming: How Funcom increased play time in Lego Minifigures by 80%."

Optimization for Android Devices Based on Intel® Atom™ Processors

Successfully shipping more than its goal of 40 million processors for tablets in 20144, Intel has become one of the largest silicon providers for tablets and a growing force in the Android market segment. Intel is extending this drive into 2015 with the introduction of the Intel Atom x5 and x7 processors, based on industry-leading 14 nm manufacturing process technology and compact, low-power system-on-chip (SoC) designs.

  • Performance improvements for gaming include Gen 8 graphics, as well as support for 64-bit processing and multi-tasking.
  • Enhanced battery life is provided by capabilities that include Intel® Display Power Saving Technology and Intel® Display Refresh Rate Switching Technology to help reduce panel backlight and refresh rate opportunistically.

An initial focus for performance improvement of LEGO Minifigures Online on Android devices was native compilation for Intel platforms. Non-native binaries, such as those compiled for ARM*, must be run by the Intel Atom processor using just-in-time compilation, which incurs additional processing overhead, interferes with advanced offline compilation optimizations, and increases loading times.

Intel worked with Funcom to ensure that Android installation packages include native binaries for Intel architecture, overcoming those previous limitations. In fact, providing this support for Android games using the Unity* game engine is straightforward, as discussed in the Intel® Developer Zone article, “Adding x86 Support to Android* Apps Using the Unity* Game Engine." Further information is available in the articles, “Google Play* Store Submission Process: Android* APK" and “How to Publish Your Apps on Google Play* For x86-based Android* Devices Using Multiple APK Support."

Conclusion

Intel architecture provides a compelling set of opportunities for game developers to expand their potential market segment share. Optimized games can deliver excellent graphical user experiences across the full range of target systems—from high-end desktop systems, to laptop PCs, 2 in 1s, and Intel Atom processor-based tablets. Enabling gameplay that responds to the needs of each platform supports broader usability and prepares game companies to benefit from ongoing expansion of mobile gaming in the years to come.

About the Authors

Filip Strugar is a former game developer, now working for Intel as a Software Graphics Engineer. He enjoys working on various algorithms, inventing things like CMAA and helping game developers in making their games run best on Intel graphics hardware.

Landyn Pethrus is an engineer at Intel, avid gamer, and hardware enthusiast. When Landyn is not fountain sniping with Ancient Apparition in Dota2, slaying bosses, or pursuing higher level education, he can be found on the rivers of Oregon fishing.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)