dop2000's Recent Forum Activity

  • Yes, if it's per tick, this is definitely too much. You can try optimizing events which use collision checks - On collision, Is overlapping etc. Also if there are lots of objects with behaviors like Bullet, Platform, 8direction - disabling them when they are not needed (say, when off-screen) can help.

    Finally you can update collision polygons in objects, make them simpler by deleting unnecessary points.

  • I would try adding it to Index.html in the exported game.

  • Only you can answer this question, because there are million things which can cause poor performance. Run the game in Debug Mode and check these things:

    • FPS, CPU and GPU utilization. For example if CPU is 10% and GPU 99%, the problem is likely with graphics and effects, not with your code.
    • Number of collision checks per tick - over 1000 could be bad for performance.
    • Number of object instances on layout.
    • CPU/GPU profiler tabs.
  • You can add another event: If ControllerAxis=0 -> Set ControllerAxis to 360

    Or with a single action:

    Set ControllerAxis to (ControllerAxis=0 ? 360 : ControllerAxis)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did some tests and the results are interested. Displaying 2048 random 2-digit numbers on every tick:

    • A single text object - 3 fps
    • A single text object with bbcode (random color for each number) - 15 fps
    • A single spritefont object - 144 fps, 25% cpu
    • A single spritefont object with bbcode - 30 fps, 100% cpu
    • 2048 separate text objects - 5 fps
    • 2048 separate spritefont objects - 75 fps, 70% cpu

    For some reason text is rendered slightly faster when it has lots of bbcode tags. And the winner is a single spritefont, it's massively faster, but it doesn't like bbcode.

    Since you only need to display 16 characters, you can add highlighted versions of them to the spritefont image and update the character set in spritefont properties. This way you can display white or red numbers without using bbcode.

  • Like I said, ask your questions on the forum. There is also a very active Discord server:

    discord.com/invite/Z6jjNQys

    And of course you should study tutorials and official examples - it's the best way to learn Construct.

  • But opacity=0 is not the same as visibility. It's not possible to check visibility in an expression. There is a silly limitation in Construct that expressions can't return boolean result - visible/invisible, enabled/disabled etc.

  • Spline is a simple behavior. Add points one by one, and the sprite will move from point to point.

    If you have any questions, ask them here - this is what the forum is for.

  • I've been getting inconsistent results using the second method. Sometimes the colour looks completely different like in the screenshot below, where red displays as blue. Could you explain why this happens?

    You can't use online tools. C3 uses some custom formula for colors, so you need to convert r+g+b values with rgb() expression. Make a little project with 3 text inputs and a button.

  • Color data consists of 3 values. So if you want to store them in one cell, you will have to store them as a string of text. For example "255,0,255" (but without the quotation marks). And then separate them into 3 numbers for rbg() expression:

    Set colorVar to Array.at(0,2)

    Sprite set color to rgb(int(tokenat(colorVar,0,",")), int(tokenat(colorVar,1,",")), int(tokenat(colorVar,2,",")))

    .

    Another option is to pre-calculate all color values. For example, rgb(255,0,255) returns number 16711935. So you can store it in the array and use directly in "Set color" action, without the rgb expression.

  • 2048 text objects all displaying 2 characters each

    Text objects are rendered on the canvas, and updating so many of them on every tick is not a great idea. Can you compose a single string and display them all as one large Text or SpriteFont object? Using a monospaced font of course. It should work a lot faster than 2048 separate texts.

    I would probably use a combination of Javascript and events - a script to generate that string and events to display it.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 256 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies