• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX Disposable GMS 2.x Projects in Mac OS X

FrostyCat

Redemption Seeker
Do you miss legacy GM's ability to try out small snippets without committing to a full project? With a little shell scripting and the Mac OS X automator, this is relatively easy to bring back.


Step 1: The Shell Script
Create a directory named GMScratch in your home directory and create a file named gmscratch.command in it. Then paste the following code into gmscratch.command:
Code:
#!/bin/bash

# Configure the temporary project directory
scratchdir=`mktemp -d`

# Copy the scratchpad project and open it
cp -Rf "`dirname $0`/scratchpad" "$scratchdir"
open -W "$scratchdir/scratchpad/scratchpad.yyp"

# When GMS 2 closes, remove the copied scratchpad project directory
rm -Rf "$scratchdir"
Step 2: The Template
Create an empty project named scratchpad and save its whole project directory in ~/GMScratch. You may include libraries and other resources that you use often, so that you don't have to re-import them later.

Step 3: The Automator Shortcut
This enables the command file to execute without a visible window.
  • Open Automator.
  • Under "Choose a type for your document", choose "Application".
  • Find and drag in the action "Run Shell Script". Enter the following code:
Code:
/bin/bash ~/GMScratch/gmscratch.command
  • Save the result in ~/GMScratch as GMS 2 Scratchpad.
You may optionally change the icon of the app if you wish.


This is what your ~/GMScratch directory should look like once you're done:
Screen Shot 2018-02-18 at 8.49.48 PM.png

Then simply pin the automator app on your dock. Click and experiment away!
 
Top