Git Product home page Git Product logo

ezengine / ezengine Goto Github PK

View Code? Open in Web Editor NEW
1.3K 51.0 175.0 414.4 MB

An open source C++ game engine.

Home Page: https://ezEngine.net

License: MIT License

CMake 0.68% C++ 67.90% C 2.35% Batchfile 0.01% C# 0.11% HLSL 0.55% Assembly 5.22% TypeScript 2.03% JavaScript 20.92% PowerShell 0.14% Python 0.07% Shell 0.01% VBScript 0.01% HTML 0.01%
gamedev game-engine 3d-game-engine 3d-graphics c-plus-plus

ezengine's Introduction

ezEngine

ezEngine is an open source C++ game engine.

Visit http://ezEngine.net for documentation, samples and detailed build instructions.

ezEngine Screenshot

Supported Platforms

The full engine functionality is currently only available on Windows, because the renderer uses Direct3D 11. Work on porting the renderer to Vulkan is ongoing. There is an experimental Linux port of the editor, but it is not yet functional enough for productive use.

All non-rendering related functionality compiles on Windows, Android, Linux and MacOS. See this page for details.

Prebuilt Binaries

See the releases for recent changes and prebuilt binaries. Note, however, that releases are infrequent and you are generally expected to build the engine yourself.

Building the Engine

These are the instructions for Windows. For other platforms see this page.

Open a Windows Terminal to clone and build the engine:

  1. git clone https://github.com/ezEngine/ezEngine.git
  2. cd ezEngine
  3. .\GenerateWin64vs2022.bat
  4. Open the Visual Studio solution Workspace\vs2022x64\ezEngine_vs2022x64.sln and build everything.
  5. Launch the Editor project from Visual Studio and open one of the sample projects.

Design Philosophy

EZ is built in a modular way, enabling users to either use all available functionality, or to pick and choose individual features and build the rest themselves. Larger features are implemented through engine and editor plugins and can therefore easily be removed or replaced. For instance sound (Fmod), physics (Jolt) and particle effects are all provided through plugins.

EZ puts a strong emphasis on a solid foundation that is both easy and efficient to use. Even if you do not use the rendering functionality, EZ has a lot to offer to build your own engine on top of.

Finally, EZ comes with a feature rich editor that makes it possible to quickly prototype your game using visual scripting and custom C++ code.

Screenshots, Videos, Samples

Documentation and FAQ

Contributing

Contributions are always welcome. Please see this page for details on how you can contribute.

Contact

If you have a question, contact us.

ezengine's People

Contributors

ananace avatar bethau avatar brightening-eyes avatar c-core avatar chairobl avatar chrvoss avatar clkern avatar dimhotepus avatar florianbagarmicrosoft avatar ingrater avatar jailbreakpapa avatar jakrams avatar jankrassnigg avatar jayrulez avatar jrouwe avatar kulaev avatar leaappelsmeier avatar mafaldag1 avatar na2axl avatar plasmadev5 avatar rawrunprotected avatar riederalex avatar sanakan8472 avatar sebastianpick avatar sebastianschumm avatar sykzes avatar theophiluse avatar vimusc avatar wumpf avatar x0r04rg avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

ezengine's Issues

ThreadSignal not Exported

I think the class ezThreadSignal is missing a EZ_FOUNDATION_DLL declaration. I'm getting linker errors of unresolved external symbols regarding the functions of ezThreadSignal When linking the dll libs.

CMakeLists.txt References Non-Existing Directory 'Projects'

CMake emits an error saying "Error in configuration process, project files may be invalid."

Relevant log excerpt:

Adding Library: TestFramework
Enabling Precompiled Header for this project.
Adding Library: ThirdParty
Adding SubDirectory 'Projects'
CMake Error at CMakeLists.txt:11 (add_subdirectory):
  add_subdirectory given source "C:/data/projects/3rdparty/ezEngine/Projects"
  which is not an existing directory.


Adding SubDirectory 'Tools'
Platform is Windows (BUILDSYSTEM_PLATFORM_WINDOWS)

In the CMakeLists.txt file (line 11) you have the following line which I suppose is causing this error:

add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/Projects)

