Laurent's Recent Forum Activity

  • > I think you should check if you have added a Solid behavior to your obstacles and make sure Solids are assigned as obstacles in the Pathfinding behavior.

    > The random numbers that are generated will determine witch obstacle's solid behavior will be turn from Inactive to Active.

    >

    > There is something you can do :

    > - put obstacles on your stage

    > - design different (let's say, 5) possible paths that are determined by a different combinaison of obstacles. Put the corresponding set of obstacles in different families named (for exemple) pathObstacle1, pathObstacle2, pathObstacle3...

    > - for every moving object, before path is calculated, select a random family and put it as an obstacle in the Pathfinding behavior

    > - calculate path

    >

    > Should be something like that :

    > + System: For each MovingObject

    > -> MovingObject: Add Pathfinding obstacle Obstacle(random(1,5))

    > -> MovingObject: Find path to (targetx, targety)

    >

    The problem with making obstacles solid is that then the player can't get past those obstacles - also the walls tilemap (which is solid), when added as an obstacle after creation, doesn't work either and the object paths right through it

    Just disable obstacles once path is calculated.

    Sequence is :

    • Activate random set of obstacle
    • regenerate obstacle map
    • calculate path
    • deactivate set of obstacle
    • move along path
  • I think you should check if you have added a Solid behavior to your obstacles and make sure Solids are assigned as obstacles in the Pathfinding behavior.

    The random numbers that are generated will determine witch obstacle's solid behavior will be turn from Inactive to Active.

    There is something you can do :

    • put obstacles on your stage
    • design different (let's say, 5) possible paths that are determined by a different combinaison of obstacles. Put the corresponding set of obstacles in different families named (for exemple) pathObstacle1, pathObstacle2, pathObstacle3...
    • for every moving object, before path is calculated, select a random family and put it as an obstacle in the Pathfinding behavior
    • calculate path

    Should be something like that :

    + System: For each MovingObject

    -> MovingObject: Add Pathfinding obstacle Obstacle(random(1,5))

    -> MovingObject: Find path to (targetx, targety)

  • > I was thinking of something :

    > - Put on your scene a few invisible obstacles that you can activate/desactivate.

    > - Every time an object has to find its path, chose randomly a random number of obstacles to activate. This will create for every object a different path to choose from. One path is calculated, disable active obstacle and apply the same process to the next object

    > - Of course, you'll have to place your invisible obstacles on stage so that they won't create dead end where an object can be stuck.

    >

    > I didn't give it a try but this may be worth trying

    >

    Yes that's what I was saying above. I've put it into practice and it works.

    Oh ! Sorry, it seems I missed your post.

    Do you have a capx to see how you achieved this ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was thinking of something :

    • Put on your scene a few invisible obstacles that you can activate/desactivate.
    • Every time an object has to find its path, chose randomly a random number of obstacles to activate. This will create for every object a different path to choose from. One path is calculated, disable active obstacle and apply the same process to the next object
    • Of course, you'll have to place your invisible obstacles on stage so that they won't create dead end where an object can be stuck.

    I didn't give it a try but this may be worth trying

  • paradine

    You have very good ideas !

    Let's say :

    Swipe speed :

    • current speed during swipe
    • Average speed at the end of swipe

    Direction :

    • 360 based
    • average (like you already did : top/left, left, bottom/left...)

    What about swipe distance ?

    Thanks, sir !

  • What do you need this for ?

    Use Browser object expressions to check device pixel ratio and screen size (Iphone X specs are 2 436 x 1 125 pixels at 458 pop) and browser platform that returns Windows, Mac, IOs..

  • Laurent

    You are welcome!

    May be you mean that you want type of Swipe that will show the direction of swipe not at 4 or 8 directions but angle of finger's motion should be shown or may be after swipe the arrow should show the direction? And also the distance between touch start point and touch end point should be shown?

    Please, let me know, and I will add this.

    Thank you, too!

    paradine

    That, indeed, would be a very nice addition too ! And what about swipe speed also ?

  • paradine

    Thanks !

    I just downloaded the capx and tried it and it seems to work well. Combining scroll and swipe detection can be interesting to find out the direction of a scroll movement. And scroll seems to work well with zoom.

    Thanks a lot !

  • Thanks paradine,

    I did follow your instruction but apparently, Zoom and Scroll+ Both appear to conflict. Touch behavior for scroll makes the screen move before scroll occurs.

    I'm afraid this kind one conflicts may appear with every combination. For example, if I want to combine Scroll with Swipe. How can they be differentiated ?

  • paradine

    Great work !

    Each feature taken separately is excellent ! Now, we would love to be able to combine them. For example, the basic combo Swipe to scroll/Zoom. Is it something you could try implement ?

    Nice capx BTW

  • Thanks Ashley

    So deleting the cache is like making a C3 clean install ?

    It would be very useful to be able to clearly identify what C3 installs in Chrome so we could be able to purge knowingly. Could you add such a function ?

  • Ashley,

    I followed your instructions but it's very difficult to understand what each file is about.

    All my capx are stored in the cloud, none in the browser. I have a few add ons that I can easily reinstall. What is the risk to delete every file in the https_editor.construct.net_0.indexeddb.blob dossier ?

Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies