Pro Tip: Rapid preview w/o loosing code location

ORBZORBZ Member Posts: 1,304
edited November -1 in Working with GS (Mac)
So apparently the devs at GS thought it would be a good idea to have the preview button take you away from where you are in the code, lock you into a full window preview of your app with no way to see your code while it's running. Then when you press back to have it take you to the top of the actor's code, then force you to wait while the full length of the code is loaded thus forcing you to scroll all the way back down to the bottom of your actor's code block in order to muck around and twiddle with a variable or some logic.

This cycle of edit > preview > back > wait > scroll > wait > scroll > wait > edit > preview > back > etc

is a royal PIA!

The correct solution is for the preview button to open in a NEW WINDOW! But since the devs won't do that (or haven't yet *hint* *hint*) I had to go find an alternative solution:

So the alternative is thus:

Open Terminal on your mac and from the command line type:

open -na GameSalad.app

This will open a second instance of GameSalad, now open your project in the second instance and use the second instance to preview your project. Make changes to your code in the first, then Command+Tab over to the second instance of GS and press File > Revert to Saved. That will load all your changes that you made in the first instance into the second instance. Now you can just press Preview in the second instance WITHOUT LOSING YOUR PLACE IN THE CODE IN THE FIRST INSTANCE!

Saves sooo much time.

This also works for previewing your game on the device, just press the Preview on Device button in the second instance and you will not lose your place in the first instance.

Enjoy :)

ps the way I keep the two instances separate is that my main coding instance's window is fullscreen and my preview instance is in a window. That way they are visually distinct and I don't get confused. It takes some discipline. Also be sure not to save in the wrong instance (it will warn you though if you try to by accident)

Comments

  • expired_012expired_012 Member Posts: 1,802
    Wow thats awesome, such a time saver!
  • RHRH Member Posts: 1,079
    Nice one, it's horribly annoying to have to get back to where I was before every time. Cheers!
  • POMPOM Member Posts: 2,599
    I like the concept , but the Revert to Saved is badly slow in my big project , maybe because it has LOTS of code and scenes , and at the end of the process it takes me back to "Home" .

    Still, its a great idea , i just wish someone from the HQ of GS is seeing this .

    Roy.
  • ORBZORBZ Member Posts: 1,304
    @pom

    it shouldn't matter that you are back at home or not. The idea is that you can then just press preview on the second instance without losing your place in the first.

    Revert to Saved is the same thing as opening a file, so ya, it will only be as fast as opening a big project.
  • AppsRacKAppsRacK Member Posts: 346
    hahaha so funny coz i was just thinking about this last night when im tweaking the elasticity demo for a miniGame in my game. I'm adding rotation and particles that constrain to the rotation and its really pain in the ass that i have to go all the way down after the preview just to find the code. And also most of the time i immediately press the preview button while inside the actor making the preview at the main scene and not the scene your actually working. So i have to press back again twice and then press preview again (theres a lot of loading time in between those press) .

    Nice find ORBZ gonna try this later.

    -drahc
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Great tip Orbz. Imma try this very soon. Have you noticed any slow down business worse than normal with two gamesalads running at the same time?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    what a time saver, much appriciated man
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Nice one. Im making ante of the terminal code now.

    Cheers
Sign In or Register to comment.