GameDevTech
GameDevTech
A collection of development notes from Carpelock Games, organized by topic. These articles document the tools and versions used at the time they were written. Check each article’s version notes before applying it to a different environment.
General Development
Build OpenSSL on Windows
Historical development note. Originally published in May 2024. The engine and dependency versions below describe that environment; they are not a recommendation to use these versions in a new project.
- Download required OpenSSL version and extract
- Note: p4api 2023.x uses OpenSSL 1.0.2t, click to download this version
- Follow the instruction shipping with OpenSSL
- Open file INSTALL.W64 in the root folder
- Install Stawberry Perl if not yet (do NOT use ActivateState Perl)
- Install NASM if not yet
- Need add envitonment varial path mannually for it
- Use Visual Studio Developer Command Prompt with administrative privileges
- NOTE: Use the right one (we use x64 version here)

Use commands in the prompt:
- Follow the instruction and complete the rest steps
- Hint: The last step is testing build result, it will tell you whether the build result is correct
CRYENGINE
Build CryEngine with the Latest p4api
Historical development note. Originally published in May 2024. The engine and dependency versions below describe that environment; they are not a recommendation to use these versions in a new project.
Introduction
Default SSL pseudo lib removed from p4api since version 2017.x. Cryengine 5.7 use p4api version 2016.x which does not support SSL. But our server require SSL support (and I have no intention to change this) so we use latest p4api instead. But SSL libs are not included in p4api. So we need to build OpenSSL libs on our own and modify PerforcePlugin (official integration of p4 in CE) build configs.
Let’s see the result first:


Build OpenSSL and deploy to CE
- See Bulid OpenSSL on Windows for more details
- OpenSSL 1.0.2.t are used from p4api 2017.x to 2023.x
- Use ’no-shared’ option for static library when vuild OpenSSL
- Copy SSL libs to p4api sdk lib folder (see build PerforcePlugin section)
- libeay32.lib
- ssleay32.lib
- Copy SSL dlls to bin/win64
- libeay32.dll
- ssleay32.dll
- [Optional] Add dlls to no ignore p4ignore config (if you are using perforce as version control)
- !*/bin/*/libeay32.dll
- !*/bin/*/ssleay32.dll
Build PerforcePlugin for CE Sandbox
- Modify PerforcePlugin cmake file

- Create the folder ‘p4api/windows’ under ‘Code/SDKs/’
- Then copy p4api ver 2023.x to the path
- Copy ssleay32.lib and libeay32.lib from OpenSSL compile result (See OpenSSL above)
- Configure and generate, then build
- Run sandbox and open the VersionControlSystem UI and ensure Perforce option exists
That’s all. Thanks for reading this article. Hope it helps.
Fix CryEngine Mannequin Editor DPI Scaling
Historical development note. Originally published in May 2024. The engine and dependency versions below describe that environment; they are not a recommendation to use these versions in a new project.
Introduction
CryEngine 5 uses QT as the UI framework. It’s good considering how powerful QT is. However there are some problems at the moment due to current status of the engine and SDKs.
- QT 5.12 is used by CryEngine 5.7.1, QT 5.12 has some dpi scaling issues itself. We shall leave these problems aside and wait for Crytek to fix with newer QT.
- It rounds very limited, which means we can not have a scale between 1 and 2
- The UI displays 100% if monitor dpi is set less than 150%
- Then the UI dsiplays 200% if monitor dpis is set to 150% and above, an so on…
- It uses physical dpi rather than logical dpi, this is a confirmed bug/issue, see this discussion and this issue for more information if you are interested. This bug fixed in later versions but unfortunatelly CryEngine is using QT 5.12
- It rounds very limited, which means we can not have a scale between 1 and 2
- Some editors in CryEngine still uses old MFC framework and not scaled correctly if the engine runs with DPI option ‘Applicaiton’ rather than ‘System’ or ‘System(Enhanced)’ (System DPI scaling will lead to editor font blury). This is what we can fix in limited time and resources.
Mannequin Fix Result Comparison
Considering the MFC UI has a long history, it’s really hard to fix all problems and make it perfect. Some size and layout configs are dynamic in code, while some are static within resource file (*.rc). And some icons can not be scaled up easily due to how they are implemented (but I fixed buttons so it’s only a visual thing now).
So I only fixed issues in Mannequin editor that affects our work effeciency. The following results are shortcut with params:
- With default DPI mode (Application)
- 4K (3840 * 2560 px), 27’ monitor
- 150% system scale

Original

Fixed

Original

Fixed

Original

Fixed

Original

Fixed

Original

Fixed
Material Editor Legacy
Considering that fix mannequin reqires some fixes to basic MFC controls shared through many MFC editors. Other MFC editors are improved too. But they are not fully fixed because they may use their own controls, static settings or call size and layout settigns during their own logic. And they may use static layout config in rc files too.
Let’s take legacy Material Editor for example and see how it’s improved:

Original

Fixed
Patch Files
I can’t provide dlls for you to replace original official dlls directly, because source code changes leads to several dlls change and the ABI may not be compatible (lead to crash and errors). So I generate a diff file contaning code changes from my perforce changelist. I am not sure if this can be applied directly to git repo or other version control solutions. So be prepared before trying to apply this patch.
That’s it. Hope it helps. Feel free to discus with me at CRYENGINE community channel on discord.
Zach.W