Skip to content

Commit

Permalink
Fix missing MPFWindow extension, cleanup command prompt examples
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Apr 24, 2024
1 parent 570735b commit 29704e7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 27 deletions.
Binary file added docs/gmc/images/editor-settings-indentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 10 additions & 8 deletions docs/gmc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ Because the GMC is not yet released, pre-built binaries are not available and mu
First, clone the main MPF repository to your computer and then check out the 0.80 development branch.

``` console
(mpf080) ~/git %-$ git clone https://github.com/missionpinball/mpf.git
(mpf080) ~/git %-$ cd mpf
(mpf080) ~/git/mpf %-$ git checkout 0.80.x
(mpf080) ~/git $> git clone https://github.com/missionpinball/mpf.git
(mpf080) ~/git $> cd mpf
(mpf080) ~/git/mpf $> git checkout 0.80.x
```

With the MPF source code on your machine, you can then use pip to install MPF. Unlike a normal pip installation, the `-e` flag instructs pip to run MPF directly from the source code rather than using a pre-compiled version. The period after the `-e` tells pip to install the package in the current folder.
With the MPF source code on your machine, you can then use pip to install MPF. Unlike a normal pip installation, the `-e` flag instructs pip to run MPF directly from the source code rather than using a pre-compiled version. The period after the `-e` tells pip to install the package found in the current folder.

``` console
(mpf080) ~/git/mpf %-$ pip install -e .
(mpf080) ~/git/mpf $> pip install -e .
```

After MPF is installed, return back up to your main git folder and clone the GMC repository.

``` console
(mpf080) ~/git %-$ git clone https://github.com/missionpinball/mpf-gmc.git
(mpf080) ~/git $> git clone https://github.com/missionpinball/mpf-gmc.git
```

## Download Godot 4
Expand All @@ -48,7 +48,7 @@ The Godot Media Controller is, of course, built on the Godot game engine. Visit

After Godot is installed, open the editor and create a New Project. Select your MPF game project folder as the project path, and choose an appropriate render engine.

For most pinball games, *Mobile* rendering is the recommended balance between performance and featureset. If you plan to do advanced 3D graphics and complex rendering, choose *Forward+*. If you want to optimize your game to run on very low-powered hardware with limited rendering features, choose *Compatibility*.
For most pinball games, *Mobile* rendering is the recommended balance between performance and featureset. If you plan to do advanced 3D graphics and complex rendering, choose *Forward+*. If you want to optimize your game to run on very low-powered hardware with limited rendering features, choose *Compatibility*. Note that you can change this setting at any time, so don't stress about it :)

!!! note "Root project vs GMC subfolder"

Expand All @@ -69,6 +69,8 @@ From the *Editor* menu select *Editor Settings > Text Editor > Behavior*.
* In the *Indent* section change `Tabs` to `Spaces`.
* In the *Files* section de-select the `Convert Indent on Save` option.

![image](images/editor-settings-indentation.png)

### Other Good Things

Also in the *Editor Settings > Text Editor > Behavior* menu:
Expand All @@ -86,7 +88,7 @@ In your game project folder, create a new folder called *addons*. Then create a
The syntax is `sudo ln -s <path to GMC repository/addons/mpf-gmc> <path to project folder/addons/mpf-gmc>`, and will look something like this:

``` console
(mpf080) %-$ sudo ln -s /Users/tommy/git/mpf-gmc/addons/mpf-gmc /Users/tommy/pinballgame/addons/mpf-gmc
(mpf080) $> sudo ln -s /Users/tommy/git/mpf-gmc/addons/mpf-gmc /Users/tommy/pinballgame/addons/mpf-gmc
```

When successful, you should see a new *mpf-gmc* folder in the *addons* folder you just created.
Expand Down
19 changes: 0 additions & 19 deletions docs/gmc/reference/mpf-window

This file was deleted.

34 changes: 34 additions & 0 deletions docs/gmc/reference/mpf-window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: MPFWindow
---

# MPFWindow

`MPFWindow` is a Godot Node class provided by the MPF-GMC extension. The entry scene of the GMC project must derive from the `MPFWindow` class.

## Node Configuration

The root instance of `MPFWindow` is expected to have at least one child node of type `MPFDisplay`, where slides and widgets will be targeted. If multiple displays are provided and none are explicitly set to `is_default`, then the first child will be default.

## Parameters

The `MPFWindow` class does not take any parameters. The overall window dimensions should be configured in the *Project > Project Settings > Display > Window > Size* menu.

## Methods

`MPFWindow` does not have any public methods.


## Multiple Displays

For multiple displays, you'll want to create your own scene with an `MPFWindow` node as the root element, and set the window size to the maximum bounding box of all displays.

Then create an `MPFDisplay` child for each display you want, and give them the appropriate size and position for where they will appear relative to each other.

To get the displays to appear on the correct monitors, you'll want to lock the top-left corner of the Window scene to the top-left corner of the first (primary) monitor. Use the menu *Project > Project Settings > Display > Window > Size* and change the *Initial Position Type* to `Absolute`.

You may also need to adjust the window position and fullscreen modes, depending on your operating system.

~~~ note "Multiple Displays Need Your Help"
Theoretically everything exists in Godot and GMC to run multiple displays across multiple monitors, but we need folks with multi-display projects to help test and debug. Please share your experience!

0 comments on commit 29704e7

Please sign in to comment.