There is no Projects directory in the current release. However there is a Projects directory in rev-380. I suppose this is a remnant of an old revision?

A Couple of Questions About ezWindow

Note: I am compiling on/for windows.

First, in the file System\Window\Implementation\Win32\Window_win32.inl starting at line 107 is the following code:

if (!m_CreationDescription.m_bFullscreenWindow)
{
    ezLog::Dev("Window is fullscreen.");
    dwWindowStyle |= WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE;
}
else
{
    ezLog::Dev("Window is not fullscreen.");
    dwWindowStyle |= WS_POPUP;
}

I assume the log messages there are swapped? Because it tells me that the window is resizable, when I told it it should not be. :)

Second, is there a way to position the window at any position other than top-left? The ezWindow::Initialize seems to effectively ignore the values set in ezWindow::m_CreationDescription.m_WindowPosition. I have stepped through the ezWindow::Initialize code and it seems in line 157 and 158 the result for iLeft and iTop is always 0. Am I holding it wrong or what's going on here?

I tried these:

m_CreationDescription.m_WindowPosition.Set(0, 0);
Initialize();

m_CreationDescription.m_WindowPosition.Set(100, 100);
Initialize();

m_CreationDescription.m_WindowPosition.Set(-1, -1); // It expects unsigned values, but whatever...
Initialize();

m_CreationDescription.m_bFullscreenWindow = true;

m_CreationDescription.m_WindowPosition.Set(0, 0);
Initialize();

m_CreationDescription.m_WindowPosition.Set(100, 100);
Initialize();

m_CreationDescription.m_WindowPosition.Set(-1, -1); // It expects unsigned values, but whatever...
Initialize();

The log always said "... at left/top origin (0, 0)"

ezPreprocessor/ezTokenizer fails to parse Engine\Foundation\Basics.h

It seems ezPreprocessor has trouble with its own files. I used an adequate FileLocator function and the following custom defines: "WIN32", "_DEBUG", "_WINDOWS"
The ezTokenizer fails for me in ezTokenizer::HandleString2 with "String not closed at end of file." while tokenizing Platform_win.h
At this point in time the m_szTokenStart dubiously points at this string part:

"
#endif

#undef EZ_PLATFORM_LITTLE_ENDIAN
#define EZ_PLATFORM_LITTLE_ENDIAN EZ_ON

Later on the preprocessor runs into the error "Undefined platform!" in Basics.h ln18, apparently because it thinks the #else path belongs to the defines in Platform_win.h

The exact origin and reason of this error is not yet clear to me though.

Prefab reloading is broken

Have a scene open and change something in a prefab used by the scene.
Save the changed prefab.
This will trigger a resource reload and after that the prefab instance is empty.

Linker errors.

Hello.
I tried to compile editor but there are several linker errors.

Platform: Win x64
Compiler: VS 2019
CMake Configuration:
image

LNK2019 sample errors:

LNK2019	unresolved external symbol "__declspec(dllimport) struct ezStringView __cdecl BuildString(char *,unsigned int,unsigned int)" (__imp_?BuildString@@YA?AUezStringView@@PEADII@Z) referenced in function "private: void __cdecl ezFormatStringImpl<unsigned int &,unsigned int &>::ReplaceString<0>(char (* const)[64],struct ezStringView *)const " (??$ReplaceString@$0A@@?$ezFormatStringImpl@AEAIAEAI@@AEBAXQEAY0EA@DPEAUezStringView@@@Z)	FileservePlugin	E:\Cpp\ezEngine\Code\EnginePlugins\FileservePlugin\Main.obj	1

LNK2001 sample error:

LNK2001	unresolved external symbol "__declspec(dllimport) public: static class ezRTTI ezInternal::ezStaticRTTIWrapper<unsigned char>::s_RTTI" (__imp_?s_RTTI@?$ezStaticRTTIWrapper@E@ezInternal@@2VezRTTI@@A)	RendererFoundation	E:\Cpp\ezEngine\Code\Engine\RendererFoundation\Basics.obj	1	

Complete errors list:
errors.log

Crash in DeleteDeadObjects

Transforming a scene I regularly get a crash in the ezWorld. See this:

image

