R0J0hound's Recent Forum Activity

  • There are many. Add a Sprite then click on the add effect link in the sprite's properties. There you can look all the bundled or included effects. One of them may do what you want. If not look at the link I provided and one of those may do it.

    If all else fails the manual has info about effects. You can even make your own if you're so inclined, but you shouldn't need to in the case of what you want to do.

  • Yes. Look at the bundled effects or try one of the ones in the link.

  • What have you tried so far?

    Minus the graphics, can you make that slope there with collisions?

    One way often used is to use multiple sprites to define the slope. So say you have a circle sprite you could place them in a row on the grass level. More advanced ideas would be to stretch a rectangle sprite from circle to circle to make the surface smoother.

    Anyway, to make the slope continue you just add sprites to the right of the last sprite.

    In the simplest case you can do this:

    Global x=0

    Global y=0

    While

    compare: x < screenleft

    --- set y to 100*sin(x)+320

    --- create sprite at x,y

    --- add 32 to x

    The "set y" expression is how your slope is defined, and you can do anything with it. Some examples:

    100*sin(x)+320 is just a sine wave

    100*sin(x)+50*sin(x*3+22)+320 is two sine wave combined to make a varied slope.

    (noisejs.perlin2(x*0.44, 0.5)+1)*100+320 uses the noise plugin to use perlin noise.

    Noise plugin:

    terrain examples:

  • Prominent

    It's the same as far as I know. The browser could cap the fps, but I don't know since I've only ever used 60hz displays.

  • Try Construct 3

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

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

    It should, although I'm not sure if "fps" will have a good value at that point. You could wait a second or so first first.

    Just leaving the timestep at 1/30 means if the refresh rate is 120 the physics will run twice as fast than if the refresh rate were 60.

  • remy-jay

    How are you using pathfinding? That line just moves the Sprite. So does the pathfinder but maybe it messes things up when manually moving a Sprite while it is following a path. I'm not sure.

  • This may help:

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

    This creates a shadow sprite for each object of the family.

    The shadow keeps track of the uid of the object it's paired with and how high it is, which i call "z".

    Then to move the objects I just move the shadow and put the objects's position to (shadow.x, shadow.y-shadow.z)

    For the jump I added another variable to shadow called "vz" which is just the vertical speed. Then I use the following to make it accelerate down due to gravity (400) but stop when z is 0. The result is a nice parabolic motion.

    every tick:

    add 400*dt to vz

    set z to max(0, self.z+self.vz*dt)

    Then to make it jump just set vz to -300 or something.

    You could change it up to move the shadow instead of the object. ( shadow.y=object.y+shadow.z )

    Just be sure to change the object's y when the z changes.

  • It's running smooth enough here with chrome. I used to get some pretty serious jank with firefox so I switched browsers. As far as I can tell the reason for the jank has to do with the rendering portion of the browser when a graphics card isn't supported well. Which is the case for my machine with all browsers.

    Here's a sinple js test I made a while ago to see how smooth motion can be in the browser:

    In chrome I get a slight variation in frametime but it's not terrible. Still it can be distracting to the eye.

  • It's used in BASIC, SQL and probably others.

    != is more common and is used in c, Python and JavaScript off the top of my head.

    Some languages even use something different like ~= in Lua.

  • Badmiracle

    Ok here's a capx how to do it.

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

    The idea I posted was on track but was flawed.

    For tilemaps, it's enough to move the area you want to paste onscreen and move the paster by the same amount.

    For particles that wouldn't work as moving particle objects doesn't move the already spawned particles. The solution was to save the particles position when it was created then move it to the center of the screen.

  • Savvy001

    You should be able to do it by pasting the Sprite into the canvas then pasting a another sold Sprite that covers the paster object. The second object should have the destination out blend and just change the opacity to lower than 100. You'll also want to make the second object invisible when not pasting.

    The only caveat is it never fades all the way to transparent, although it gets close.

    Badmiracle

    No eta for a fix. I haven't touch the plug in a while.

    The particles off screen aren't drawn so the only workaround I can think of is to move both the particles and paster object on screen before pasting.

    Here's the offset.

    Offsetx = particles.x-scrollx

    Offsety = particles.y-scrolly

    Subtract it from the partircle and paster positions,

    Paste the particles,

    Then add the offset again.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound