dop2000's Forum Posts

    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...

    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.

  • Maybe a simple bullet with gravity?

  • Try Construct 3

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

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

    Wow, thanks! I've been using LiteTween for almost 2 years and somehow never noticed this Seek option..

  • Here is a recent discussion with some tips on optimization:

    200 collision checks per tick is not too much, but it could be one of the reasons why your CPU is at 60%

    I suggest you test your game on an old low-specs mobile, make sure that it runs at least at 30 fps.

  • Is it possible to set tween progress?

    For example, a sprite should rotate from 0 to 180 and back, but I want the tween to start from angle 120 when layout is opened.

    In other words, I need a similar action to "Sine->Set cycle position"

  • Probably not possible.

    You can pause any playing audio and its Audio.PlaybackTime("tag") will be paused as well.

  • You can define a path - say, with small invisible sprites for each point. Use MoveTo behavior to move from one point to another. Set angle to angle(startX, startY, endX, endY)+90 when the enemy is moving to the left or "-90" when moving to the right.

    The more universal solution where enemies can walk around any solid object would require more efforts. You can make your enemy to walk around sprites (demo, capx) . But you'll also need some way to determine where the enemy should stop and turn around or descend to the floor. Maybe again put an invisible sprite, on collision with which the enemy will change direction or descend.