Spent all my spare time this weekend on getting the rules engine working. It is now running the code and can change the LEDs, start games, watch balls drain, etc. It is pretty exciting to simulate a whole pinball game…but, it is only simulated. I still don’t have the LED engine running, but that is simple in comparison to the rules engine. The rules engine is using a good number of the standard functions from the macro language which means that many of them have been verified. In a couple months, I will end up running a verification of all the standard functions to make sure that they are working properly.
The ruleset that is currently programmed is the targeted rules for the backpack pinball machine. Here’s a quick picture of the simple layout:
I’m going to update the rules set to include a few more features. The spinner is used to increment a bonus value. If the inlanes are completed the bonus multiplier is incremented. If the all the targets are completed, the bonus multiplier is incremented. If the ball goes in the kickout hole, the bonus is collected. If the inlanes are completed and targets are completed within a 30 second timer, the bonus is held to the next ball.
One interesting fact about running the real ruleset is that the rules get really angry if the ball can’t be found to start the game. It means when running the machine, you must remember the order of pressing the switches. Before pressing the start button, the Ball_In_Play solenoid switch must be closed. When the game is started, deactivate the Ball_In_Play solenoid and activate the Ball_At_Shooter input. The game goes to normal scoring mode when it detects the ball going through one of the inlanes. At that point, the Ball_At_Shooter can be deactivated. To simulate the ball draining, activate the Ball_In_Play solenoid switch.
Next big thing with the Python pinball framework will be to attach the LED engine so that the LEDs can be automatically strobed. After that, sounds need to be added back in to get that fully working. I also haven’t added the scoring back in, except for bonus score for completing the inlanes.
I’m currently adding in Doxygen comments for Python code. I’ve never used Doxygen for documenting Python code, so I’ve had to spend a good amount of time reworking file and function/class headers to make sure the information is presented properly.
Last time to mention Allentown, 2014. Just in case you missed the last post, John and I will be attending Allentown on Saturday (5/3/2014) from opening to mid-afternoon. We will be wearing OPP (Open Pinball Project) T-shirts. The first person that comes up to either John or I and says, “Give me a free T-shirt”, bam, they get one. Thanks again to Joe for doing the artwork.
I will probably be doing another code update this week if you are watching the Google code repository.