-
Notifications
You must be signed in to change notification settings - Fork 0
feat/unreal benchmark #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kelwan
wants to merge
4
commits into
main
Choose a base branch
from
feat/unreal-benchmark
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[submodule "unreal-cpp-net-fps/Plugins/Ecsact"] | ||
path = unreal-cpp-net-fps/Plugins/Ecsact | ||
url = https://github.com/ecsact-dev/ecsact_unreal | ||
branch = main | ||
[submodule "unreal-cpp-net-fps/Plugins/EcsactNet"] | ||
path = unreal-cpp-net-fps/Plugins/EcsactNet | ||
url = https://github.com/seaube/ecsact-net-unreal | ||
branch = main | ||
[submodule "unreal-cpp-benchmark/Plugins/Ecsact"] | ||
path = unreal-cpp-benchmark/Plugins/Ecsact | ||
url = [email protected]:ecsact-dev/ecsact_unreal.git | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: BlockIndent | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: true | ||
AlignEscapedNewlines: Left | ||
AlignOperands: DontAlign | ||
AlignTrailingComments: false | ||
AllowAllArgumentsOnNextLine: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortIfStatementsOnASingleLine: WithoutElse | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: true | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
AfterExternBlock: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: false | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Custom | ||
BreakBeforeInheritanceComma: false | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakStringLiterals: true | ||
ColumnLimit: 80 | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 2 | ||
ContinuationIndentWidth: 2 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
IncludeBlocks: Preserve | ||
IncludeIsMainRegex: "(Test)?$" | ||
IndentCaseLabels: true | ||
IndentPPDirectives: AfterHash | ||
IndentWidth: 2 | ||
IndentWrappedFunctionNames: false | ||
InsertBraces: true | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MacroBlockBegin: "" | ||
MacroBlockEnd: "" | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
PackConstructorInitializers: NextLine | ||
PenaltyBreakAssignment: 10 | ||
PenaltyBreakBeforeFirstCallParameter: 30 | ||
PenaltyBreakComment: 10 | ||
PenaltyBreakFirstLessLess: 0 | ||
PenaltyBreakString: 10 | ||
PenaltyExcessCharacter: 400 | ||
PenaltyReturnTypeOnItsOwnLine: 350 | ||
PointerAlignment: Left | ||
ReflowComments: true | ||
RequiresClausePosition: OwnLine | ||
SortIncludes: false | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: Never | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: Never | ||
SpacesInContainerLiterals: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
SeparateDefinitionBlocks: Always | ||
Standard: Latest | ||
TabWidth: 2 | ||
UseTab: ForContinuationAndIndentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Visual Studio 2015 user specific files | ||
.vs/ | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.ipa | ||
|
||
# These project files can be generated by the engine | ||
*.xcodeproj | ||
*.xcworkspace | ||
*.sln | ||
*.suo | ||
*.opensdf | ||
*.sdf | ||
*.VC.db | ||
*.VC.opendb | ||
|
||
# Precompiled Assets | ||
SourceArt/**/*.png | ||
SourceArt/**/*.tga | ||
|
||
# Binary Files | ||
Binaries/* | ||
Plugins/**/Binaries/* | ||
|
||
# Builds | ||
Build/* | ||
|
||
# Whitelist PakBlacklist-<BuildConfiguration>.txt files | ||
!Build/*/ | ||
Build/*/** | ||
!Build/*/PakBlacklist*.txt | ||
|
||
# Don't ignore icon files in Build | ||
!Build/**/*.ico | ||
|
||
# Built data for maps | ||
*_BuiltData.uasset | ||
|
||
# Configuration files generated by the Editor | ||
Saved/* | ||
|
||
# Compiled source files for the engine to use | ||
Intermediate/* | ||
Plugins/**/Intermediate/* | ||
|
||
# Cache files for the editor to use | ||
DerivedDataCache/* | ||
|
||
# Clangd | ||
.cache | ||
compile_commands.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
# This is an example batch file for building your Ecsact system implementations | ||
# with Emscripten. In a more sophisticated setup you will likely use a build | ||
# system such as bazel, cmake, zig, etc. | ||
|
||
param ( | ||
[Parameter(Mandatory)] $ProjectDir | ||
) | ||
|
||
if (${env:UE-ZenSubprocessDataPath}) | ||
{ | ||
Write-Host "Detected live coding enabled" | ||
Write-Host "Skipping system impl re-build" | ||
exit 0 | ||
} | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
if (-not $env:EMSDK) | ||
{ | ||
if (Test-Path -Path "C:\emsdk\emsdk_env.ps1" -PathType Leaf) | ||
{ | ||
(. C:\emsdk\emsdk_env.ps1) 2> $null | ||
} | ||
|
||
if (-not $env:EMSDK) | ||
{ | ||
throw "Unable to find the Emscripten SDK installed on your system" | ||
} | ||
} | ||
|
||
$EcsactFiles = @( | ||
"$ProjectDir/Source/EcsactBenchmark/EcsactBenchmark.ecsact" | ||
) | ||
|
||
$Sources = @( | ||
"$ProjectDir/SystemImpls/EcsactSystemImpls.cpp" | ||
) | ||
|
||
$GeneratedOutDir = "$ProjectDir/SystemImpls/generated" | ||
|
||
# TODO: don't hard set generated sources | ||
$GeneratedSources = @( | ||
"$ProjectDir/SystemImpls/generated/EcsactBenchmark.ecsact.systems.cc" | ||
) | ||
|
||
$EcsactInc = (ecsact config include_dir) | ||
|
||
ecsact codegen $EcsactFiles ` | ||
--plugin=cpp_header ` | ||
--plugin=systems_header ` | ||
--plugin=cpp_systems_header ` | ||
--plugin=cpp_systems_source ` | ||
--outdir=$GeneratedOutDir | ||
|
||
emcc -v | ||
|
||
mkdir -Force "$ProjectDir/Binaries" | Out-Null | ||
|
||
$WasmOutputFilePath = "$ProjectDir/Binaries/SystemImpls.wasm" | ||
|
||
Write-Host "Building $WasmOutputFilePath ..." | ||
|
||
# NOTE: PURE_WASI=1 removes emscripten_* functions that are not compatible with the Ecsact SI Wasm host | ||
emcc -std=c++20 --no-entry -I"$EcsactInc" -I"SystemImpls/generated" ` | ||
-s ERROR_ON_UNDEFINED_SYMBOLS=0 ` | ||
-s WASM=1 ` | ||
-s STANDALONE_WASM=1 ` | ||
-s PURE_WASI=1 ` | ||
-O3 ` | ||
-Wno-js-compiler ` | ||
-o $WasmOutputFilePath ` | ||
$Sources ` | ||
$GeneratedSources | ||
|
||
if (-not $?) | ||
{ | ||
throw "emcc exited with code ${LastExitCode}" | ||
} | ||
|
||
|
||
Write-Host "Uploading $WasmOutputFilePath to Ecsact Net ..." | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[/Script/Ecsact.EcsactSettings] | ||
bEnableBuild=True | ||
CustomEcsactRuntimeLibraryPath= | ||
BuildReportFilter=None | ||
+Recipes=rt_entt | ||
+Recipes=si_wasmer | ||
Runner=Custom | ||
CustomRunnerClass=None | ||
bAutoCollectBlueprintRunnerSubsystems=True | ||
+RunnerSubsystems=/Game/Blueprints/BP_EcsactBenchmarkMassSpawner.BP_EcsactBenchmarkMassSpawner_C | ||
|
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
|
||
[/Script/EngineSettings.GameMapsSettings] | ||
GameDefaultMap=/Game/Maps/Benchmark.Benchmark | ||
EditorStartupMap=/Game/Maps/Benchmark.Benchmark | ||
|
||
[/Script/Engine.RendererSettings] | ||
r.AllowStaticLighting=False | ||
|
||
r.GenerateMeshDistanceFields=True | ||
|
||
r.DynamicGlobalIlluminationMethod=1 | ||
|
||
r.ReflectionMethod=1 | ||
|
||
r.SkinCache.CompileShaders=True | ||
|
||
r.RayTracing=True | ||
|
||
r.Shadow.Virtual.Enable=1 | ||
|
||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True | ||
|
||
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 | ||
|
||
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 | ||
|
||
[/Script/WindowsTargetPlatform.WindowsTargetSettings] | ||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 | ||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 | ||
-D3D12TargetedShaderFormats=PCD3D_SM5 | ||
+D3D12TargetedShaderFormats=PCD3D_SM6 | ||
-D3D11TargetedShaderFormats=PCD3D_SM5 | ||
+D3D11TargetedShaderFormats=PCD3D_SM5 | ||
Compiler=Default | ||
AudioSampleRate=48000 | ||
AudioCallbackBufferFrameSize=1024 | ||
AudioNumBuffersToEnqueue=1 | ||
AudioMaxChannels=0 | ||
AudioNumSourceWorkers=4 | ||
SpatializationPlugin= | ||
SourceDataOverridePlugin= | ||
ReverbPlugin= | ||
OcclusionPlugin= | ||
CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0) | ||
CacheSizeKB=65536 | ||
MaxChunkSizeOverrideKB=0 | ||
bResampleForDevice=False | ||
MaxSampleRate=48000.000000 | ||
HighSampleRate=32000.000000 | ||
MedSampleRate=24000.000000 | ||
LowSampleRate=12000.000000 | ||
MinSampleRate=8000.000000 | ||
CompressionQualityModifier=1.000000 | ||
AutoStreamingThreshold=0.000000 | ||
SoundCueCookQualityIndex=-1 | ||
|
||
[/Script/LinuxTargetPlatform.LinuxTargetSettings] | ||
-TargetedRHIs=SF_VULKAN_SM5 | ||
+TargetedRHIs=SF_VULKAN_SM6 | ||
|
||
[/Script/HardwareTargeting.HardwareTargetingSettings] | ||
TargetedHardwareClass=Desktop | ||
AppliedTargetedHardwareClass=Desktop | ||
DefaultGraphicsPerformance=Maximum | ||
AppliedDefaultGraphicsPerformance=Maximum | ||
|
||
[/Script/WorldPartitionEditor.WorldPartitionEditorSettings] | ||
CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet' | ||
|
||
[/Script/Engine.UserInterfaceSettings] | ||
bAuthorizeAutomaticWidgetVariableCreation=False | ||
FontDPIPreset=Standard | ||
FontDPI=72 | ||
|
||
[/Script/Engine.Engine] | ||
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/EcsactBenchmark") | ||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/EcsactBenchmark") | ||
|
||
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] | ||
bEnablePlugin=True | ||
bAllowNetworkConnection=True | ||
SecurityToken=636BE87843D087D62604C5917E6F5CA0 | ||
bIncludeInShipping=False | ||
bAllowExternalStartInShipping=False | ||
bCompileAFSProject=False | ||
bUseCompression=False | ||
bLogFiles=False | ||
bReportStats=False | ||
ConnectionType=USBOnly | ||
bUseManualIPAddress=False | ||
ManualIPAddress= | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
[/Script/EngineSettings.GeneralProjectSettings] | ||
ProjectID=96F09A7E4BCF19A5F9C692A8E6975C7C |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be removed