3D engine with modern graphics
Wicked Engine is an open-source 3D engine with modern graphics. Use this as a C++ framework for your graphics projects, a standalone 3D editor, LUA scripting or just for learning.
You can get the full source code by using Git version control and cloning https://github.com/turanszkij/WickedEngine.git, or downloading it as zip. You can also download nightly packaged builds of the Editor here (requires Github sign in):
To build Wicked Engine for Windows, open the WickedEngine.sln solution file with the latest Visual Studio. When it's opened, press F5, then Wicked Engine and the Editor application will be built and then start. You can check out other sample projects in the solution too.
If you want to develop a C++ application that uses Wicked Engine, you can build the WickedEngine_Windows static library project and link against it. Including the "WickedEngine.h" header will attempt to link the binaries for the appropriate platform, but search directories should be set up beforehand. For example, you can set additional library directories to $(SolutionDir)BUILD\$(Platform)\$(Configuration) by default. For examples, see the Samples/Template_Windows, Samples/Tests, and Editor_Windows projects.
You can also use cmake to build on windows with these commands:
cmake -B build
cmake --build build --config ReleaseTo build the engine for Linux, use Cmake. You can find a sample build script for Ubuntu here (in the linux section).
On Linux you will need to ensure some additional dependencies are installed, such as Cmake (3.7 or newer), g++ compiler (C++ 17 compliant version) and SDL2. You can use the following commands to install dependencies:
sudo apt update
sudo apt install libsdl2-dev
sudo apt install build-essentialExample commands to build the engine with cmake in Release mode:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
makeTo build the engine for Mac OS and iOS, use the provided .xcodeproj files with the Xcode development environment, for example:
Console specific extension files required for building are currently private.
// Include engine headers:
#include "WickedEngine.h"
// Create the Wicked Engine application:
wi::Application application;
// Assign window that you will render to:
application.SetWindow(hWnd);
// Run the application:
while(true) {
application.Run();
}……(You can enter lua scripts into the backlog (HOME button), or the startup.lua script which is always executed on application startup if it is found near the app, or load a script via dofile("script.lua") command)
For more code samples and advanced use cases, please see the example projects, like the Template_Windows, Tests, or Editor project. There are also sample models and scripts included with Wicked Engine in the Content/models and Content/scripts folders. Check them out to learn about more features.
You can use a lot of of engine features through Lua scripting. The included applications, like the Editor, contain a scripting input method toggled by the "Home" key. A text screen will be presented where the user can type in LUA commands. For further details, check the scripting API documentation: Wicked Engine Scripting API
The native model format is the WISCENE format. Any application using Wicked Engine can open this format efficiently.
In addition, the Editor supports importing some common model formats:
You can import models into the Editor, and save them as WISCENE, then any Wicked Engine application can open them.
The default renderer is DirectX 12 on Windows, Vulkan on Linux and Metal on Apple systems.
You can specify command line arguments (without any prefix) to switch between render devices or other settings. Currently the list of options:
| Argument | Description |
|---|---|
| vulkan | Use the Vulkan rendering device on Windows |
| debugdevice | Use debug layer for graphics API validation. Performance will be degraded, but graphics warnings and errors will be written to the "Output" window |
| gpuvalidation | Use GPU Based Validation for graphics. This must be used together with the debugdevice argument. Currently DX12 only. |
| gpu_verbose | Enable verbose GPU validation mode. |
| igpu | Prefer integrated GPU selection for graphics. By default, dedicated GPU selection will be preferred. |
| amdgpu | Prefer AMD GPU selection for graphics. |
| nvidiagpu | Prefer Nvidia GPU selection for graphics. |
| intelgpu | Prefer Intel GPU selection for graphics. |
| alwaysactive | The application will not be paused when the window is in the background. |
If you are having trouble getting the applications to run, make sure that you satisfy the following conditions:
If you built the application with Visual Studio, run it from the Visual Studio environment, where the executable working directory is set up to be the Project directory (not the build directory where the exe will be found)
If you want to run an application without Visual Studio, either copy the executable from the BUILD directory to the correct project directory, or set the working directory appropriately. You can also check the Working directory setting in Visual Studio to find out the right working directory of every project.
If you experience crashes, you can try these to find out the problem:
debugdevice command argument and post the text from your console output window when the crash happensgpuvalidation with debugdevice will print additional graphics debug informationAdd a simple Time of Day control to the Weather system
Crash with AMD Radeon RX 6800 on Debian
Bug crash when the radius of a cylinder rigid body physics is almost 0.
Ocean Foam Color Inherits Ocean Water Color at Low Water Opacity, Producing Incorrect Visual Results
Buffer overflow/Logic error in wiHelper.cpp when parsing szFile
Apple platform feature support status
urban/village environment terrain
Suggestion: Cellular Automata Diffuse Gi
D3D12: device removed, cause: DXGI_ERROR_DEVICE_HUNG in hp laptop da001nk
Wicked Engine Logo Assets and Font Information