It's been amazing to see the great news from our growth in the 3D space. Cocos Creator has been building pace towards unique new features that allow you to build any game you want with only your imagination hindering your creation.
After our release, one of the biggest game news sites in China shared their interview with our team and about the future of our engine. We appreciated their interview and wanted to share a translated version for our Western readers.
After becoming the world's first HarmonyOS game engine, Cocos makes new big moves in the 3D field
In my opinion, there has been a saying in the game development circle: If you develop an engine while developing a game, I am afraid that more than 90% of the team will go bankrupt.
Behind this opinion is a high degree of affirmation of the importance of game engines and the engine company. Especially after the game industry has entered the era of globalization and high-quality products, with the development of engine technology, the dependence of game developers and publishers on the engine they use focuses on content research and development has become more and more prominent.
Indeed, many popular games on the market have commercial engines. For example, "Sword and Expedition," the classic card series "Juvenile Three Kingdoms," and the evergreen SLGs such as "Clash of Kings" and "Kings of Chaos," or "Defend the Carrot," have a global monthly flow of 1 billion users.
Cocos, which is well-known in the industry for developing 2D game engines, recently released a cyberpunk demo made by Cocos 3D game engine. With high-quality graphics, it shows the industry a bizarre "night city" picture.
With the switching of the camera, in the cold and restless night, a city surrounded by gorgeous neon lights and giant billboards gradually reveal its full picture, a lively city that reveals a sense of loneliness. At the same time, the flying vehicles flying past the sky gave the city another sense of the future—the coexistence of run-down and technology is full of cyberpunk look.
I have to say that the overall multi-light source rendering effect revealed is surprising.
To be honest, the appearance of this high-quality demo undoubtedly refreshes the industry's understanding of Cocos again: the 2D game engine of the past has already made a lot of achievements in the field of 3D technology. And GameLook, who was also surprised and curious, contacted Cocos and talked with them about the "black technology" behind the birth of the Cyberpunk Demo.
Also, in this exchange, GameLook learned that the previous amazing Cyberpunk Demo is not derived from an internal version of the engine but is based on the Cocos Creator 3.3 version released on August 25.
The latter provides a wealth of 3D capabilities and further enhances performance, including native platforms and small game platforms. Among them, the startup performance and running performance of the applet has been doubled, and a new future-oriented engine architecture is also used to bring high-performance, data-oriented, and load-balanced renderers to the engine. At the same time, it seamlessly supports Vulkan & Metal. Back-end rendering will also support mobile VR/AR and some other platforms in the future.
Based on Cocos v3.3, how many technical secrets are hidden in this 2-minute demo?
Once upon a time, the gorgeous and charming night view of the city in the movie "Blade Runner" shocked many audiences. A large number of backlights and large chromatic aberration lenses have created a beauty that belongs only to cyberpunk, which has influenced countless subsequent works so that today's "electronic neon lights" are basically regarded as the symbol of cyberpunk works.
Coincidentally, in the Cyberpunk Demo of Cocos, the colorful neon lights also run through every part of the building complex, occupying the entire vision of the audience and well interpreting the cyberpunk aesthetics in the public's impression.
"We chose cyberpunk as the theme of this demo because of its light pollution style, which is suitable for putting in a large number of light sources and reflecting the rendering capabilities of the engine," says Youyou, Senior Graphics Engineer at Cocos, who also introduced to GameLook that the realization of this unique lighting effect actually comes from the deferred rendering pipeline, cluster light culling, cluster reflection probe and other features in Cocos Creator version 3.3.
Relying on the deferred rendering pipeline contributed by Huawei, Cocos Creator has dramatically improved the efficiency of multi-light source calculations: first, draw the object into the GBuffer, and get all the information of the final object rendered to a certain pixel. In the following rendering, in the pass, the lighting calculation can be performed based on the GBuffer information, and it only needs to be performed once.
At the same time, Youyou also revealed that based on the cooperation with Huawei, the new renderer architecture could solve the shortcomings of delayed rendering on mobile devices. Even on a mobile phone, this vast and complex scene can be run smoothly.
However, it is not enough to have a deferred rendering pipeline. After all, the Demo scene has hundreds of complex light sources, and it is obviously too much to perform a lighting calculation for all light sources for each pixel. Cluster Light Culling can eliminate light sources that do not selectively affect pixels and select the closest light source for rendering according to the distance.
The picture above is turning off the light source, and the picture below is turning on the light effect
"Because the light sources in the Demo are static light sources and will not move." Youyou further explained to GameLook: "Using this feature, we only need to divide the whole world into 16 x 16 x 16 in the 3D space when the scene is initialized. The grid; then calculate the distance from each light source to the grid, and put the information of the nearest light sources (this number can be controlled) that can affect the grid in the grid. Then in the lighting calculation stage, you can use the world in GBuffer. The coordinate information calculates the grid where the current pixel is located, from which the corresponding light source information that needs to be calculated is obtained."
If you are more careful, you will find that when the camera in the demo is shooting the city overhead, the road water will also reflect the reflective effect of the corresponding neon lights of various colors. And these kinds of realistic details are achieved through IBL (Image Based Lighting).
Compared with the traditional methods of using only one skybox as the environment map or baking out an environment map for the whole world due to the performance of the mobile device, you place reflective balls in different areas as much as possible so that each reflective ball only bakes the environmental information in this area.
The picture above shows the reflection ball turned on, and the picture below shows the effect of turning off the reflection ball
Youyou also mentioned that when there are more reflective balls in the world, there will be problems encountered in multiple light sources. As far as possible, only the reflective ball information that affects the current pixel should be calculated. "Using the existing Cluster Light Culling logic, it is easy to extend the logic that implements the Cluster Reflection Probe," said Youyou.
However, as we continue to penetrate into this "city that never sleeps," the entire demo will give people a foggy but transparent feeling, fully expressing the chaotic and decadent atmosphere unique to the cyber world.
The intuitive feeling GameLook got is obviously what we expected. Youyou said, "When setting up the scene, we wanted to create a feeling that looks foggy but feels very transparent. In order to achieve this effect, he chooses the algorithm of exponential height fog. The fog in the lower part of the scene will be thicker, and the higher the fog will be thinner. And the skybox also adds the fog effect algorithm so that the color of the high building can match the skybox. The colors are perfectly connected."
Indeed, the appearance of fog is almost invisible after the line of sight is moved. Still, various flying objects fill the entire sky, reproducing the classic technological elements in the cyberpunk world.
"Here, I mainly use a spline tool plug-in I wrote before. This plug-in allows developers to create and edit spline curves in the editor freely. You can customize many useful functions through the generated curves." Youyou said the demo uses the generated curve as the trajectory of the aircraft. As long as you edit multiple orbits in the editor in advance, generate the aircraft at regular intervals during operation and randomly select one orbit to put it on.
From a first perspective, from the demo video, the key technology of Cocos Creator is actually relatively mature. It is understood that the latest version has unified the 2D and 3D development workflow, taking into account the development experience of light-weight and medium-to-heavy games, and integrates almost all the features of the Cocos Creator 2.x and Cocos Creator 3D 1.x versions. (Editor note: Cocos Creator 3D was only available in China)
Cocos Creator, a master of the 3D field
In fact, as early as around 2014, Cocos has already invested in the research and development of the 3D engine. It's just not as smooth as the 2D mobile game; on the contrary, it experienced a rare "recommendation."
"I think this is just a law of development. It is really impossible to do this thing right and finish it in one or two years." In the view of Cocos CTO Lin Shun, the first round of trials did not bear fruit. The main reasons were insufficient resources and a need to cultivate suitable "soil."
Lin Shun explained to GameLook that the domestic technological environment actually has a chronological period. When the mobile gaming era was just emerging, the technical "soil" of the entire industry was still far behind compared to overseas. Under such conditions, it was inevitable for Cocos to miss the start of the 3D mobile game era. "Even though it was a hard lesson, we have to accumulate our work little by little. This is an indispensable and necessary path to making something great."
You must first accumulate technology before the soil can help your seeds to proliferate, and you will not miss more opportunities - this is what Cocos learned after their challenges. It is what Cocos has always worked towards in continuing to explore the 3D field.
For this reason, Cocos insists on investing all its annual profits in engine function research and development, new scene expansion, and ecological construction. Later, it was finally clear that the launch of Cocos Creator 3.0 continued to provide high-quality development services for 3D games while continuing the advantages of being light-weight and high efficiency in the 2D category.
This means that the Cocos-based engine can create complex 3D content like the Cyberpunk Demo and build interactive UI of low computing power IoT devices. And compared to before, Cocos Creator has broader applicability and can meet more needs. It can either develop a standalone APP or be integrated and embedded in other APPs.
According to Lin Shun, although the official version of Cocos Creator 3.0 has been out only a few months ago, some good-quality native games have appeared.
For example, Tianmei Studio's "One Sword Hero," Photon Studio's "Magic Fighting Realm," and "Fighter: Codename 666," which once topped the free list... At the same time, Cocos has also received many independent game teams. The favorite games, such as "Here is the Knight," "Starry Sky Battle," "Turn Around Puzzle," and "Pocket Striker," which has excellent performance overseas and have a monthly turnover of 200 million, are also based on Created by Cocos Creator.
Of course, as one of the most important game engines, Cocos also noticed the new hot spot nowadays-cross-platform games. The difference is that, compared to the cross-platforms where big manufacturers gather on mobile phones, PCs, and mainframes, Cocos pays more attention to the voices of thousands of small and medium-sized developers and focuses on some lighter and lower computing power platforms, such as small game platforms.
Cocos Technical Director Panda said that Cocos Creator 3.3 has made key optimizations for performance improvement. Especially on the small game platform, after the version update, the game's startup performance, running performance, and physical performance have been significantly improved.
Among them, after optimizing the startup performance that directly affects the player's click conversion, the internal WeChat cloud test startup performance score can reach more than 80 points. On this basis, the operating performance has also been optimized. Because the current WeChat mini game fully supports WASM features. Version 3.3 also supports running Bullet as WASM on WeChat, significantly improving the physical performance and helping developers to create more complex physical scenes.
At the same time, Cocos Creator V3.3 improves the binding level of the native engine. It completes the nativization of the rendering scene above the rendering pipeline, further optimizing the performance of the native platform and also making the performance of the web and small game platforms more visible to the naked eye.
Cocos currently has the highest market share of the WeChat platform. It can be estimated that more than 60% of the games are from the Cocos engine. With multiple advantages, it can naturally also help game developers and publishers to achieve cross-platform between native mobile games, web, and mini games, and cover more areas more easily.
Including the games mentioned above, such as "Pocket Ark" and "Warplane: Codename 666", they are all released with the help of Cocos to realize the multi-end release of native mobile games and mini games. At the same time, Panda also mentioned that they are also preparing for the next generation of wearable mobile platforms, such as AR, VR, XR, etc., and support better reality fusion rendering capabilities.
And Cocos's persistence in supporting developers and publishers is also reflected in the continuation of the free and open-source model.
Compared with simply selling the Pro version of software products, Cocos is more firm in the strategy of "shifting from the competitive game thinking, to win-win thinking," as the founder Wang Zhe said. Choose to coexist with developers, build win-win opportunities with partners, and maintain the open-source engine framework and expandable editor tradition.
In fact, it is not difficult to understand the original intention of Cocos, which is to bring better platforms and production tools to the industry. It was precisely this similar behavioral logic that became the first opportunity for them to join hands with the HarmonyOS team.
Last year, after the Huawei HDC Developers Conference announced that HarmonyOS operating system was about to be released and supported mobile phones, Cocos had a foreboding feeling that HarmonyOS would become one of the most important platforms on the market in the future. They contacted the Huawei team and started to establish cooperation.
"We joined with them, not to say that it is to bring much effect to the ecology, but mainly a kind of support for the domestic operating system," Panda said. As the builder of the domestic ecology, Cocos Creator also launched a new version when HarmonyOS 2.0 was officially released, becoming the world's first game engine to support HarmonyOS.
To make game development easier, this is a sentence on Cocos official website, and it is also a concept that it practices physically.
In addition to the results achieved in the current exploration of the 3D field, Wang Zhe said to GameLook that Cocos would continue to work hard on the performance and power consumption optimization of the 3D platform in the future, adapting to the next-generation mobile platform and further reduce the cost of the engine in speed.
It even plans to explore the possibility of IoT devices in the gaming industry in the future cooperation with HarmonyOS, trying to expand the entertainment experience to more and richer platforms and the entire society.
However, GameLook found that the most mentioned one is still the importance of the "production pipeline," which is also the direction that few domestic teams are trying.
Wang Zhe said frankly: "Most domestic teams hope to do better in rendering performance and runtime capabilities, but in fact, the toolchain is the biggest gap between us and advanced foreign engines." And this will be Cocos' key direction in the future. How to help developers make better use of the Cocos engine in the production pipeline.
However, Wang Zhe also admitted that the domestic game industry has seen many good changes compared with a few years ago, primarily due to the "industrialization system" initiated by major companies such as Tencent and NetEase.
Strictly speaking, the establishment of industrialization standards has indeed made the entire industry more standardized, and the division of labor has become more apparent and more detailed, and will gradually affect more game teams. In this process, Cocos will continue to firmly play the role of a "cultivator," helping the rapid growth of the "soil" under the accumulation of knowledge and technology and the improvement of the entire industrialization system.
In the future, with the continuous breakthrough of Cocos technology, it is believed that it will bring more high-quality, cross-platform games to players and the market and accelerate the development of the industry.