Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
a173639
project: Update DOTS dependency to 1.0.
freezy Jan 6, 2023
0272755
dots: Fix system access.
freezy Jan 6, 2023
2c91712
dots: Add flipper baker.
freezy Jan 6, 2023
e35a625
dots: Add bumper baker
freezy Jan 6, 2023
9898808
dots: Add gate baker.
freezy Jan 6, 2023
6f3cd3e
dots: Add hit target bakers.
freezy Jan 6, 2023
a2c2f4e
dots: Add kicker baker.
freezy Jan 6, 2023
2a25c3c
dots: Add bakers for metal wire guides.
freezy Jan 6, 2023
8e2b3df
dots: Add plunger baker.
freezy Jan 6, 2023
3f96a9a
dots: Add bakers for primitives and ramps.
freezy Jan 7, 2023
c6f3c00
dots: Add rubber baker.
freezy Jan 7, 2023
37a8136
dots: Add bakers for spinner and surface.
freezy Jan 7, 2023
2f7ea69
dots: Add baker for trigger.
freezy Jan 7, 2023
0131aa7
dots: Fix item systems.
freezy Jan 7, 2023
b0e3126
dots: IDE is green now.
freezy Jan 7, 2023
8f21f53
project: Fix entities version number.
freezy Jan 8, 2023
e111f65
dots: Rename VisualPinball.Unity to VisualPinballUnity for system cla…
freezy Jan 8, 2023
103a5b8
dots: Add subscene when importing VPX.
freezy Jan 9, 2023
6fd6c76
dots: Subscene import works, with errors.
freezy Jan 10, 2023
588b747
dots: Remove ConvertToEntity from prefabs.
freezy Jan 15, 2023
a287cb5
import: Don't unpack prefabs.
freezy Jan 19, 2023
f72bd71
dots: Don't try to auto-create subscene.
freezy Jan 20, 2023
7ac2335
dots: Don't add component when baking flipper.
freezy Jan 21, 2023
176e365
dots: Disable all systems.
freezy Jan 23, 2023
883bb70
fix: Confused imports.
freezy Jan 24, 2023
565ba31
dots: Fix camera orbit when in different scene.
freezy Jan 24, 2023
6feda46
dots: Remove disposal
freezy Jan 25, 2023
c7bebd2
dots: Temporarily disable DOTS in physics engine.
freezy Jan 26, 2023
125715c
jobs: Create main physics loop.
freezy Jan 28, 2023
5ec98bc
jobs: Move state into struct.
freezy Jan 28, 2023
77eda95
jobs: Create colliders and use bartofzo/NativeTrees for octree.
freezy Feb 1, 2023
2f3c3ba
jobs: Set up inner loop.
freezy Feb 5, 2023
bd69c0b
jobs: Replace entities with IDs, and add static narrow phase.
freezy Feb 11, 2023
8f8ab46
jobs: Add static counts.
freezy Feb 12, 2023
34d9e64
jobs: Add ball displacement.
freezy Feb 17, 2023
d340204
jobs: Add static collision.
freezy Feb 18, 2023
2c285c7
jobs: Add contact handling.
freezy Feb 19, 2023
3fb3e4a
jobs: Add ball movement physics.
freezy Feb 24, 2023
d4c10f7
jobs: Update ball velocities.
freezy Feb 25, 2023
6f3e958
fix: Init hit time to -1.
freezy Mar 11, 2023
14a903d
fix: Don't use extension methods on structs.
freezy Mar 11, 2023
bf1197f
jobs: Fix collision event.
freezy Mar 17, 2023
64f86c2
jobs: Replace PlaneCollider with Collider.
freezy Mar 21, 2023
021cdd8
jobs: Reuse colliders in blob and make all methods static.
freezy Mar 21, 2023
f83c012
jobs: Non-static was actually fine.
freezy Mar 24, 2023
34d7e8a
jobs: Do collider generation through previous interface.
freezy Mar 26, 2023
e72c33a
jobs: Convert playfield mesh to VPX space.
freezy Mar 30, 2023
25cdde2
jobs: Add line collider.
freezy Sep 29, 2023
3ae194e
jobs: Fix collision loop.
freezy Sep 30, 2023
d22ac83
jobs: Minor refactor.
freezy Sep 30, 2023
221ce1e
jobs: Add collision for primitives (triangle, line3d, point).
freezy Oct 1, 2023
fee124b
jobs: Add flipper collision.
freezy Oct 1, 2023
e75b787
jobs: Okay, the flipper is moving, but the data is still disgusting.
freezy Oct 2, 2023
11a66bc
jobs: Pack physics state into a single struct once in the job.
freezy Oct 2, 2023
0f419f1
jobs: Pass whole state to input actions.
freezy Oct 2, 2023
8a99708
jobs: Modify flipper state directly instead of a copy.
freezy Oct 3, 2023
fbebd99
jobs: Use ball references instead of copies.
freezy Oct 3, 2023
130cf04
jobs: Add profile markers.
freezy Oct 3, 2023
54c058c
jobs: Add bumpers.
freezy Oct 4, 2023
a25ae74
jobs: Minor cleanup.
freezy Oct 4, 2023
c58881d
jobs: Add state data to remaining items.
freezy Oct 4, 2023
a5adfd0
jobs: Add narrow phase to remaining items.
freezy Oct 5, 2023
d3eba6f
jobs: Add collision to remaining items.
freezy Oct 5, 2023
241498b
jobs: Enable colliders for all items.
freezy Oct 5, 2023
04c0847
jobs: Fix size of octree.
freezy Oct 6, 2023
e86fcc8
jobs: Accelerate primitive collider generation 8x by using AcquireRea…
freezy Oct 7, 2023
d66dc72
jobs: Move ColliderRef code into state.
freezy Oct 7, 2023
4e6d780
jobs: Pass struct instead of List<ICollider> to collider generators.
freezy Oct 7, 2023
c942733
jobs: Don't allocate edge sets when creating primitive mesh.
freezy Oct 8, 2023
2e3581a
jobs: Init hashmap with correct capacity.
freezy Oct 8, 2023
299a418
jobs: Add gate displacement.
freezy Oct 8, 2023
8e3b1e8
jobs: Add spinner displacement.
freezy Oct 8, 2023
6dfe252
jobs: Add missing velocity physics.
freezy Oct 8, 2023
727e31b
jobs: Add trigger animation.
freezy Oct 8, 2023
13c6c0b
jobs: Fix InsideOfs and dequeue events.
freezy Oct 8, 2023
d4ce108
jobs: Migrate plunger code.
freezy Oct 9, 2023
273cef4
jobs: Migrate rest of contact system.
freezy Oct 9, 2023
59a304e
jobs: Add ball spin hack.
freezy Oct 9, 2023
505ca3f
jobs: Migrate hit- and drop targets, and clean up some obsolete systems.
freezy Oct 9, 2023
aa01ad8
jobs: Port flipper correction code. Still not triggering though.
freezy Oct 10, 2023
d115446
jobs: Fix flipper correction collider.
freezy Oct 11, 2023
c690b43
jobs: Fix ball creation through ball manager.
freezy Oct 12, 2023
a3391f8
jobs: Fix item API registration.
freezy Oct 12, 2023
c0146a4
jobs: Fix kicker ball creation.
freezy Oct 12, 2023
e2c63d8
jobs: Ditch IPhysicsEngine abstraction.
freezy Oct 13, 2023
4dd2cbd
jobs: Move physics jobs into separate files.
freezy Oct 13, 2023
a7ec793
jobs: Also ditch IDebugUI (we have an editor)
freezy Oct 13, 2023
b4fb8ec
jobs: Ditch remaining bakers.
freezy Oct 13, 2023
4398222
jobs: Add missing registrations.
freezy Oct 13, 2023
cb0e3f6
jobs: Make collision toggelable.
freezy Oct 14, 2023
4e7f651
jobs: Make collider toggle dynamic.
freezy Oct 14, 2023
f8cc5c9
jobs: Bump dependencies and remove remaining systems.
freezy Oct 14, 2023
259acfd
fix: Don't set active table when hierarchy is disabled.
freezy Oct 14, 2023
57e2fec
jobs: Fix physics engine initialization in player.
freezy Oct 14, 2023
00b044d
jobs: Fix plunger
freezy Oct 14, 2023
fbf62ad
jobs: Properly destroy balls.
freezy Oct 14, 2023
0159cfb
jobs: Port remaining API code to new physics.
freezy Oct 14, 2023
aa48175
jobs: Add dynamic broad phase to physics cycle.
freezy Oct 14, 2023
24add16
jobs: Add dynamic narrow phase to physics cycle.
freezy Oct 15, 2023
fae001d
jobs: Add dynamic ball-to-ball collision to physics cycle.
freezy Oct 15, 2023
a60c510
fix: Project building.
freezy Oct 15, 2023
5881aaf
project: Include com.bartofzo.nativetrees dependency.
freezy Oct 15, 2023
6ff201a
ci: Fix test dependencies.
freezy Oct 15, 2023
eaef074
jobs: Add missing apply flippertime.
freezy Oct 15, 2023
ab75cc8
refactor: ball and bumper states.
freezy Oct 15, 2023
9e80406
ci: Fix Unity version during tests.
freezy Oct 15, 2023
afde8fd
ci: request license for newer version of unity
jsm174 Oct 15, 2023
878e063
ci: request license specifically for 2022.3.10f1
jsm174 Oct 15, 2023
56d670f
ci: attempt to use a custom docker image for activation
jsm174 Oct 15, 2023
e0ff36f
refactor: Name all states as such.
freezy Oct 15, 2023
a4781d5
jobs: Fix playfield and physics engine availability in player.
freezy Oct 15, 2023
d931f67
jobs: Fix ball roller.
freezy Oct 15, 2023
7982744
cleanup: Remove components, quadtree, octree and entities where possi…
freezy Oct 15, 2023
ba47b7a
jobs: Fix flipper correction.
freezy Oct 16, 2023
36f5579
editor: Add icon for ball component.
freezy Oct 17, 2023
c6672d8
editor: Add icon for physics engine.
freezy Oct 17, 2023
b6b192d
editor: Add new icons to manager.
freezy Oct 17, 2023
6a4450e
editor: Add physics inspector and make components work on playfield i…
freezy Oct 17, 2023
ca0d44a
import: Add physics engine to hierarchy.
freezy Oct 17, 2023
35e9259
doc: Bump docfx to latest.
freezy Oct 19, 2023
fe6af6b
doc: Add Github link.
freezy Oct 20, 2023
81839bb
doc: Move fonts to separate folder and edit button to affix.
freezy Oct 21, 2023
06766c1
doc: Color left bar and more layout fixes.
freezy Oct 21, 2023
f4cf1f6
doc: Fix MPF links.
freezy Oct 21, 2023
bd28e57
doc: Add landing page art, add Zephyr theme with fixes.
freezy Oct 21, 2023
36a520e
doc: Use latest GitHub docfx generator.
freezy Oct 21, 2023
f1e959c
doc: Use GitHub for zephyr.css and center landing art.
freezy Oct 22, 2023
807cc88
doc: More color and margin fixes.
freezy Oct 22, 2023
9f576f9
doc: Fix code color style.
freezy Oct 22, 2023
441e1ec
doc: Add lightbox.
freezy Oct 22, 2023
a199a31
doc: Fix image classes.
freezy Oct 22, 2023
6e7c506
doc: Fix search icon color on light.
freezy Oct 22, 2023
6db9981
runtime: Properly complain if no physics engine is available.
freezy Oct 22, 2023
b2115d7
trough: Make ball prefab configurable.
freezy Oct 22, 2023
27253fc
jobs: Fix playfield physmat and clean up more unused code.
freezy Oct 23, 2023
42c800b
physics: Fix playfield material.
freezy Oct 23, 2023
9bcdd93
perf: Make lamps fade without GC.
freezy Oct 23, 2023
e40d21a
ci: remove unity version from unity-test-runner
jsm174 Oct 24, 2023
3772961
ci: remove cache and bump setup-dotnet
jsm174 Oct 24, 2023
9c2d4d3
jobs: Don't copy colliders when creating quadtree.
freezy Oct 24, 2023
c63c920
jobs: Pass collision header instead of collider.
freezy Oct 25, 2023
fc2db9a
jobs: Simplify collider reference.
freezy Oct 25, 2023
956a45c
jobs: Set collider ID before allocation.
freezy Oct 25, 2023
d7b9ae7
jobs: Swap BlobAssetReference<ColliderBlob> with NativeColliders.
freezy Oct 25, 2023
9a02e90
debug: Name blob asset extensions like native colliders.
freezy Oct 26, 2023
6a17d34
jobs: Add comparison methods to collider header.
freezy Oct 27, 2023
30f0998
jobs: Simplify native colliders.
freezy Oct 27, 2023
96deea0
refactor: Handle collider ID assignment within collider.
freezy Oct 27, 2023
fd7edf1
jobs: Fix ball fall-through.
freezy Oct 27, 2023
ed6ac3e
project: Disable unit tests.
freezy Oct 27, 2023
263e4d8
project: Disable unit tests (2nd try).
freezy Oct 28, 2023
7fec29a
doc: Update overview.
freezy Oct 28, 2023
0edf84e
doc: Vectorize text on main page logo.
freezy Oct 28, 2023
b043a0c
dots: Finally DOTS-free!
freezy Oct 28, 2023
347b1a0
jobs: Properly dispose physics state.
freezy Oct 28, 2023
def9de2
doc: Update Unity version.
freezy Oct 29, 2023
ef6e14c
fix: A few physics tweaks.
freezy Oct 29, 2023
2d9ceb4
player: Don't instantiate API instances twice.
freezy Oct 29, 2023
1c339a3
kicker: Properly handle new ball.
freezy Oct 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 39 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
rid: android-arm64-v8a
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Build
Expand All @@ -45,47 +45,48 @@ jobs:
name: Plugins
path: tmp

