R0J0hound's Forum Posts

  • How are you pairing the ships with the colliders? From what it looks like you're using an overlap check to pick the ship from the colliders. You could eliminate those collision checks by putting the colliders and ship into a container.

    Another thing you can do is check for collider overlaps once and store the result in a variable.

    every tick:

    --- controller_smallShip: set blockedL to false

    --- controller_smallShip: set blockedR to false

    --- controller_smallShip: set blockedF to false

    --- controller_smallShip: set blockedB to false

    colliderL is overlapping obstacles:

    --- controller_smallShip: set blockedL to true

    colliderR is overlapping obstacles:

    --- controller_smallShip: set blockedR to true

    colliderF is overlapping obstacles:

    --- controller_smallShip: set blockedF to true

    colliderB is overlapping obstacles:

    --- controller_smallShip: set blockedB to true

    Then for the remainder of the event sheet just check those booleans. You shouldn't need to actually check for collisions again that tick unless you change the object's postions in the event sheet. This technique is mainly useful if you you're doing the same overlap check in multiple places.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do the pattern you're specifying like so:

    https://dl.dropboxusercontent.com/u/542 ... ttern.capx

    To create near an existing point you could do something like the following:

    pick random instance of sprite

    --- create sprite at (random(-100,100)+sprite.x, random(-100,100)+sprite.y)

  • Valex

    You can disable the collisions between the joined objects by giving them the same non-zero collision group.

  • How are you handling the collisions? Using distance instead of is overlapping is just a different way to detect collisions, they don't affect how the collision is resolved.

  • I should have looked into it earlier, it ended up being dead simple to fix.

    Updated to version 2.2c:

    * Now with minifier support.

  • It just changes the value of dt.

    At 60 fps with a timescale of 1, dt will be ~0.0166.

    If you change the timescale the the fps will stay the same but the frame time ( which is usually dt) will be multiplied by the timescale to give a new dt.

    So for example at 60fps

    If Timescale=2 then dt will be about 0.0333

    Or if timescale = 0.5 dt will be about 0.00833

  • heal

    I think you should be able to find the collided with tile using the collision point and normal, but I have to think about it. The only issue I can think of is the collision point is on the edge of the tile so you may need to use the normal as well to get a point inside the tile. From there you can find the tile with tilemap's x to tile x expressions. I need to impliment a capx to be sure.

    I haven't looked into it yet, but I probably should.

  • Neat. You successfully captured the same feel as a console game. Nice work!

  • html5 doesn't provide a way to turn it off. From what I've read is a solution is to draw the curve or lines one pixel at a time.

    Here's a capx that does that. If you have the function and canvas objects you should be able to copy the "pixel lines" group over to your capx.

    https://dl.dropboxusercontent.com/u/542 ... ezier.capx

    It isn't completely smooth due a math error I think. I may revisit it later.

    Edit: fixed, it's now smooth.

  • I read the original post a bit wrong, but like blackhornet's example you can do it with blend modes.

    Here's another example to make only part of a sprite transparent:

    https://dl.dropboxusercontent.com/u/542 ... blend.capx

  • I usually handle collisions with other instances of the same object by creating a family with just that object in it and call it "other". Then use events like this:

    For each sprite

    sprite is overlapping other

    for each other

    system compare: other.uid !=sprite.uid

    --- handle collision

  • You can't access dll files from javascript typically. You'd have to make a browser plugin I suppose.

    But if you're wanting to run your c2 projects in your custom engine, it's not a trivial thing to do. Basically you'd be stacking another engine on top of yours which would defeat the purpose. You could pull the level layouts and animations from the xml of the capx files and convert it to something your engine can use, but all the logic would have to be re-written from scratch.

  • SpookySkeleton

    Give the tail pieces a private variable called "index".

    Then every time you create a tail piece set their index to -1. Finally to do the ordering use a "for each ordered" loop:

    For each tail ordered by tail.value('index') ascending

    --- tail: set index to loopindex

    That will make the tail piece right behind the player always be 1 counting up to the oldest one. This loop also cleanly handles destroying pieces, so they will be recalculated correctly.

  • In general a behavior is run every tick if it can move the object.