Code Monkey home page Code Monkey logo

flaxdocs's Introduction

Flax Engine

Flax Engine is a high quality modern 3D game engine written in C++ and C#. From stunning graphics to powerful scripts, it's designed for fast workflow with many ready-to-use features waiting for you right now. To learn more see the website (www.flaxengine.com).

This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games.

Development

Screenshots

pbr-rendering rendering performance

Getting started

Follow the instructions below to compile and run the engine from source.

Windows

  • Install Visual Studio 2022 or newer
  • Install Windows 8.1 SDK or newer (via Visual Studio Installer)
  • Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer)
  • Install .NET 8 SDK for Windows x64 (via Visual Studio Installer or from web)
  • Install Git with LFS
  • Clone repo (with LFS)
  • Run GenerateProjectFiles.bat
  • Open Flax.sln and set solution configuration to Editor.Development and solution platform to Win64
  • Set Flax (C++) or FlaxEngine (C#) as startup project
  • Compile Flax project (hit F7 or CTRL+Shift+B)
  • Optionally set Debug Type to Managed Only (.NET Core) to debug C#-only, or Mixed (.NET Core) to debug both C++ and C#
  • Run Flax (hit F5 key)

Linux

  • Install Visual Studio Code
  • Install .NET 8 SDK (https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
    • Ubuntu: sudo apt install dotnet-sdk-8.0
  • Install Vulkan SDK (https://vulkan.lunarg.com/)
    • Ubuntu: sudo apt install vulkan-sdk
    • Arch: sudo pacman -S spirv-tools vulkan-headers vulkan-tools vulkan-validation-layers
  • Install Git with LFS
    • Ubuntu: sudo apt-get install git git-lfs
    • Arch: sudo pacman -S git git-lfs
    • git-lfs install
  • Install the required packages:
    • Ubuntu: sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev
    • Arch: sudo pacman -S base-devel libx11 libxcursor libxinerama zlib
  • Install Clang compiler (version 6 or later):
    • Ubuntu: sudo apt-get install clang lldb lld
    • Arch: sudo pacman -S clang lldb lld
  • Clone the repository (with LFS)
  • Run ./GenerateProjectFiles.sh
  • Open workspace with Visual Code
  • Build and run (configuration and task named Flax|Editor.Linux.Development|x64)

Mac

Troubleshooting

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

Restart PC - ensure DotNet is added to PATH for command line tools execution.

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

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

  • 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 .NET SDK, NuGet package manager and NuGet targets and build tasks in Visual Studio components.

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
    • Shaders/ - shaders source code
    • ThirdParty/ - 3rd Party source code
    • Tools/ - development tools source code

Licensing and Contributions

Using Flax source code is strictly governed by the Flax Engine End User License Agreement. If you don't agree to those terms, as amended from time to time, you are not permitted to access or use Flax Engine.

We welcome any contributions to Flax Engine development through pull requests on GitHub. Most of our active development is in the master branch, so we prefer to take pull requests there (particularly for new features). We try to make sure that all new code adheres to the Flax coding standards. All contributions are governed by the terms of the EULA.

flaxdocs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flaxdocs's Issues

Update VSCode instructions

https://docs.flaxengine.com/manual/scripting/debugging/visual-studio-code.html is outdated, since Microsoft is working on some new C# extensions

C# Dev Kit builds on the same foundations as Visual Studio for some of its functionality, it uses the same license model as Visual Studio. This means it's free for individuals, as well as academia and open-source development, the same terms that apply to Visual Studio Community. For organizations, the C# Dev Kit is included with Visual Studio Professional and Enterprise subscriptions, as well as GitHub Codespaces. For full terms and details see the license terms.

Wish to add more details about the platform sdks

For example ,i'm reading the docs of platform/uwp, it mentioned that it need the v141(2017),
but didn't talk about the specific tool to install in visualstudio.

I checked the vs installer , there are several kinds including c++ tool with spectre、MSVC c++ tool.

Spelling correction

In your docs you use "builded" as the past tense of build, this is incorrect. The correct word is "built".
I'd make the corrections myself and submit them but I have never done that sort of thing in GitHub, still rather noob at it other than cloning projects.

C++ Scripting JSON serialization expansion

Current JSON example only showcases extremely basic string serialization of an arbitrary object, without even showing what you are supposed to do with the resulting CompactJsonWriter. Here is how this needs to be extended:

Serialization

  1. Demonstrate usage of compact/pretty writer
  2. Demonstrate saving to the file

Deserialization

  1. Demonstrate loading of an arbitrary JSON file
  2. Demonstrate deserialization of an arbitrary scripting/scene object

Suggestion: Add Dark theme

I'm working on Flax at 3am...
i have a doubt...
i go to documentation...
LIGHT THEME

O MY GOD I'M BLIND

pls add dark theme :)

Relicense to CC BY 4.0

Relicensing

The FlaxDocs repository currently is all rights reserved.[1]

This is a problem, and we'd like to ask you for permission to change the license to the very permissive Creative Commons Attribution 4.0 International.

Pinging @mafiesto4 @stefnotch @herocrab @W2Wizard @bolognatic @Withaust @MinhCT @jb-perrier @iainmckay @Wolfos @mxruben @honzapatCZ @NordonOscillius @Galbi3000 @mlavik1 @realDLPS @tom-weiland @nothingTVatYT @nove1398 @molodoy-chelovek @brbrmensch @Clawthorn @GoaLitiuM @Evildea @iliyalb @jfaz13 @Muchaszewski , since you contributed to this repository. Thank you very much for improving the documentation by the way! <3

If you're fine with changing the license, please respond to this issue.

More info, feel free to skip this section

Disclaimer: I'm not a laywer, the following is just my very limited understanding of the rules. Please actually ask a lawyer when you have legal questions.

In most countries (jurisdictions), when you create something, you own it. (copyright)
For anyone else to view it, or to change it, or similar, they have to get your permission. (lots of exceptions)

The reason why things can be put onto GitHub, and why other people can look at it, is because of their Terms of Service. The GitHub ToS basically says "you uploaded public code to GitHub, now GitHub is allowed to display the code".

Most projects actually want people to be able to use their work, to contribute and more. For example, it should be possible to copy-paste a snippet of the documentation and put it into your code. This is why nearly every project has a license. A license is the legal document that actually allows you to do certain things, as long as you follow the rules.

The FlaxDocs repository doesn't have LICENSE file or anything. This means that the default still applies, where everyone owns their contributions. (all rights are reserved). This is not ideal. We'd like to fix that, by changing the license to the very open CC BY 4.0 license. That effectively means that

  • Anyone will be able to contribute to the documentation, same as before.
  • Anyone will be able to use the documentation, cite it, tweak it, as long as they give appropriate credit. This is an issue at the moment.

Document screen/client/local space

jb-perrier fixed the flashing tooltips on high DPI screens. I took a look at it and realized that I don't get why it was wrong before and why it's correct now. So I went ahead, dug through the source code and hopefully understand it correctly.

To save other developers the trouble of figuring it out themselves, I think we should document it. Where should I place the following documentation? (after cleaning it up a bit more)

Answer: maybe inside UI as subpage?

  • UI Coordinates, UI Windows, UI Control --> Transform, ...

Documentation (still needs to be fixed up)

On the low level end of things https://github.com/FlaxEngine/FlaxEngine/blob/be1b9857f9d219811febf18e144fa4d1e63ca9fa/Source/Engine/Platform/Windows/WindowsWindow.cpp#L384-L393, the size is "correct", as in, a monitor pixel is exactly one UI pixel.

However, when translating that into something for an application (UI system), you have to take care of the DPI scale (≥ 1). With a DPI scale of two, UI pixels are twice as large as the monitor pixels.

Screen space: No DPI applied, stretches across all monitors

  • e.g. Input.MouseScreenPosition
    Warning: Input.MousePosition only works with the game window

Window space:

  • Offset (window)
  • Divided by DPI

Local control space:

  • e.g. FlaxEngine/Source/Engine/Platform/Window.cs --> Internal_OnMouseMove
  • Offset to the correct client-window
  • Divided by DPI
  • Offset to the correct control

[Bug] Copy button in docs doesn't work

I don't know if this is the appropriate place to open this issue if not feel free to close the issue.

Problem is that copy chapter link button doesn't work.

image

Remove the snarky comments from the "Flax for X developers" pages.

Once i found out about Flax, the first thing i did was to look in the documentation for a starting out guide. However, seeing this:
image
left a really bad taste in my mouth. I get that it is a small joke but when it's the first thing a potetional user might see, imho it makes Flax look unprofessional for throwing shade at other engines. These pages should focus on making a great first impression and teaching a new user how to use the engine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.