It seems as if 'this' is an invalid / new object that has not been used or setup before, whereas 'other' is a regular (now dead) object that is supposed to be copied over 'this'. The assert now complains that the worlds differ. This looks like a false positive to me.

This happens pretty consistently and often for me since the last MSFT merge...

Input: Mouse Double Click detection does not work

ezInputSlot_MouseDblClick0-2 exist, but currently rely on the OS to provide the information. At least on Windows, but probably other OSes as well, this information is not available, unless specifically asked for. See https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-lbuttondblclk?redirectedfrom=MSDN -> CS_DBLCLKS window flag. This is not desirable, as it hides single clicks in quick succession.

Instead, it would be best to have a ezTime values for when the last click (left, middle, right) arrived (using ezTime::Now()) and check whether a new click is within a short duration. If so, we can inject ezInputSlot_MouseDblClick. This way code that is interested in double clicks can get this information, and code that does not care can just read the single click information. No single click would be removed.

This would then also work the same way on all platforms. One could theoretically even read the double click duration from the OS (meaning how many milliseconds of delay should still be considered a double click).

This check should probably be implemented in ezInputDeviceMouseKeyboard, which should override UpdateInputSlotValues(). Make sure that derived classes also call the base class implementation.

Editor: Log search filter UI issue

When a category is selected in the log search section the messages for the category are shown but empty rows remain for messages from other categories.

All categories:
image

image

Decals with long extents start to fade out again

Create a decal with extents (2, 0.5 0.5,) and let it intersect with a wall. Now scale the X extent up more and more. You will see the decal fade out again at some point, even though the decals should have full strength.

JNI wrapper schould not expose jni.h

In the HeaderCheck configuration jni.h is currently ignored, to make the build run. This should be fixed by hiding the implementation details of jni.h.

PhysX Visual Debugger crashes ez

Using the 'latest' PVD from https://developer.nvidia.com/physx-visual-debugger will crash ez, although NVIDIAs docs claims it should work: https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/VisualDebugger.html

Just launch the PVD, then press play in some scene in the editor. It asserts with

PxPvdDataStream.cpp(508) : Assertion failed: success

It is unclear whether this is because NVIDIA broke the PVD, or whether our new libs are somehow corrupt. Searching Google does not bring up any hits about this being a known problem.

Tested with VS 2017 x64.

Camera control issues

  • C works in orthographic views and changes the cameras Z position -> should keep Z unmodified
  • Align Camera with Object works in ortho modes, it just shouldn't
  • SHIFT+F sometimes zooms in immediately, not just on second try -> should either ALWAYS do it on first or on second try
  • Favorite cameras and level cameras in ortho mode also change rotation

Add a unit test for decals

Have a look at the particle unit tests, it's straight forward to just renderer a couple of frames using a scene that you configure from the editor.
Could just be several decals on a row showing the different modes, and some of them fading out over time.
Also maybe one attached to a dynamic object.

'Global' ezActions don't work as expected

  1. They depend on the 'Settings' tab to work (not assert), because that 'fixes' that when the same action is mapped twice, the ezDocument that they are bound to is null. That happens because the Settings tab is always the first document being set up, and its ezDocument pointer is null.
  2. Mapping them twice does not work. So for example having the 'Transform All' button in two places would not work.
  3. Unless the window in which the action is mapped has focus, any shortcut for global actions does not work.
  4. Closing the only window that mapped the global action, will remove the action, making it inaccessible via shortcut. Arguable whether this is wanted, but for a 'global' action it may be nice to not have it tied to any single UI element.

Asset transform does not detect error state correctly anymore

  • Make any incorrect dependency in an asset (ie. incorrect texture file reference in material).
  • Enable background processing
  • Watch AssetCurator
    -> it will try to transform the broken asset multiple times, never failing

If the asset is a dependency of other assets, this will also block processing of those assets.

"Camera Usage Hint" in editor view is unclear

In the editor views, the Camera Usage Hint menu allows to select things, but it is unclear whether this has any effect, and what effect that may be.

Either this needs to be clarified in the documentation, or the effect has to be fixed, or the menu should be removed.

Undo "Group" operation in editor breaks object visibility

CTRL+G is currently acting weird, you may need to use the context menu to group objects

