This is a modification of the demo from pingod-addons. This is to demonstrate how to make basic game with more switches, modes from the initial addons repoistory as starter.
This requires the addons
directory from pingod--addons
to build and run.
-
Load project with godot editor
godot -e
. Inside the Godot FileSytem browse tobasicgame
-
MainScene.tscn
will be loaded on game launch -
Adding coins with key
5
and start with1
. You need to fill the ball trough, close game withESC
-
Use the Godot FileSystem and in the
autoload
directory openWindowActions.tscn
. Turn on the switch window to show a switch UI when you launch the game again. Fill the trough and start a game. You can enable all the trough switches with one button, release a switch and drain balls to finish a game.
Autoload scene folder files can override the enabled addon plugins scene it uses.
Scene | Changes |
---|---|
Machine.tscn | Added more switches |
Resources.tscn | Added ball save scene to pre load |
WindowActions.tscn | To enable/disable switch window without touching addons scenes |
PinGodGame.tscn | Uses a custom PinGodGame.cs script named CustomPinGodGame.cs to demonstrate overriding methods, creating custom players. |
This is a copy of the MainScene
from the addons. It reuses the script MainScene.cs
with no changes as this just handles mostly adding the Game, Attract, Service scenes
In the godot scene inspector we added the path to our custom basicgame/Game.tscn
in the scenes Game Scene Path
.
This will load our game scene instead of the default.
This is a copy of the Game.tscn
from the addons.
This scene uses a custom class scripts/BasicGame.cs
instead of the default Game.cs
.
In the Modes
CanvasLayer we have added the scenes/BasicMode.tscn
scene.
This mode handles displaying a BallSave
scene when ball saved, handles the other switches to add points and the saucer to trigger a multiball.
A Saucer
from the controls is added to this scene tree which starts the multiball
.
As in the pingod-addons
demo it is loaded the same way.