dop2000's Forum Posts

  • Sute

    You should avoid mixing Physics with other behaviors (Solid, Bullet, Pin, Platform etc.)

    Ideally Physics objects can only interact with other Physics objects, otherwise you can get all kinds of weird and unexpected results.

    So instead of solid use Immovable, instead of Bullet use physics actions like "apply force" or "set velocity" etc.

    If you only need physics to "kick" the ball, use Bullet behavior instead, with gravity, negative acceleration and "bounce off solids".

  • You have made a mistake in events, next time consider posting your capx file.

    Here is a good way to change animations for a platform character (screenshot from someone else's game):

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If both variables store Y-coordinates and you need to check if var1 is higher on the layout than var2, then this is the correct condition:

    System-> Compare variable var1 < (var2 - 50)

    • Post link icon

    Ashley,

    I understand why you might feel like being trolled, but please try to understand our position too. We paid for this software and it is in our rights to expect you (Scirra) to fix problems with it. Working with lagging application on a daily basis is extremely annoying and frustrating, and this is one of the reasons behind some heated comments.

    You can remove such comments, but please don't close the entire post!

    I created it hoping to exchange information with other users and maybe find a solution together. Closing the post will achieve nothing.

  • Apply impulse 100 at angle angle(touch.x, touch.y, ball.x, ball.y)

  • You can simply do something like this:

    paddle set X to clamp(mouse.x, 50, 1030)

    or you can make a more sophisticated formula that takes into account paddle.width, layoutWidth etc.

    • Post link icon

    NN81,

    I spent 2 hours of my life uninstalling updates and testing C2.

    I removed almost all updates, including KB4056892 with Meltdown patch.

    (two updates KB4054022, KB4057247 couldn't be uninstalled, as they are "required by my computer").

    No improvement whatsoever, same lags.

    Also if you read digitalsoapbox's comment above, he claims that these issues are happening on computers "where Windows updates have not been installed in months".

  • Both are very nice examples, but you kind of missed the part in my post where I mentioned that the sprite should move within about 10 pixels of its original position and not fly away any further

    Anyway, I got plenty of different solutions, thank you all!

  • If you have one JSON string for the entire array (all levels) you can simply hard-code it in your events.

    You'll need to replace quote marks (") with 3 consecutive quote marks (""") everywhere in JSON string.

    Then you just do this:

    Array load from JSON "{"""c2array""":true,"""size""": ...........

    Or you can save JSON string in text file, import into your project, request with AJAX, load to the array.

  • Gamepad.Axis(0,0) - gamepad #0, left X axis

    Gamepad.Axis(0,1) - gamepad #0, left Y axis

    Gamepad.Axis(0,2) - gamepad #0, right X axis

    Gamepad.Axis(0,3) - gamepad #0, right Y axis

    Also, see this post for some capx examples:

  • Turned out, Seek action is a pain to use with Ping-Pong or Flip-Flop loops.

    For some reason it pauses the tween, and you can't resume Ping-Pong or Flip-Flop, you can only "Resume at current progress", which resumes it for one cycle. And then you have to start it in reverse. And only then you can do PingPong..

    Also, the seek scale from 0 to 1 is for forward movement only, not for forward+reverse. If you need to start from some point in reverse movement, you need to add yet another several events and conditions...

    • Post link icon

    Thanks, digitalsoapbox for the support. Which windows version and build are you using?

    In my case "Don't show unique icons" option reduces the lag significantly. But this can not be considered a solution or workaround, as not having unique icons HUGELY affects the usability.

    Is anyone wants to test if your system is affected, here is the batch script that I used.

    Download this capx, create a text file in the same folder, name it RunAgain.bat :

    start test_lagging_win10.capx
    timeout /t 40
    taskkill /IM Construct2.exe
    timeout /t 10
    RunAgain.bat
    [/code:u9erp6dy]
    
    Run the bat file. Take a note how many seconds does it take for C2 software to open. Leave the script running and go have some lunch or dinner 
    Check again in 30-60 minutes to see if C2 startup time has increased. And then test if there are any lags with opening event dialogs, context menus, sprite editor etc., similar to this [url=https://youtu.be/8thpozIBnUU]video[/url].
  • savvito123

    It depends on the mobile phone you are using. I was testing my game on my everyday's phone and it was working fine.

    Then one day I tried it on my old phone (Snapdragon 410 cpu) and it was slow and laggy. Had to tweak a lot of things to make it work at 40-50 fps.

  • tunepunk , Nice, although the sprites are wondering away, not around their original position.

    Nexis717, Yep, that's what I decided to do after all. Sine still makes the sprite move in ellipses (see the second image in my previous comment), but it requires less code and looks good enough for my task.

  • Click at layout, select event sheet for it on the left panel in Layout Properties.