FlaxEngine - Flax Engine – 多平台 3D 游戏引擎

Created at: 2020-12-09 23:02:33
Language: C++
License: NOASSERTION

亚麻发动机

亚麻引擎是用C++和C#编写的高质量现代3D游戏引擎。从令人惊叹的图形到强大的脚本 - Flax可以为你的游戏提供一切。专为快速工作流程而设计,有许多现成的功能正等着你。要了解更多信息,请参阅网站 (www.flaxengine.com)。

该存储库包含亚麻引擎的完整源代码(不包括受NDA保护的平台支持)。欢迎任何人在基于亚麻的游戏中贡献或使用修改后的源代码。

发展

截图

pbr 渲染 渲染 性能

开始

按照以下说明从源代码编译和运行引擎。

窗户

  • 安装 Visual Studio 2022 或更高版本
  • 安装 Windows 8.1 SDK 或更高版本(通过 Visual Studio Installer)
  • 安装 Microsoft Visual C++ 2015 v140 工具集或更高版本(通过 Visual Studio Installer)
  • 安装 .Net 7 SDK(通过 Visual Studio Installer 或从 Web 安装)
  • 使用 LFS 安装 Git
  • 克隆存储库(使用 LFS)
  • 运行生成项目文件.bat
  • 打开解决方案配置并将其设置为编辑器。开发和解决方案平台到 Win64
    Flax.sln
  • 将 Flax (C++) 或 FlaxEngine (C#) 设置为启动项目
  • 编译亚麻项目(按 F7 或 Ctrl+Shift+B)
  • 运行亚麻(按 F5 键)

Linux目录

  • 安装视觉工作室代码
  • 安装 .Net 7 SDK (https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
    • 乌班图:
      sudo apt install dotnet-sdk-7.0
  • 安装 Vulkan SDK (https://vulkan.lunarg.com/)
    • 乌班图:
      sudo apt install vulkan-sdk
    • 拱:
      sudo pacman -S spirv-tools vulkan-headers vulkan-tools vulkan-validation-layers
  • 使用 LFS 安装 Git
    • 乌班图:
      sudo apt-get install git git-lfs
    • 拱:
      sudo pacman -S git git-lfs
    • git-lfs install
  • 安装所需的软件包:
    • 乌班图:
      sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev
    • 拱:
      sudo pacman -S base-devel libx11 libxcursor libxinerama zlib
  • 安装 Clang 编译器(版本 6 或更高版本):
    • 乌班图:
      sudo apt-get install clang lldb lld
    • 拱:
      sudo pacman -S clang lldb lld
  • 克隆存储库(使用 LFS)
  • ./GenerateProjectFiles.sh
  • 使用可视代码打开工作区
  • 生成并运行(名为
    Flax|Editor.Linux.Development|x64
    )

苹果电脑

故障 排除

  • Could not execute because the specified command or file was not found.

重新启动电脑 - 确保将 DotNet 添加到 PATH 以执行命令行工具。

  • Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 7.0

Use Visual Studio 2022, older versions are not supported by .NET SDK 7.

  • Building for Windows without Vulkan rendering backend (Vulkan SDK is missing)

Install the Vulkan SDK then set an environment variable to provide the path to the SDK prior to running GenerateProjectFiles.bat: .

set VULKAN_SDK=%sdk_path%

  • The NuGetSdkResolver did not resolve this SDK

Install , and in Visual Studio components.

.NET SDK
NuGet package manager
NuGet targets and build tasks

Workspace directory

  • Binaries/ - executable files
    • Editor/ - Flax Editor binaries
    • Tools/ - tools binaries
  • Cache/ - local data cache folder used by the engine and tools
    • Intermediate/ - intermediate files and cache for engine build
      • ProjectName/ - per-project build cache data
      • Deps/ - Flax.Build dependencies building cache
    • Projects/ - project files location
  • Content/ - assets and binary files used by the engine and editor
  • Development/ - engine development files
    • Scripts/ - utility scripts
  • Source/ - source code location
    • Editor/ - Flax Editor source code
    • Engine/ - Flax Engine source code
    • Platforms/ - per-platform sources and dependency files
      • DotNet/ - C# dependencies
      • Editor/ - Flax Editor binaries
      • PlatformName/ - per-platform files
        • Binaries/ - per-platform binaries
          • Game/ - Flax Game binaries
          • ThirdParty/ - prebuilt 3rd Party binaries
    • 着色器/ - 着色器源代码
    • 第三方/ - 第三方源代码
    • 工具/ - 开发工具源代码

许可和贡献

使用亚麻源代码受亚麻引擎最终用户许可协议的严格约束。如果你不同意这些不时修订的条款,你将不被允许访问或使用亚麻引擎。

我们欢迎通过 GitHub 上的拉取请求对 Flax Engine 开发做出任何贡献。我们的大多数活跃开发都在 master 分支中,因此我们更喜欢在那里接受拉取请求(特别是对于新功能)。我们尝试确保所有新代码都符合Flax编码标准。所有贡献均受 EULA 条款的约束。