Grab a few, group them, then click "Undo". The objects may disappear. Their render state seems to be broken, moving the camera around they will show up somethings, as if their culling position is incorrect and they are culling when you are close to them.

May depend on where the object is in the scene. Probably only happens for static objects (not sure).

ezStringBuilder assignment operator alters the state of its const argument

void ezStringBuilder::operator=(const ezStringIterator& rhs)

Even though the signature states, that rhs is const, the state of rhs is still altered, at least for some input.

The following sample reprocudes the issue:

auto builder = ezStringBuilder();
auto iter = ezStringIterator();

builder.Format("%u%u%u", 1, 2, 3); // "123"

iter = builder.GetIteratorFront(); // "123"
++iter;                            // "23"

builder = iter;

printf("builder: %s\n", builder.GetData());
printf("iter: %s\n", iter.GetData());

Output:

builder: 23
iter: 3

Expected Output:

builder: 23
iter: 23

I have compiled all my code and the ezEngine components using Visual Studio 2013 (Platform Toolset v120) in x64.

Random Numbers

Do you guys plan to provide random number generators?

ezSystem missing on OSX and Linux

On OSX and Linux, I was unable to generate a project for and thus build ezSystem. Quoting Code/Engine/System/CMakeLists.txt(73):

Someone else finish the MacOS and Linux setup...

Is it possible that you already fixed this in your SVN repo?

Material asset: Hide VS window

Regression after the ADS integration:
When a material window is shown that does not use Visual Shader mode, it should hide the VS window.

Greyboxing component should create dynamic shapes

When a greyboxing component is attached to a dynamic owner, and still has the AutoColMesh tag, it could create the necessary PxBoxShape components etc (plus child objects for positioning). To decouple this from PhysX the necessary calls could go through the ezPhysicsWorldModuleInterface interface.

Decals vanish in editor after simulate

Place a decal in a scene, then press play and stop again -> the decal disappears.

Press play -> it shows up again -> stop -> disappears again.

Now export the scene (CTRL+E) -> decal appears again.

Looks to me like this has to do with the render data caching.

Plasma impacts vanish too soon on static geometry

The asset "Plasma_SI_Default" contains a decal and a sound event, which are both set to OnFinished=DeleteObject.

This should work such that the last one deletes the object.

When shooting a static object, this does not happen. Instead, the sound finishes earlier and then deletes the entire object. Removing that option from the sound event "fixes" the problem. It works as expected when shooting dynamic objects (or maybe it doesn't work at all, and we then have zombie objects in the scene).

Community: Communication channel

Is there a communication channel that I can use to ask questions about the engine?

I have a few questions and maybe follow-ups in the future but I do not want to clutter the issue tracker with such questions.

Are the devs on discord, gitter, or any other community platform?

Asset filesystem watcher only works for the first change

If you have e.g. a texture or a mesh and change the source file on disk the Editor only detects the first change. If you change the same source file again the changes are not detected anymore. You can press the check filesystem button in the asset browser and then the asset is marked as modified. So I guess there is something broken with the filesystem watcher.

Color Gradient editor: 'Position' spinbox is difficult to use

In the color gradient asset, there is a spinbox to change the 'Position' of a keyframe. Trying to change the value by using 'Delete' or 'Backspace' and typing a value, is quite tricky, as certain keys will remove the value, but then fill up the spinbox with 0.00, which you then cannot edit, and you first have to remove a 0 again.

Maybe we can use the ezQtDoubleSpinBox instead.

Math types implicit conversion operators

The class ezColor provides a nice implicit conversion to float*, which is nice when used in conjunction with the OpenGL function glColor4fv because I can just hand in the instance of ezColor directly.

So, why does ezVec3Template<T> not offer an implicit conversion to T*? It appears kind of inconsistent that one of the math types has such a conversion but others do not. I haven't checked all the math types but none of those I saw provided such a conversion.

I know that you should be careful using this (it also says so in the comment of the ezColor conversion operator to float*) but if it is so dangerous, wouldn't it be better to remove it in the first place?

I'm aware that I can just take the address of ezVec3Template<T>::x, but on the other hand I could just as well take the address of ezColor::r, which is the exact implementation of said implicit conversion of ezColor to float*.

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.