R0J0hound's Recent Forum Activity

  • Post a capx, it should just work when added to a project.

  • 1. When the layout is rotated it behaves that same as normal bounded scrolling.

    2. Change the formulas like so:

    set scroll x: Clamp(Sprite.X, WindowWidth/(2*LayoutScale), LayoutWidth-WindowWidth/(2*LayoutScale))

    set scroll y: Clamp(Sprite.Y, WindowHeight/(2*LayoutScale), LayoutHeight-WindowHeight/(2*LayoutScale))

    If just the layer is scaled replace LayoutScale with LayerScale(layer).

  • When using Fullscreen(scaled) I don't find the WindowWidth and WindowHeight expressions enough to position objects to the edge of a 0,0 parallax layer.

    The solution is to use the Anchor behavior. But since your events indicate you don't want to have to recreate the HUD per layout make the hud objects global and position them on your startup layout. Then they just need to be moved to the HUD layer per layout with events.

    http://dl.dropbox.com/u/5426011/fixed/fix_for_tl22.capx

  • I can't open your capx because I don't have all those plugins installed, but try to use 320 and 240 instead of WindowWidth and WindowHeight.

  • I'd like to make a correction, it's not a bug at all. Instead of using the WindowWidth and WindowHeight expressions when in Fullscreen(scaled) mode, use the Edit time window size.

  • Try Construct 3

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

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

    I realized it was a different issue. In your capx use the edittime windowwidth and windowheight values for positioning.

    For ex. it would be

    Sprite set x: scrollX - 640/2

    Sprite set y: scrollY - 480/2

    So you would do the math as if the window were not scaled at all.

    Edit:

    Actually it looks like no issue at all. I thought it was because with unbounded scrolling off scrollx and scrolly were returning 479.25 and 240, but it seems to be correct.

  • Danijerry

    Re-download the canvas plugin, that memory leak should now be fixed.

    I also second Ashley's suggestion to leave WebGL off when using the canvas plugin. The webgl portion of it needs to be rewritten so it is more efficient. As it is now it's sort of a hack that uses a 2d canvas as a backend.

  • Animmaniac's solution should have worked. It appears to be a bug that it doesn't work with "fullscreen on(scaled)" as it works with "fullscreen off" and "fullscreen on (crop mode)". To be exact the scrollx and scrolly expressions are returning a position that's in the center of the screen but doesn't seem to have a correlation to the screen size.

    Now for a workaround select "fullscreen on (crop mode)" and set the scale manually. Then use these actions:

    Set layout scale to: min(WindowWidth/640,windowheight/480)

    Sprite set x: scrollX - WindowWidth/(LayoutScale*2)

    Sprite set y: scrollY - WindowHeight/(LayoutScale*2)

  • You can simulate Bounded scrolling with unbounded with this:

    Scroll to X: Clamp(Sprite.X, WindowWidth/2, LayoutWidth-WindowWidth/2)

    Scroll to Y: Clamp(Sprite.Y, WindowHeight/2, LayoutHeight-WindowHeight/2)

  • Just add the ships angle into the equation.

    The usual setup is to have "right" as an angle of 0.

    So the turret angle range would be:

    Ship.Angle+45 to Ship.Angle+135

    Then to reset the angle of the turret like your image set the turret's angle to Ship.Angle+90.

  • Nope, using Delta-Time makes it frame rate independent.

  • ranma

    In your first capx if you hide the locked sprite at the same time as destroying it you won't see it flash. When destroying a sprite it is not destroyed till the beginning of the next frame, so that is probably why you see it flash.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound