
工欲善其事必先利其器,本文主要介绍我在使用 UE 的过程中开发的一些开源的工具和插件,能够方便地在项目中使用,提高开发效率。之前简单罗列在 资源 页面里,今天做一个详细的整理,对各个工具、插件做一些介绍。
工欲善其事必先利其器,本文主要介绍我在使用 UE 的过程中开发的一些开源的工具和插件,能够方便地在项目中使用,提高开发效率。之前简单罗列在 资源 页面里,今天做一个详细的整理,对各个工具、插件做一些介绍。
Learning is like rowing upstream; not to advance is to drop back. This is especially true in the field of CS, where new technologies and frameworks are developing rapidly, and the technical iteration on the business level is very fast. You may become familiar with a technology only to see it quickly become obsolete. Therefore, only by continuously engaging with, understanding, and learning new knowledge and skills can one continually expand their programming career.
This article is a reflection on the technical accumulation I’ve made over the past few years while blogging. Originally intended as a record of the notes revision, I now feel it’s appropriate to separate it into a standalone article. I rarely write reflective pieces, thinking that methodologies are too abstract, but if one has the self-discipline to turn theoretical guidance into action, methodologies are indeed necessary. I hope I can accomplish this as well.
WWise is Audiokinetic’s cross-platform audio engine that interacts well with game engines, allowing audio designers to handle audio solely within WWise. This separates game logic from audio production and management, providing events and parameters for use in game engines, achieving decoupling with business logic and precision control over audio.
This article mainly introduces the integration of WWise with UE4, remote building, resource analysis, documentation collection, the control interaction between WWise and UE, and code analysis of generated Banks.
When developing games, a large number of image resources are used, and the purpose of using texture atlases is to reduce DrawCall and improve performance. In UE, there is no packaging tool for texture atlases, and a popular solution is to use the third-party texture packing tool TexturePacker. The new version of TexturePacker supports direct export of UE4 Sprites and can be imported directly into the engine. In earlier versions, it was possible to import data via a Json Array using VaTexAtlas, but compared to the direct export of UE Sprites by TexturePacker, VaTexAtlas does not have an advantage. UE Sprites can be previewed directly, while VaTexAtlas cannot. Given that official support is already available, it is not recommended to use VaTexAtlas as a method for importing texture atlases into UE.
This article mainly focuses on documenting the analysis of TexturePacker atlas generation files, importing into UE, introducing options, and recording the issues encountered while using it in UE.
The main content of this article introduces the deployment of the UE development environment on Mac, configuration of iOS remote packaging, the application of UPL on iOS (intervening in the ipa packaging process), tools and development skills, as well as analysis of related engine code, documenting some pitfalls encountered in the project. It is primarily compiled from my previous notes, and related Mac and iOS content will also be updated in this article in the future.
Game hot updates are a way for players to obtain the latest game content without reinstalling the game. They are widely used in network games on both PC and mobile platforms, as quick adjustments, bug fixes, and content updates are often needed after a game goes live. If even the smallest change requires players to update the app through the App Store, or manually download and install it from a website, and given that different platforms have inconsistent review rules and feedback times, operations could become chaotic.
While there may be relatively mature solutions for hot updates in other engines, comprehensive discussions on implementing hot updates in UE4 are not commonly found. Fortunately, I have previously analyzed and implemented UE4’s hot update mechanism and plan to write a couple of articles to document my thoughts and implementation plans, along with a runnable demo, which I hope will be of help to those who need it.
To conveniently collect and manage common questions and solutions regarding hot updates and HotPatcher, I’ve created a new article to document and organize them: UE4 Hot Update: Questions & Answers. If you encounter issues, please check this FAQ page first.
UE uses Zlib
by default as the compression algorithm for packaging resources, but it is not the best choice in terms of compression ratio and decompression speed. The efficiency comparison of various compression algorithms can be seen from the Squash Compression Benchmark. I chose the Facebook open-source ZStandard to replace Zlib, as ZSTD provides a good compression ratio while also having decent decompression speed. This article will not only explain how to integrate a compression algorithm into UE but will also briefly introduce a modular organization method for some features in UE—ModularFeature
. Using this method makes it easy to replace certain functionalities, and the replacement compression algorithm in this article serves as a practical example.
I integrated ZSTD into UE by writing a plugin. The source code is available on GitHub: hxhb/ue-zstd, which supports Android, Windows, iOS, and macOS. Feel free to give it a star.
UE uses C++ as a compiled language, which means it becomes binary after compilation, and players can only update the game by reinstalling it. However, in game development, there’s often an urgent need for requirement adjustments and bug fixes, and frequently prompting players to update the app is unacceptable. Generally, game projects use Lua as the scripting language to transform the immutable C++ code at runtime into updatable Lua code.
Although UE does not officially support Lua, Tencent has open-sourced UnLua, which is being used in my current project. Over the past few days, I’ve organized some materials on UnLua (mainly the official documentation, issues, and presentation PPT) and combined it with my own experience from testing UnLua while writing a small demo, resulting in this programming guide for UE combined with UnLua. This article summarizes some basic methods and pitfalls for using UnLua to write business logic and will be updated continuously.
Additionally, Lua files can be packaged into Pak using my previously open-sourced tool: hxhb/HotPatcher. I’ve also modified a version based on UnLua, adding some extra optimizations. The source code integrates the Luasocket/Luapanda/
lpeg
/Sproto
/Luacrypt
libraries, and you can use LuaPanda for debugging. The GitHub address is: hxhb/debugable-unlua.
Due to the impact of COVID-19, I’ve been confined at home throughout the Spring Festival, and I haven’t returned to work yet. I can only read books and organize my notes, hoping the pandemic ends soon and that my friends stay healthy.
The main content of this article is to analyze the differences in syntax between the C++ used in UE development and standard C++. UEC++ is essentially a superset of C++, supporting and utilizing all features of C++, but it has built its own syntax on top of the standard features. Many compilation issues during development can only be quickly and accurately identified at different stages by understanding the boundaries between the two. For those who learned C++ before using UE, this isn’t a problem, but for students who first encounter UE and then gradually learn C++, this can be quite a significant issue.
Standard C++ is based on the language standard ISO/IEC 14882 (C++98/03/11/14/17, etc.), while UEC++ is Epic’s extended usage built on standard C++. This article will not cover topics like GC or reflection or various libraries in UE, focusing instead on the core syntax level.
By default, after packaging a game with UE and installing the Apk on a phone, launching the game will create the game’s data directory under /storage/emulated/0/UE4Game/
(which is at the root of the internal storage). According to Google’s rules, it is best for each app’s data files to be placed in their own private directory. Therefore, I want to put all the game’s data packaged by UE into the directory /storage/emulated/0/Android/data/PACKAGE_NAME
(regardless of whether it’s log, ini, or crash information).
This seemingly simple requirement has several different approaches involving UE4’s path management, JNI, Android Manifest, and analysis of UBT code.