R0J0hound's Forum Posts

  • irina

    yeah, I just updated the link.

  • damjancd

    Try the link again. I think I haven't been considering object recycling when the instances were destroyed. now it discards the references to the textures/canvas' when an instance gets destroyed. If that doesn't work then I'm at a loss.

  • The two ways I've used to do that are either:

    * move the player if he exits either end of layout. Scrolling is unbounded and the seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    * move everything under the player instead of the player. And just wrap the pieces as the leave the layout.

    Both those take care of the visual portion. The seam will be a problem with ai and such so you'll have to take that into consideration with your events.

  • The reason something like a beach ball is floaty is because of air resistance. With the physics behavior or even with most simulators in general it's like objects are moving through a vacuum, in which case nothing would be floaty.

    Now the solution is to apply a force proportionate to the object's speed in the opposite direction of the object's motion. Basically we're adding a drag force.

    The following would do it, just tweak 0.1 till the object has the desired floatiness.

    every tick

    --- apply force -0.1*distance(0,0,Self.Physics.VelocityX,Self.Physics.VelocityY) at angle angle(0,0,Self.Physics.VelocityX,Self.Physics.VelocityY)

    EDIT:

    or alternatively you can look at the linear damping property.

  • kmsravindra

    I guess it is possible but I'm unfamiliar with a method. Probably some kind of linear regression or something. Also it's something you'd do outside of the plugin.

  • ryrydawg

    This would give the current time in milliseconds:

    Browser.ExecJS("Date.now()")

    source:

    https://developer.mozilla.org/en-US/doc ... jects/Date

    You could also look here for a plugin that also does this:

    viewtopic.php?f=153&t=63492

    If nothing else you'll probably find an example that is helpful.

  • Sounds like it may be an issue with the gamepad plugin perhaps. The issue of the "for each" effecting the other events possibly could be related to an "or" bug reported about a week ago.

  • Maybe Spriter, Spine or creature2d? They are all programs to define motions with bones or something to that effect, and they all have plugins on the forum.

  • Juicy

    This plugin isn't really useful for doing destructible terrain. I mean it works visually but you can't do collisions with it. The canvas plugin can since you can read the pixels with it. However better than canvas is using the tilemap plugin with 1x1 tiles. With it collisions need no extra work, but it does take some more work to setup the canvas and make it erase a circle.

    Probably this:

    or this one may give some ideas:

    For best performance use only one tile on the tilemap and instead color it with another object and a blendmode.

  • If 180 degrees is 30 minutes, then 360 degrees would be one hour. How would you like times greater than 1 hour to be represented with the timer?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Juicy

    What would you like to do? The most basic thing you can do is draw other objects to it. To do that position the other object so it overlaps the paster object and use the "paste object" action.

  • I don't have a joystick, but I can't get the same result if I use keyboard instead. What are the values returned for the joystick axis when not pressing anything?

  • When you click on those parameters in the editor there is a description at the bottom of the property bar that tells what it does. The speeds are in pixels/second and the accelerations are in pixels/second^2, and sustain is in milliseconds as I recall.

    Anyway you'll have to look in the source to see exactly what it does. It also has some other things it handles such as being on a moving platform and such.

    Roughly off the top of my head the motion is done like this. On top of that you'll need to detect collisions and resolve them someway.

    not on ground

    --- add gravity*dt to velocityY

    global number upPressTime=0

    on up pressed

    --- set upPressTime to time

    up is pressed

    time < pressTime+sustain

    --- set velocityY to -jumpStrength

    left is down

    --- subtract acceleration*dt from velocityX

    left is not down

    velocityX < 0

    --- add deceleration*dt to velocityX

    right is down

    --- add acceleration*dt to velocityX

    right is not down

    velocityX > 0

    --- subtract deceleration*dt from velocityX

    every tick

    --- set velocityY to min(velocityY, maxFallSpeed)

    --- set velocityX to clamp(velocityX, -maxSpeed, maxSpeed)

    --- set x to self.x+velocityX*dt

    --- set y to self.y+velocityY*dt

  • I updated the plugin link with the fix. Using effects like distortion shouldn't cause an error but they may not work correctly. The issue is I never found a way to convert the coordinate parameters, used the distort effects, to be in relation to the paster object.