Any tips for working on large projects?

Not favoritedFavorited Favorited 0 favourites
From the Asset Store
_______ Huge collection of metal fixtures ________
  • citron2010 alastair gave a good explanation of why people use a global sprite for storing variables. There's also an addon for that purpose.

    As for JSON, I use it to store values that are needed rarely. For example, I might add a key like 'MenuNotificationShown' to JSON. There's no point in creating a separate variable for this since I only access it once in the project.

    It's also easy to save all these values at once in Local Storage - just use Sprite.AsJSON and JSON.ToCompactString

  • The camera does not use asynchronous events, we run Tween, it changes the zoom variable, which is also affected by other actors.

    In my particular case, the camera is complicated by the fact that one layout can have several separated locations with cameras and they are logically limited by additional variables. This makes the work somewhat inconvenient, but sometimes it is useful. For example, if you need to quickly teleport through a maze of mini-locations.

  • > For cutscenes and game events I ended up writing a camera with 23 active parameters - zoom and movement via tween or lerp with various curves, optional input blocking and types of hero tracking and forced scrolling. This saves a lot of time now.

    envoys: Can you describe your cutscene camera a little bit? The story I want to tell is pretty visual with lots of "sight gags". I can't afford to pay for all that animation so I'm thinking about using static comic panels and the timeline editor to scroll and zoom as needed. (Maybe with some limited animations here and there.)

    Sorry for the delay, description above.

    For scrolling and zooming comic panels, I think a tween camera would also work.

  • Thanks for the reply, envoys!

    I'm a longtime Construct user, but basically a 63 year old idiot. ;-) So I'm confused about what you mean by a "camera". I assume we are talking 2D and not 3D, right?

    Is your "camera" a block of code (or function) that controls the viewport?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I call it a camera because I use a 2.5D perspective with a variable angle to the horizon. But it's just zoom and scroll.

    Create a global variable zoomLayout (for example) and every tick use the Set scroll layout system action. Assign it the value of your zoomLayot variable. Now the scaling is equal to your variable and you can conditionally use Set scroll layout clamp(zoomLayout, minZoom, maxZoom) to limit the zoom as you wish to the minZoom and maxZoom variables.

    Next, create a Camera sprite with the Tween behavior, use Tween(Value) to change the value of the zoomLayout variable with clamp. Voila, you have a camera for cutscenes based on system expressions and behavior. The Sinusoidal curve will give a natural softness of the start and stop, and the Elastic - the shaking of an important event.

    To use custom scrolling, you should not have objects with the Scroll To behavior (there are tutorials on how to do this via Lerp). Roughly speaking, the camera sprite is followed by the vievport system action Scroll to position. And the camera follows the hero via lerp buffering. For zoom, lerp can be disabled and Camera Tween X, Y can be used to move the camera.

    I remember in C2 there was a plugin called "Magic camera". C3 allows you to reproduce this plugin with more pleasant camera movement using built-in tools.

    Controller restrictions are needed if you zoom with the mouse wheel (for example), and scroll after the cursor or the hero.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)