test:
name: Unit Test
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: Plugins
path: VisualPinball.Unity/Plugins
- uses: actions/cache@v3
with:
path: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~/Library
key: Library-Test-Project
restore-keys: |
Library-Test-Project
Library
- uses: game-ci/unity-test-runner@main
id: test
with:
projectPath: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~
artifactsPath: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~/artifacts
testMode: all
customParameters: -debugCodeOptimization -enableCodeCoverage -burst-disable-compilation -coverageOptions enableCyclomaticComplexity;assemblyFilters:+VisualPinball.Engine;pathFilters:-**/VisualPinball.Engine/Math/Triangulator/**,-**/VisualPinball.Engine/Math/Mesh/** -coverageResultsPath artifacts
- run: |
curl -s https://codecov.io/bash | bash -s - -f ${{ steps.test.outputs.artifactsPath }}/TestProject~-opencov/EditMode/TestCoverageResults_0000.xml
- uses: MirrorNG/nunit-reporter@v1.1.0
if: always()
with:
path: ${{ steps.test.outputs.artifactsPath }}/*.xml
access-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results
path: ${{ steps.test.outputs.artifactsPath }}
# test:
# name: Unit Test
# needs: [ build ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/download-artifact@v3
# with:
# name: Plugins
# path: VisualPinball.Unity/Plugins
#- uses: actions/cache@v3
# with:
# path: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~/Library
# key: Library-Test-Project
# restore-keys: |
# Library-Test-Project
# Library
# - uses: game-ci/unity-test-runner@main
# id: test
# with:
# #unityVersion: "2022.3.10f1"
# projectPath: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~
# artifactsPath: VisualPinball.Unity/VisualPinball.Unity.Test/TestProject~/artifacts
# testMode: all
# customParameters: -debugCodeOptimization -enableCodeCoverage -burst-disable-compilation -coverageOptions enableCyclomaticComplexity;assemblyFilters:+VisualPinball.Engine;pathFilters:-**/VisualPinball.Engine/Math/Triangulator/**,-**/VisualPinball.Engine/Math/Mesh/** -coverageResultsPath artifacts
# - run: |
# curl -s https://codecov.io/bash | bash -s - -f ${{ steps.test.outputs.artifactsPath }}/TestProject~-opencov/EditMode/TestCoverageResults_0000.xml
# - uses: MirrorNG/nunit-reporter@v1.1.0
# if: always()
# with:
# path: ${{ steps.test.outputs.artifactsPath }}/*.xml
# access-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Test results
# path: ${{ steps.test.outputs.artifactsPath }}

dispatch:
name: Dispatch
runs-on: ubuntu-latest
needs: [ test ]
needs: [ build ]
if: github.repository == 'freezy/VisualPinball.Engine' && github.ref == 'refs/heads/master'
steps:
- uses: peter-evans/repository-dispatch@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build and publish documentation
steps:
- uses: actions/checkout@v3
- uses: nikeee/docfx-action@v1.0.0
- uses: nunit/docfx-action@v2.4.0
name: Build Documentation
with:
args: VisualPinball.Unity/Documentation~/docfx.json
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
id: license
uses: game-ci/unity-request-activation-file@v2
with:
unityVersion: 2021.3.0f1
unityVersion: 2022.3.10f1
customImage: "unityci/editor:ubuntu-2022.3.10f1-linux-il2cpp-2"
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.license.outputs.filePath }}
Expand Down
67 changes: 0 additions & 67 deletions VisualPinball.Engine.Test/Common/EngineTests.cs

This file was deleted.

4 changes: 3 additions & 1 deletion VisualPinball.Engine/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ public static class PhysicsConstants
public const float DefaultTableMaxSlope = 6.0f; // DEFAULT_TABLE_MAX_SLOPE
public const float DefaultTableGravity = 0.97f; // DEFAULT_TABLE_GRAVITY

public const float GravityConst = 1.81751f; // GRAVITYCONST

/// <summary>
/// trigger/kicker boundary crossing hysterisis
/// </summary>
public const float StaticTime = 0.005f; // STATICTIME
public const float StaticTime = 0.02f; // STATICTIME
public const float StaticCnts = 10f; // STATICCNTS

/// <summary>
Expand Down
13 changes: 8 additions & 5 deletions VisualPinball.Engine/Game/Engines/GamelogicEngineLamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ public class GamelogicEngineLamp : IGamelogicEngineDeviceItem

public GamelogicEngineLamp(string id)
{
Id = id;
_id = id;
}

public GamelogicEngineLamp(int id)
{
Id = id.ToString();
_id = id.ToString();
}
}

Expand All @@ -108,7 +108,7 @@ public enum LampStatus
Blinking = 2,
}

public class LampState
public struct LampState
{
public LampStatus Status {
get => _status;
Expand All @@ -133,11 +133,12 @@ public float Intensity {
public Color Color;

private LampStatus _status;
private LampStatus _lastOnStatus = LampStatus.On;
private LampStatus _lastOnStatus;

public LampState(LampStatus status, Color color)
{
Status = status;
_lastOnStatus = status != LampStatus.Off ? status : LampStatus.On;
_status = status;
Color = color;
}

Expand All @@ -151,12 +152,14 @@ public LampState(float intensity)
_status = LampStatus.On;
Color = new Color(255, 255, 255, (int)(intensity * 255));
}
_lastOnStatus = LampStatus.On;
}

public LampState(Color color)
{
_status = color.A > 0 ? LampStatus.On : LampStatus.Off;
Color = color;
_lastOnStatus = LampStatus.On;
}

public void SetChannel(ColorChannel channel, float value)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions VisualPinball.Unity/Assets/Editor/Icons/small_blue/ball.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading