NN81's Forum Posts

  • There's no diagonals in your capx. Anyways the idea's only fault is how far you overlap the wall depends on the speed, which may or may not be acceptable for your purposes. I'd guess in general for any wall in your game you'd put those wall sprites around them. For diagonal you may need to put two of them. Like for a diagonal going down and to the right you'd put a bottom and left sprite along the top right of the sprite.

    Yep, finally a person who understands the problem, and speech relevant/constructive suggestions.

    I was not really looking for a universally valid method to deal with the problem, but right for the game I'm working on now, where Player's speed is constant and I can handle the size of the walls to dampen the sink due to the collision of the box if If it was too fast it would overtake it. The discourse of the diagonal walls is also correct, I had already thought of superimposing the two walls.

    The only fact is that I have to fill the layout of these overlapping sprites along the walls, so I was wondering if anyone found a simpler way, that "push out action" of the "customize movement" behavior you talk you think is simpler?

  • Maybe more carefully placed walls? I haven't tried something like that.

    You can try it yourself, voilà a sample capx..

    https://drive.google.com/open?id=0BwNG7 ... GdOa21Pc2c

    the player box overlap a bit the wall, but in the game i place the invisible wall a little further towards the inside of the room, so the thing is not even noticeable.

    The problem I spoke to you is when I use sloping walls at various angles, in those cases I have not yet felt good how to do that.

  • Last I looked, the 8dir behavior collisions work like this:

    Move the object with it's speed

    if the object overlaps a solid then move it back to it's last non overlapping position and set the speed to 0

    It's a valid way to do it, but it can cause it to stop short of the solid, then speed up again to close the smaller and smaller gap. Aka the effect you are observing.

    So a more desirable behavior would be for the overlapping object to move flush against the solid before stopping.

    Maybe by not using the solid behavior, and using the push out action of the customMovement behavior when overlapping the wall sprite or just doing your own push out with events. I think there have been some other topics with examples of a push out with events.

    Another idea is to keep track if the object is moving or not over multiple frames and only change the animation if it has stayed the same over multiple frames. That should eliminate most of the flickering with the only drawback of causing a slight frame delay for animation changes. So for example if you keep track of 4 frames it could look like this:

    global number f1=0

    global number f2=0

    global number f3=0

    global number f4=0

    every tick

    --- set f4 to f3

    --- set f3 to f2

    --- set f2 to f1

    sprite is moving

    --- set f1 to 1

    else

    --- set f1 to 0

    compare f1+f2+f3+f4 = 4

    --- set animation to walking

    compare f1+f2+f3+f4 = 0

    --- set animation to stopped

    thank you very much for the great help, im actually avoiding the problem using 4 different (non solid) sprites for wall of the rooms, that system work decently, only thing is the problem with irregular wall position, for example wall at differents angle..

  • If a behavior is holding you back, then you can indeed not make a game.

    Is there something in which you can be useful apart from the chats that do not interest me?

    Because if it is the only contribution you can give, you better go for a bath.

    I have a serious problem I am not here to waste time

  • All behaviors that combine 'Deceleration' with a 'Push out of Solids routine' suffer from this.

    The object does not have instantly a speed = zero when the collision happens, it decelerates.

    It also never exactly ends up where the 'Push out of Solids routine' wants to place it, because of the deceleration.

    Ok, so i can not make my game because the behavior is badly programmed?

    Is there not a way to solve it?

  • Hi guys, I have a problem with the collision of a sprite used as a "player box".

    When I go to the walls, not always the collision is perfect. Most often stops at a few pixels from the edge, and just holding down the direction against the wall, or trying to detach me and go back to the wall, it resolves with a perfect collision. This is giving me so much trouble, is there a way to overcome the problem? I point out that the box is a perfect square with "bounding box" collision and NOT "polygon", and the walls too are perfectly square with the "solid" behavior activated.

    Every help would be highly appreciated

    finally i have discovered how to avoid this issue.

    The problem of space between Player Box and Walls, happens when dragging objects on the layout instead of placing them manually Assigning integers pixel values for x, and y position of objects.

    for example if you don't use pixel grid and you drag a wall at X 345,5 position, instead of 345, the issue occur, but if you use integer pixel not occurr

  • As mentioned, this just looks like it is setting to an idle animation when you hit the wall because the player 'is not moving', therefore it will look like the animation is skipping.

    logic is simpe, a box with 8dir behavior, and a sprite everityck set position to the box, that change animation from idle to walk if the 8dir is "on moving" inverted, or "on moving".

    look at this, is the same thing, but without pinned sprite, only a change colour animation.

  • This doesn't really sound like a bug, more of a logic problem in the event sheet for the animations. Do you mean the built-in 8-direction or are you referring to a third-party plugin of some kind? You just need to find a way of splitting out the animations, probably have when key is down/key is not down, rather than when player is not moving.

    8direction plugin due to they manner of manage collision, that when overlap a solid move the sprite some pixels forward and back few times. this is the result (notice the animation switch madly when approach the invisible solid wall):

    NB all sprites are perfectly squared box collision

    https://youtu.be/1rQY0_Ne_KY

  • any idea or workaround about to solve this issue?? i have tried lots but nothing to do, im still trouble with this..

  • hello people,

    i have a serious problem due to the way the 8-dir-behavior manages collisions between player sprite and solid-walls.

    I've associated animations "idle" and "walk" if the Player is moving or not, The plugin however causes that when the sprite collides the solid wall, is automatically stopped then moves a few pixels then stops again, and so on for a fraction of a second during which the above animations obviously change madly from one to the other '..

    I'm really annoyed about this thing so much that I opened a dedicated topic in the "bug" section, nevertheless I decided to open this other topic even if someone could suggest some solution.

    Thanks to whoever wants to help me

  • Problem Description

    8dir-plugin, collision wall, animations problems

    Attach a Capx

    https://drive.google.com/open?id=0BwNG7 ... EdueFJEUk0

    Description of Capx

    Simple example file, a room with walls, a cube to move that changes color (animation) when it is "idle" or "walking".

    Steps to Reproduce Bug

    • Run the project, use WASD or ARROW_KEYS to move the cube.
    • Move to a wall, and when Cube it stops moving, due to the solid collision of the wall, go back and forth, repeat what you want

    Observed Result

    You should notice a quick "flash" of the cube, it changes crazy color / animation,If you hold it against the wall.

    Expected Result

    The cube should not change "madly" animation

    Affected Browsers

    • NW.js: (YES)
    • Chrome: (YES)
    • Edge: (YES)
    • FireFox: (ND)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10 Pro, 32bit

    Construct 2 Version ID

    Construct 2 R244 32 bit (i have tried Construct3 beta, and is also affected...)

  • > sorry but on my old notebook, the prototype don't work, black screen > <

    >

    It took me a hour but now it works. I think you spend at least a hour in my game so extra for you the game is now on Scirra Arcarde too.

    Unfortunately my old notebook has a webgl gpu blacklisted, I think the problem of not being able to play is related to this. I will try to play the nw.js version on another computer when I have an opportunity.

  • sorry but on my old notebook, the prototype don't work, black screen > <

  • hi guys,

    android version is release ^^

    https://play.google.com/store/apps/deta ... crapattack

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Scirra Arcade for me too XD