better sway, exe customizations + logo

This commit is contained in:
2022-04-23 13:40:22 +03:00
parent 8cc47d1b2f
commit eba26ee7fe
12 changed files with 100 additions and 149 deletions

View File

@@ -1,12 +1,12 @@
{
"ID": "3c7bc3854d42f9b1b0fea9ba0d7fa8e9",
"TypeName": "FlaxEditor.Content.Settings.GameSettings",
"EngineBuild": 6226,
"EngineBuild": 6331,
"Data": {
"ProductName": "Goake",
"CompanyName": "GoaLitiuM",
"CopyrightNotice": "",
"Icon": null,
"Icon": "6f021818450e67e837a0e58e90810706",
"FirstScene": "194e05f445ece24ec5448d886e1334df",
"NoSplashScreen": true,
"SplashScreen": null,
@@ -31,6 +31,7 @@
"XboxScarlettPlatform": null,
"AndroidPlatform": null,
"SwitchPlatform": null,
"PS5Platform": null
"PS5Platform": null,
"MacPlatform": null
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -70,13 +70,13 @@
"Transform": {
"Translation": {
"X": 0.0,
"Y": 411.0,
"Y": 716.0,
"Z": 0.0
}
},
"Control": "FlaxEngine.GUI.Label",
"Data": {
"Text": "eFPS: 60 uTime: 2.1192164\nuFPS: 60 uTime: 0.00833330024033785\nrFPS: 60 rTime: 0\npFPS: 30 pTime: 0",
"Text": "eFPS: 119 uTime: 41.0757171\nuFPS: 120 uTime: 0\nrFPS: 120 rTime: 0\npFPS: 30 pTime: 0",
"TextColor": {
"R": 1.0,
"G": 1.0,
@@ -123,7 +123,7 @@
},
"Offsets": {
"Left": 0.0,
"Right": 247.999985,
"Right": 168.0,
"Top": -97.0,
"Bottom": 64.0
},
@@ -157,137 +157,6 @@
"ParentID": "ff6b6db54b5aa08e7286ef86246149ef",
"Name": "UIControl"
},
{
"ID": "bd1e2ea8425a68342d01f4975e4cdf3e",
"TypeName": "FlaxEngine.UIControl",
"ParentID": "ff6b6db54b5aa08e7286ef86246149ef",
"Name": "ContainerControl 0",
"Transform": {
"Translation": {
"X": 44996.0,
"Y": -152.0,
"Z": 0.0
}
},
"Control": "FlaxEngine.GUI.ContainerControl",
"Data": {
"ClipChildren": true,
"CullChildren": true,
"AnchorMin": {
"X": 1.0,
"Y": 0.5
},
"AnchorMax": {
"X": 1.0,
"Y": 0.5
},
"Offsets": {
"Left": 44188.0,
"Right": 100.0,
"Top": -406.0,
"Bottom": 30.0
},
"Scale": {
"X": 1.0,
"Y": 1.0
},
"Pivot": {
"X": 0.5,
"Y": 0.5
},
"Shear": {
"X": 0.0,
"Y": 0.0
},
"Rotation": 0.0,
"BackgroundColor": {
"R": 0.0,
"G": 0.0,
"B": 0.0,
"A": 0.0
},
"Enabled": true,
"Visible": true,
"AutoFocus": true
}
},
{
"ID": "66e0b6e04e4e6fb2a588e7b0bdbfb438",
"TypeName": "FlaxEngine.UIControl",
"ParentID": "ff6b6db54b5aa08e7286ef86246149ef",
"IsActive": false,
"Name": "CameraImage",
"Control": "FlaxEngine.GUI.Image",
"Data": {
"Brush": {
"$type": "FlaxEngine.GUI.MaterialBrush, FlaxEngine.CSharp",
"Material": null
},
"Margin": {
"Left": 0.0,
"Right": 0.0,
"Top": 0.0,
"Bottom": 0.0
},
"Color": {
"R": 1.0,
"G": 1.0,
"B": 1.0,
"A": 1.0
},
"MouseOverColor": {
"R": 1.0,
"G": 1.0,
"B": 1.0,
"A": 1.0
},
"DisabledTint": {
"R": 0.5019608,
"G": 0.5019608,
"B": 0.5019608,
"A": 1.0
},
"KeepAspectRatio": false,
"ClipChildren": true,
"CullChildren": true,
"AnchorMin": {
"X": 0.0,
"Y": 0.0
},
"AnchorMax": {
"X": 1.0,
"Y": 1.0
},
"Offsets": {
"Left": 0.0,
"Right": 0.0,
"Top": 0.0,
"Bottom": 0.0
},
"Scale": {
"X": 1.0,
"Y": 1.0
},
"Pivot": {
"X": 0.5,
"Y": 0.5
},
"Shear": {
"X": 0.0,
"Y": 0.0
},
"Rotation": 0.0,
"BackgroundColor": {
"R": 0.0,
"G": 0.0,
"B": 0.0,
"A": 0.0
},
"Enabled": true,
"Visible": true,
"AutoFocus": false
}
},
{
"ID": "9b0c532d4247061970c809a0af58c82a",
"TypeName": "FlaxEngine.PostFxVolume",
@@ -421,7 +290,9 @@
"PrefabID": "82e58c9d462fba5a0df1a599417ff684",
"PrefabObjectID": "195f796349961ef9a9d46a8657fc693b",
"ParentID": "f3b9d1594b1f2fc5b793adb5f144ab46",
"V": {}
"V": {
"swaySpeed": 1990.0
}
},
{
"ID": "d267a9954013a72391bd3a921d214639",

View File

@@ -1,7 +1,7 @@
{
"ID": "4a5eec97484253fed72934860ae62c40",
"TypeName": "FlaxEditor.Content.Settings.WindowsPlatformSettings",
"EngineBuild": 6226,
"EngineBuild": 6331,
"Data": {
"WindowMode": 0,
"ScreenWidth": 1280,
@@ -9,6 +9,7 @@
"ResizableWindow": true,
"RunInBackground": true,
"ForceSingleInstance": false,
"OverrideIcon": null,
"SupportDX12": true,
"SupportDX11": true,
"SupportDX10": false,

Binary file not shown.

View File

@@ -13,7 +13,7 @@ public class Game : GameModule
// C#-only scripting
BuildCSharp = true;
BuildNativeCode = false;
BuildNativeCode = true;
}
/// <inheritdoc />
@@ -25,7 +25,6 @@ public class Game : GameModule
options.PublicDependencies.Add("FidelityFXFSR");
base.Setup(options);
// Here you can modify the build options for your game module

View File

@@ -195,7 +195,43 @@ namespace Game
//easeInQuad
Quaternion rotation = GetRotation();
Actor.LocalOrientation = Quaternion.Lerp(Actor.LocalOrientation, rotation, Math.Min(1.0f, easeInCubic(swaySpeed * Time.DeltaTime)));
Vector3 targetAngles = rotation.EulerAngles;
Vector3 angles = Actor.LocalOrientation.EulerAngles;
float swaySpeedScaled = swaySpeed * Time.DeltaTime;
const float maxAngle = 30f;
float deltaX = Mathf.DeltaAngle(angles.X, targetAngles.X);
float deltaY = Mathf.DeltaAngle(angles.Y, targetAngles.Y);
float deltaZ = Mathf.DeltaAngle(angles.Z, targetAngles.Z);
if (deltaX > maxAngle)
angles.X -= maxAngle - deltaX;
else if (deltaX < -maxAngle)
angles.X += maxAngle + deltaX;
if (deltaY > maxAngle)
angles.Y -= maxAngle - deltaY;
else if (deltaY < -maxAngle)
angles.Y += maxAngle + deltaY;
if (deltaZ > maxAngle)
angles.Z -= maxAngle - deltaZ;
else if (deltaZ < -maxAngle)
angles.Z += maxAngle + deltaZ;
float percX = Mathf.Abs(deltaX) / maxAngle;
float percY = Mathf.Abs(deltaY) / maxAngle;
float percZ = Mathf.Abs(deltaZ) / maxAngle;
float minSpeed = swaySpeedScaled * 0.00001f;
Func<float, float> fun = (f) => f*f;
angles.X = Mathf.MoveTowardsAngle(angles.X, targetAngles.X, Math.Max(swaySpeedScaled*fun(percX), minSpeed));
angles.Y = Mathf.MoveTowardsAngle(angles.Y, targetAngles.Y, Math.Max(swaySpeedScaled*fun(percY), minSpeed));
angles.Z = Mathf.MoveTowardsAngle(angles.Z, targetAngles.Z, Math.Max(swaySpeedScaled*fun(percZ), minSpeed));
//Actor.LocalOrientation = Quaternion.Lerp(Actor.LocalOrientation, rotation, Math.Min(1.0f, easeInCubic(swaySpeed * (1.0f/120f))));
Actor.LocalOrientation = Quaternion.Euler(angles);
}
}
}

View File

@@ -7,15 +7,22 @@ public class GameTarget : GameProjectTarget
{
base.Init();
//OutputName = "Goake";
// Reference the modules for game
Modules.Add("Game");
Modules.Add("FidelityFXFSR");
//Modules.Add("Cabrito");
OutputName = "Goake";
Win32ResourceFile = @"C:\dev\GoakeFlax\Source\goake.rc";
IsPreBuilt = false;
Architectures = new TargetArchitecture[] { TargetArchitecture.x64 };
Platforms = new TargetPlatform[] { TargetPlatform.Windows };
LinkType = TargetLinkType.Monolithic;
if (LinkType == TargetLinkType.Monolithic)
{
Modules.Add("Main");
OutputType = TargetOutputType.Executable;
}
Modules.Add("Game");
Modules.Add("FidelityFXFSR");
}
}

36
Source/Goake.rc Normal file
View File

@@ -0,0 +1,36 @@
#include "Game.Gen.h"
#include "resource.h"
IDR_MAINFRAME ICON "Icon.ico"
1 VERSIONINFO
FILEVERSION GAME_VERSION_MAJOR,GAME_VERSION_MINOR,GAME_VERSION_BUILD
PRODUCTVERSION GAME_VERSION_MAJOR,GAME_VERSION_MINOR,GAME_VERSION_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040004b0"
BEGIN
VALUE "CompanyName", GAME_COMPANY
VALUE "FileDescription", GAME_NAME
VALUE "FileVersion", GAME_VERSION_TEXT
VALUE "InternalName", GAME_NAME
VALUE "LegalCopyright", GAME_COPYRIGHT
VALUE "ProductName", GAME_NAME
VALUE "ProductVersion", GAME_VERSION_TEXT
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x400, 1200
END
END