Skip to content

Commit

Permalink
Merge pull request #490 from worldpeace-germany/main
Browse files Browse the repository at this point in the history
Showcreator update
  • Loading branch information
toomanybrians authored Oct 24, 2023
2 parents 7e8f4e0 + 1f03ba1 commit dbe7c0c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/game_vars/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Game variables are variables built-in as part of the core MPF code. These variab

Like player and machine variables, you can use the game variables in
your config files and can be particularly useful for conditional
arguments.
arguments. Unlike player and machine variables you cannot define new game variables in your config file.

* [max_players](max_players.md)
* [num_players](num_players.md)
Expand Down
57 changes: 33 additions & 24 deletions docs/tools/showcreator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ title: MPF Showcreator
MPF supports playing [light shows](../shows/index.md) out of files in your config folder. Those are human readable
and can be created by hand. But isn't that a bit cumbersome for larger
shows? Especially, if you want to swipe over all (or most) of your LEDs
this might take days. Luckily, there is a tool for that.
this might take days. Luckily, there are two tools for that.

## A) MPF Showcreator based on playfield layout

The [light show generator for
MPF](https://github.com/missionpinball/showcreator) loads your LED
positions from the [The MPF Monitor](monitor/index.md)
positions from the [MPF Monitor](monitor/index.md)
config and lets you create show for transitions.

Video about showcreator:
Expand Down Expand Up @@ -122,49 +124,52 @@ have several color swipes coming from different directions one after the
other or effects like multiple spotlights moving across the playfield
like a hollywood premiere.

## Running the showcreator on Windows
### Running the showcreator on Windows

1. Checkout or download the
[showcreator](https://github.com/missionpinball/showcreator.git)
repository.
2. Double click on led.exe

## Running the showcreator on Mac x64
### Running the showcreator on Mac x64

1. Checkout or download the
[showcreator](https://github.com/missionpinball/showcreator.git)
repository.
2. Double click on: led mac x64.app (you may not see .app in the name)

## Compiling and running the showcreator on Ubuntu
### Running the showcreator on Linux

Inside a new install folder:
The showcreator is developed with a development language called [Blitzmax](https://de.wikipedia.org/wiki/Blitz_Basic), there is no precompiled
executable for Linux available, so we need to follow the [Blitzmax homepage](https://blitzmax.org/) to set up the development environment to compile an executable.

``` console
# inside a new install folder
apt install linux-libc-dev:i386 libxft2:i386 g++-multilib gcc-multilib libxpm-dev:i386 libxxf86vm-dev:i386 libgl1-mesa-dev:i386 libglu1-mesa-dev:i386
git clone https://github.com/blitz-research/blitzmax.git
cd blitzmax
cd _src_/linux
./install.bat # yes its .bat
cd ../../../ # back to your src folder
As a first step some pre-requisites need to be met, follow these [guidelines](https://blitzmax.org/docs/en/setup/linux/) to install the packages needed. On that page you find
the instructions for some common Linux distros.

git clone https://github.com/missionpinball/showcreator.git
cd showcreator
../blitzmax/bin/bmk makeapp led.bmx
Next you need to download the Blitzmax environment from [here](https://blitzmax.org/downloads/), that is just a compressed folder you need to extract to any location on your computer. Inside that folder you should
see an executable called `MaxIDE`, that is the development IDE you need to start. You could follow this [Hello World Guide](https://blitzmax.org/docs/en/setup/get_started/#hello-world-with-maxide) to verify if the installation
is correct until here, but it is not compulsory to do so.

# run it
./led
Now you need the source code from the showcreator project, you need to clone the complete project


``` console
git clone https://github.com/missionpinball/showcreator.git
```

Afterwards you can run the showcreator using (from within your install
folder):
It is not sufficient just to download the led.bmx source file, though the build will succeed, the execution of the showcreator will fail earlier or later due to missing dependencies. Open the led.bmx source file in the `MaxIDE`. In the MaxIDE in the menu `Program --> Build Options --> Debug Build` you can switch off
the debug build that is not really needed. Now compile (build) the source code by selection `Program --> Build`. When building the first time, it might run some time since Blitzmax needs to compile all kind of
dependencies. After the build is done, you find in the same folder where your source file is located an executable called `led`.

Afterwards you can run the showcreator using (from within your install folder):

``` console
./showcreator/led
./led
```

## Key bindings
Note, that on the console, which might be hidden by the showcreator window, you are being asked for the monitor.yaml file. Enter the file location to load your light data.

### Key bindings

* A - adjust rotation
* S - adjust x scale
Expand All @@ -186,10 +191,14 @@ folder):
end (START or FINISH) +SHIFT adjusts both START AND FINISH
positions

## Dynamic Shows
### Dynamic Shows

The tool is handy to render static shows which will not change during
runtime. If you want to render shows dynamically (using your GPU) you
can also use
[your lights as display in MC](../config_players/display_light_player.md) but that will cost much more resources during runtime than
offline generated shows.

## B) MPF light and show creator
Another tool exists to create light shows. It is has a bit different approach and is not based on the monitor.yaml file. Take a look at the tool's [homepage](https://github.com/worldpeace-germany/mpfLightAndShowGenerator)
to see if this approach suites your needs.
3 changes: 2 additions & 1 deletion docs/tutorial/9_start_button.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ add the *playfield_active* tag to all the switches that might be hit by
a ball being loose on the playfield. (So lane switches, ramp switches,
rollovers, standups etc.) You do *not* want to tag ball device switches
with `playfield_active` since if a ball is in a ball device, then it's
not loose on the playfield.
not loose on the playfield. Neither you do *not* want to tag autofire devices
like slingshots or pop bumpers, they are handled automatically by mpf.

At this point we're really, really close! There are a few more quick
things we want to do, then run some checks. But then we're ready to
Expand Down
2 changes: 1 addition & 1 deletion includes/content_footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our _[Beginner's guide to editing the docs](/about/help.md)_.
It's easy! See our _[Beginner's guide to editing the docs](/about/help)_.

??? tip "Page navigation via the keyboard: ++less++ ++greater++"

Expand Down

0 comments on commit dbe7c0c

Please sign in to comment.