Compilation of questions(camera, animation and screens)

This forum is currently in read-only mode.
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hello, I have adopted construct classic for a game development project with a friend, but there are a few things I have encountered with it what I am not able to implement a entirely clear fix for.

    I got into this project with some experience of coding already, having used c, c++ and other programming languages so far for the sake of speed I have avoided trying to write any native plugins, but I have gotten my self caught up on a few snags:

    The first is somewhat of simple issue but an approach I am not entirely certain about the approach for :

    I have been asked to implement a camera with zoom support:

    I have managed to set the camera zoom via "system - Set Zoom"

    Now this works, as long as I enable unbounded scrolling on the layout, the trouble occurs when I enable it

    The camera cuts off the bottom of the layout and part of its left side.

    Now i can manually make the camera track the player via an event sheet using system - scroll to x/y and using the players location.

    But how is the best way to make this type of camera keep within the layout bounds this needs to work for if a scene needs a zoom out and zoom in effect also.

    The second is animation related, from what I can see I cannot ask a sprite how quickly it is moving, for example how do I make a sprite do a skid animation when they have been running for a while(built up momentum)

    The third is somewhat of a weird situation that has occurred, seemingly related to screen transitions and offscreen layout switches

    The bug occurs in the non test setup when the screen has a fade transition and the following event sheet is setup for the layout:

    player is outside layout:
    (inverted)if Y less than 0 
    (inverted)if Y greater than LayoutHeight
    (inverted)if X greater than LayoutWidth
    if X less than 0
    
    with the action
    Goto layout # with transition "fade" lasting 10ms
    [/code:2l3rdk87]
    
    That is from the test where it works, on the one where it is bugged the fade time is different i currently do not have the project for the exact number but if needed i can obtain it.
  • For your scrolling problems - use MagiCam plugin and all your problems are gone. It have zoom feature and - quite nice and bit more naturally - lag feature.

    For animation - you can control it via private variable of object. Set always -> animation speed -> private variable. Then you can control it. If player move -> every 10 ms -> Add 1 to private variable. Something like this.

    As far I know - using transitions its not good at all. I always have problems with them. And for "go for layout when" is better to use something simpler, like "when player collision box" (use box, box object is always good) -> trigger once -> go for layout.

    Sorry for poor english.

  • Thank you for your response so far, I have found the information very helpful, Still trying to get the camera to default its zoom at 200%, but you have put me on the right track with other elements.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This might help ??

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