How to use continuous preview

Favourite 61 favourites
Tutorial written by AshleyOriginally published on 9th, April 2013 - 5 revisions

Continuous preview is a feature in Construct 2 that allows you to preserve the gameplay state when previewing. This also makes it possible to design levels as you play through them. Normally pressing Preview will restart the layout or project from the beginning. Continuous preview allows you to make a change then apply that update to the currently previewing game without resetting it.

Here's a quick video by Tom demoing the feature:

How to do a continuous preview

Just hold Shift while clicking Preview or pressing the keyboard shortcut (F4 or F5). When the browser opens for previewing, the URL will end in ?continuous to indicate a continuous preview, e.g. http://localhost:50000/?continuous.

If you press the browser refresh button while ?continuous is in the URL, you'll reset it to where you were the last time you pressed Shift+Preview.

If you don't hold shift and preview again, you'll get a normal preview (resetting to the start) and the ?continuous part of the URL in the browser window will disappear.

How continuous preview works

A normal preview just reloads your game, which resets it. However a continuous preview first saves the game, then reloads it to use your new events and other project changes, then loads the game again. This happens quickly, so the impression is an update while continuing to play the game.

Note this means your first preview can't be continuous - there's nothing saved yet. Your first preview will always be a normal one from the start (even if you try to continuously preview),

Using continuous preview effectively

Continuous preview loads the previously saved game, and this means there are a couple of limitations on what it can do. If you change your events then continuously preview, everything should work fine - the game will carry on from where you left off with the new events in effect. However if you add some new scenery or backgrounds, those will not appear in a continuous preview unless you give them the No Save behavior.

The reason for this is after a continuous preview, the 'Load game' phase will simply restore all objects exactly as they were when the save happened. If the objects weren't there when it was saved, they still won't be there after it loads. Adding the No Save behavior gets around this; they are neither saved, nor affected by loading. This is only suitable for static objects like scenery and backgrounds. If you add 'No Save' to the enemies or powerups in your game, they also won't be loaded and so will reset even when you continuously preview. On the other hand, we want scenery and backgrounds to reset, since it's then possible to edit them live while playing the game.

So a limitation of continuous preview is that currently it doesn't allow you to change objects that are saved in the editor, unless you do a normal preview again which resets everything. It does still allow you to design levels as you play them, though.

It's good practice to add No Save to static objects anyway - it helps make the savegames smaller, and save and load more quickly.

The Pause on unfocus project property is also useful with continuous preview. Setting it to Yes will cause the game to pause when you switch focus back to the Construct 2 editor. This prevents your player dying, running out of time, etc. while you make changes in the editor, so you can continuously preview from a sensible point.

Unlock your full gamedev potential

Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!

View deals

Plus, it's got a lot of additional features that will help you save time and make more impressive games!

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.

Comments

4
Kuso 4,813 rep

Great feature! Really useful to donĀ“t waste time starting the layouts to test thousan of times.

Tuesday, April 09, 2013 at 5:13:55 PM
5
TELLES0808 22.0k rep

Awesome explanation! The feature is amazing while doing a stage and watching it gain life while previewing, also, giving the opportunity of small changes to make the course flawless.

Tuesday, April 09, 2013 at 5:30:45 PM
4
robbym 5,103 rep

Thanks very useful now I save time and can do other stuff..(hmm what to do with all this free time :D)

Tuesday, April 09, 2013 at 7:32:50 PM
2
AngelSilverwings 3,013 rep

very useful. Thanks

Tuesday, April 09, 2013 at 8:22:15 PM
2
Jodee 2,594 rep

Already using it, thanks!

Tuesday, April 09, 2013 at 10:06:51 PM
2
Rudi 5,627 rep

nice very usefull

Wednesday, April 10, 2013 at 4:31:52 AM
2
PVApps 1,587 rep

Very useful! I know many people that don't give much attention to minimal details as they play through their level, leaving to fix it later and then the bug ends up forgotten x_x They don't have any excuse anymore!

Thursday, May 02, 2013 at 8:51:27 PM
1
siks 8,755 rep

Great addition! I always wondered when you'd add it to C2.

Monday, May 06, 2013 at 9:21:03 PM
1
Daggio 5,326 rep

this is a very useful update!

Saturday, July 13, 2013 at 5:50:20 PM
1
farnsu 1,759 rep

holding shift seems 2 do a lot for c2 buttons...

Friday, September 20, 2013 at 7:07:13 PM
1
mumu64 5,531 rep

Great feature and good explanation, especially the "how to use effectively"-part.

Thursday, April 24, 2014 at 1:36:34 PM
1
KuriKuri 613 rep

Really Usefull!XD

Sunday, June 01, 2014 at 4:13:02 AM
0
yme 2,037 rep

Good stuff, Thanks.

Saturday, April 15, 2017 at 7:22:55 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.