dop2000's Forum Posts

  • Here are a couple of ideas - if your low height obstacle sprites are relatively small, you can add a 3rd LOS with very narrow angle of sight. Rotate your AI towards the target position, then use this LOS to check for any low height obstacles in that direction. If found - move AI to that obstacle.

    Or you can do it with a loop like this:

    dist=Distance(ai.x, ai.y, target.x, target.y)
    progress=0
    
    While
    dist>=progress
         System Pick LowObstacleSprite overlapping point (lerp(ai.x, target.x, progress/dist) , lerp(ai.y, target.y, progress/dist))
               //  point of collision with LowObstacleSprite found, you can move your AI to it
               Stop loop
         Else
               Add 5 to progress    // 5 is to minimize the number of overlapping checks for better performance. 
    [/code:34sgjorq]
    
    This code basically moves a virtual point from AI to the target, checking if it's overlapping LowObstacleSprite every 5 pixels.
    It should have almost no impact on performance, unless you have lots and lots of AI objects and executing this code for each of them on every tick.
  • Pandy

    Check this post, it may be relevant.

    I posted a few examples there where I perform hundreds of overlapping checks per tick and the impact on performance is quite small. According to Ashley, overlapping checks in C2 are well optimized.

  • Lordshiva1948

    It would be nice if you read posts (not just the title) and other people's comments before answering.

    This post has nothing to do with LAN preview.

  • sean080

    You can do it exactly the same way, only instead of LayoutWidth/2 and LayoutHeight/2 use person.x and person.y

  • "startGame = wallclocktime" should only be executed once on start of the game (level), not on every pressed key.

    This formula is also incorrect:

    speedPerSecond= (totalHits) / (startGame)

    Change it to:

    speedPerSecond= (totalHits) / (wallclocktime-startGame)

  • Here is the easiest way to do it:

  • For Platform or 8-Direction object, disable standard controls.

    Use events like:

    Is key A down - > Player1 Simulate pressing Left

    Is key Left down - > Player2 Simulate pressing Left

    etc.

  • You can add all such sprites to a family.

    Then when you create a family object (using Create or Spawn action) - a random sprite member will be created.

  • It depends on the game.

    If, for example you want players to drag&drop tiles, then use a sprite at first.

    When the player drops the sprite to its location, you can destroy the sprite and modify the appearance of the tile at the TileMap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you can display the speed in real time.

    speedPerSecond= (correctlyTypedCharacters) / (time-gameStartTime)

    speedPerMinute=speedPerSecond*60

    If you want round this number to two decimal places:

    speedPerMinute = round(speedPerMinute * 100) / 100

    I believe PPM refers to "Pages per minute" and it's used to measure performance of printers and photocopiers:)

  • And again you shared a demo instead of the event sheet...

    I modified my example, it now works with all keys except ' and /

    In firefox these keys invoke search function, so I would avoid using them in your game.

    https://www.dropbox.com/s/g06mg3tjulvlq ... .capx?dl=0

  • Wossi

    The player was falling through the platform because you were moving the platform with Sine behavior.

    What I'm suggesting is that you use Sine behavior only to calculate the value. And then use this value to move the platform with Physics action "Set velocity".

    Pin is also a non-physics behavior and you should avoid using it with physics objects.

  • You can use Physics->Set velocity

    It's almost the same as setting Bullet speed, only it works correctly with physics objects.

    For sine movement you can add Sine behavior, but select "Movement=Value only" in properties.

    Then on every tick do Physics->Set velocity to (Self.Sine.Value)

    Alternatively, you can move your platforms using forces, impulses, gravity, linear damping etc.

  • You can change Vector X and Vector Y.

    Here is the easiest (but not very good) way to slow down vertical speed:

    On every tick-> Character 8Direction Set Vector Y to (self.8direction.VectorY*0.9)

  • blackhornet

    Thanks! I spent a lot of time searching for this setting and finally decided that it must be a bug