Closed freezy closed 2 years ago
Merging #339 (fd587fa) into master (f2e1a8c) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #339 +/- ##
=======================================
Coverage 83.90% 83.90%
=======================================
Files 125 125
Lines 6734 6734
=======================================
Hits 5650 5650
Misses 1084 1084
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f6cc3fe...fd587fa. Read the comment docs.
PinMAME offers mech simulation, i.e. it can drive a motor for you and toggle switches if necessary. Most of the time I've spent on this PR went actually into figuring out how it works exactly and documenting it.
The general idea is to make it easy for creators to use PinMAME's mech sim if desired, but be able to easily swap it out by a custom component if necessary. We'll provide such components at some point, right now the only one is called
StepRotatorMechComponent
and just does linear movement for a defined length.If you actually want to use this (our use case is the T2 cannon), you would use three components:
Each component could be swapped by another one, giving you "bricks" to adapt to your game logic. It's currently pretty basic, but it's a good foundation for more complex setups. In the future we could support node graphs where you could basically do whatever you need to compute, graphically.
By the way I did plot how the cannon of T2 moves. Looks like a sine function, which we could reproduce quite easily, but that's for another PR.
Finally, here the T2 gun, simulated by PinMAME, in action:
https://user-images.githubusercontent.com/70426/140429006-9aaa1c92-5d71-4455-ae51-14818eb08f86.mp4
This PR also requires VisualPinball/VisualPinball.Engine.PinMAME#15, where the actual component is implemented.