Kyatric's Recent Forum Activity

  • Stop loop works.

    The problem comes from the fact that your for loop will run every tick as you haven't filtered it otherwise. (reference: how events work)

    If what you're looking for is to make it run once, don't use stop loop, make your for loop a sub event of a start of layout event. It will only run once on start of the layout.

  • Same bug as this post

    Before previewing, go to your project properties and set the "Fullscreen" property (even if it is already setted, set it again to the correct choice according to your project).

  • You do not have permission to view this post

  • fixed

    The explanation is in the first post I linked.

    Picking with the UID.

  • Finaly it sounds as all I needed was to put things down "on paper".

    Update, compatible with r75

    You can download the pathfinder behavior and new (normaly fixed) examples from the first post of the topic.

    Wronghands: I've just launched your two latest versions, they appeared to execute without freezing (which I was looking for).

    Check the "moving with preview" example from the first post.

  • If I understand correctly, this and that topics should shed some light.

    If you still need help, please provide a capx and explain a bit more what you're trying to achieve.

    Your answer is probably to use a condition "sprite: compare instance variable".

    But the reading of the topics should be taughtful.

  • You need two sprite objects.

    One for the surface, no collision there.

    One for the border with a collision polygon (or bounding box, depending on your design).

    Then you spawn 2 border instances around each side of a surface instance and you have your road. You can do it either in the editor or at runtime.

  • Please provide a capx and the precise steps to reproduce the bug as asked in how to report bugs.

    Many thanks ^^

  • First, the PF maps a grid of square cells on the whole layout. You can only set CSS (Cell's Side Size) which is applied to both width and height.

    This is by "design" and I'm not sure how providing the ability to set different sizes might affect the PF in the end.

    It might end up in doing another PF behavior and I'm not ready/willing to dig into that atm (I'm sorry, I don't need a PF behavior with those features). Still I'm trying to provide this "simple" (but not much flexible) behavior for now.

    So with this out of the way, I've resolved the obstacle recognition in the PF. Now the PF boards is accurate with the setting of the obstacles, no matter what their size is, as long as you respect the square grid aspect in your level design.

    <img src="http://dl.dropbox.com/u/36472942/construct/plugin/release/pathfinder/r75-inprogress.PNG" border="0" />

    Quick image to show, the blue "mask" represents what the PF knows as "unwalkable" squares. The red sprite is the player.

    You can see the first wall on the top left has a "double" mask compared to the other obstacles.

    It's because of its position.

    The CSS there is 32. And the wall's position happen also to be 32, meaning it sits on the edge of 2 squares.

    And so it will appear as your sprite is avoiding the wall when it seems it should walk right next to it.

    So if you respect the positioning of the obstacles in your level designs, it will work as intended (the rest of the blue masks).

    The "big thing" that left for now is that to make the recognition work, I had to use a little trick. The square, for the PF is actually 1 pixel smaller than CSS value (31X31).

    And so when you put your mouse on the position 32,32 for example, for the PF, it sets the destination point as nowhere. The destination square doesn't actualy exist.

    So the algorithm freezes the whole thing.

    The algorithm part of the behavior isn't code I written, so I'm uneasy going into it and hacking a solution.

    SoI have already my hands full atm, and it is likely that the "new version" you report should be resolved once I'm done with the current issue.

    So I'll check them as documentation and even as base to provide more examples of use of the behavior once it is done, and for that I warmly thank you, but for now please don't keep them coming ^^

    Yeah to conclude another walltext, pathfinding is tricky, and this behavior won't be that flexible and constrain you in your design.

    Still it will allow to cover some ground and should definetely be useful/usable up to a certain level.

  • Try to keep all the "world processing" on the server.

    And try to apply some lag compensation on the inputs from the clients as well as in the clients themselves.

    Read again talkinghead's topic, I think he mentions it.

    There's also this article I found insightful on the subject.

    As smitchell said though, be aware you won't be able to eliminate all the lag, but you can reduce its impact.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rather than a single sprite, break your road into instances border-surface-border, where surface is where your car is supposed to drive, and handle the collision on border.

  • Just a quick word, yes the PF is buggy at the moment, I still need time to fix it.

    I haven't lookes at your capx, but it is likely, atm, that anything you'll do will end up crashing/failing because of the inner bugs of the PF.

Kyatric's avatar

Kyatric

Member since 18 Aug, 2010

Twitter
Kyatric has 583,405 followers

Connect with Kyatric

Trophy Case

  • 14-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x15
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x27
    Coach One of your tutorials has over 1,000 readers
  • x10
    Educator One of your tutorials has over 10,000 readers
  • x2
    Teacher One of your tutorials has over 100,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

23/44
How to earn trophies

Blogs