Xionor's Recent Forum Activity

  • Hey,

    I'm making something simple with the Physics behavior. If the object hits the ground at too high speed, it's destroyed. Code looks like this.

    ->On Object Collision with Ground

    --->If Object Overall Velocity > 400 : Destroy Object.

    The object always hits the ground with 500 Velocity.

    In 50% of the cases, the object is destroyed on impact.

    In 50% of the cases however, the object is NOT destroyed.

    What I imagine is that sometimes, at the moment of collision the object's velocity gets reduced BEFORE the game can check for overall velocity on the next tick.

    Any idea how to go around this inconsistency?

    I suppose I can record the velocity in the last few ticks in an Array, like a black box, and check the last few entries from the moment before impact, but that seems quite cumbersome for a simple check.

  • You mean this game? :)

    http://ludei.com/games/sumon

  • You're setting the angular velocity and applying a force every single tick - that's to say about 60 times a second.

    That's both on "Is clicked" and "Else". The PC probably manages the load while i suspect a mobile phone probably can't handle it that well.

    Also, are you using CocoonJS to port the game to Native first? Physics are extremely CPU consuming. CocoonJS uses an accelerated physics engine which increase FPS a lot on mobiles.

    Try to rework the events - maybe make them triggered?

    Like,

    On Left Button Clicked on Shape
    [ul]
    	[li]>if Clicked = 0 -> Apply Force/Velocity, Set clicked to 1.[/li]
    	[li]>if Clicked = 1 -> Remove Velocity, Set clicked to 0.

    Another variant would be

    On Left Button Clicked on Shape
    [ul]
    	[li]>if Clicked = 0 -> Set Velocity, Set clicked to 1.[/li]
    	[li]>if Clicked = 1 -> Remove Velocity, Set clicked to 0.[/li]
    [/ul]
    While Clicked = 0 -> Apply Force

    The first variant applies the force only once, whereas the second applies it every tick.

    Try those 2 and tell us if they work better.

    (BTW) Applying 0 force to an object does absolutely nothing at all, so no point in using that.

  • Try using only Mouse.X or Mouse.X("layer") ?

    See if any of those 2 work better with your game : )

  • Are you trying to copy someone's game? ^^

  • Make 2 Sub-Events under "On Colission with enemy".

    One for "Player is mirrored"

    One for "Player is not mirrored"

    Put the same code in both of them, just change the Physics thing for each : )

  • What if your path zig-zags tho or goes around a lot?

    You should't need to "trick" or "force" the behavior into doing something it should be doing by default. It really looks like there's a bug/oversight with it.

  • So THAT'S what's happening.

    I have the same problem. Going forward, the object follows the path immediately.

    But when I order it to go back, it takes 2-3 seconds before it starts moving. I've DISABLED rotation, so this would explain what's happening - that it takes 2-3 seconds to rotate backwards(in the game code, but not visually) before it moves off.

    I hope this can get fixed.

    Ashley - Is this a bug or is it intended functionality?

  • Ashley - On mobile devices, even one-time changes/updates to the Text object induce a small hickup/stutter. Hence why I recommend to avoid it altogether.

  • People are willing to fund anything on Kickstarter as long as it's good enough, doesn't matter what it is or how it's made.

    Do have in mind though, those that have gotten funded millions are professional and experienced game studios, not startup developers : )

  • You shouldn't use the Text object with WebGL. It's VERY performance heavy, especially on mobile devices. Rather use Sprite Fonts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see your "Reset Layout" is disabled. You need to reset it for the timer to restart.

    Which version are you using?

    I remember the previous versions had an issue where "Every X seconds" timer would not reset, even after layout reset, so that it would execute again the first moment it's available.

    I believe that's why Ashley added the Timer behaviour instead, try to use that.

Xionor's avatar

Xionor

Member since 16 May, 2013

None one is following Xionor yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies