linkman2004's Forum Posts

  • The System object already has built in expressions for converting between strings and numbers: int(x), float(x), and str(x). You can check the manual for more info.

  • Are you sure the carriage returns are at fault? I haven't been able to replicate the issue, even using files with Windows style line endings. It might help if you post your capx and txt files.

  • When you call a function, previously picked objects are forgotten, which is probably what's going on here. A way around this would be to pass the enemy's UID as an argument to the function, then from that pick the enemy inside the function.

  • If I'm not mistaken, I think Coin-coin wants to be able to queue up -- or run simultaneously -- multiple camera shakes, rather than shake individual layers. MagiCam can't handle that itself, but one could always setup a queue that initiates camera shakes in sequence.

  • It would help if you said what the problem is, but I'm assuming you're talking about the bullets moving in the wrong direction. To fix that, change the Set angle property on the 8DIrection behavior for obj_Player to "no".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Zebbi setting a higher lag value would help to smooth that out, but there's otherwise no specific way to compensate for small object movements. That said, it's an interesting thought -- I could see the use in dynamically setting lag on a curve based on how far an object has moved.

    So that's something I'll consider for the next version(when or if that happens), but until then you could probably achieve a similar effect with events. I'll see if I can rig something up.

  • Zebbi MagiCam is certainly doing more work than scrollto, but it's nothing overly complex, and is almost certainly faster than implementing the same features in events, so I wouldn't expect any performance issues.

  • Have you actually measured performance? It seems like you're trying to prematurely optimize under the ill conceived notion that a single event is going to make a discernible difference, which only happens in extreme cases. I wouldn't worry about it.

  • Why not just remove the "Every 0.05 seconds" and let the event run every tick? Unless you have an unreal number of these spaceship objects, there shouldn't be any performance impact.

    EDIT: Also, the way you're limiting the speed is... odd, and not really accurate. A more accurate way would be to set the velocity to something along these lines:

    VelocityX = cos(angle(0, 0, self.Physics.VelocityX, self.Physics.VelocityY)) * maxSpeed
    VelocityY = sin(angle(0, 0, self.Physics.VelocityX, self.Physics.VelocityY)) * maxSpeed[/code:3fkmkwlh]
  • Zebbi I have some ideas about what's causing this and I'll have a look later today, see if I can get it patched up.

  • Zebbi are you using global cameras? Local cameras will only work inside the layout they're created on, which sounds like what you need.

  • The platform behavior has an "Is on floor" condition that will let you know if your object is on the ground.

  • The camera position is a simple average of the two object's positions, so the X position of your camera should be...

    (player1.X + player2.X) / 2[/code:3jpn49ek]
    Zoom would be something along the lines of...
    
    [code:3jpn49ek]if player1.X < player2.X
        set layout scale to WindowWidth / (player2.BBoxRight - player1.BBoxLeft) 
    else 
        set layout scale to WindowWidth / (player1.BBoxRight - player1.BBoxLeft)
    [/code:3jpn49ek]
    Note that extending the camera positioning to work both horizontally and vertically is straightforward, but doing so for zoom would involve dealing with some extra edge cases.
  • What he means is that you have two completely separate tile map objects -- one is visual, while the other has the solid behavior and simply defines the solid areas(this second one should also be made invisible).

    Example

  • Using the draw line feature of the Canvas plugin is definitely what's killing performance here, especially since you have to redraw every line whenever something updates. There may be ways around erasing the whole canvas, but no matter what you'll have to redraw everything when you zoom in and out.

    My suggestion would be to use Paster instead of canvas, which properly supports WebGL. It doesn't have line drawing support, but you should be able to get around this by pasting a rotated and stretched sprite.

    EDIT: Upon further investigation, I take back everything -- will investigate more.