dop2000's Recent Forum Activity

  • It's a runtime error, which should be reported. Try to re-create it in a small project and file a bug report:

    github.com/Scirra/Construct-bugs/issues

  • Say, the total distance is 25.3px, you want to represent it as "10".

    Add a variable f=10/23.5=0.4255

    So, for example, as the ball flies you can show the distance it has traveled as (RealDistanceInPixels*f)

  • Do I have to import Steamworks SDK files to my Construct 3 project before exporting the game?

    No, but you can import a text file steam_appid.txt with just your APP ID in it.

    Export the game with DevTools enabled, make sure Steam is running, launch the game (directly from your drive, no need to upload to Steam). Try to activate an achievement, press F12 and see if there are any error messages in the console.

  • Most games ignore the system scaling setting and don't resize their content. Besides, in a mobile game I need to make sure that touch controls are always usable. I can't just scale things down without knowing the physical screen size. The same button may be fine on a tablet, but will be too small for mobile phone screen - impossible to control without a pen.

    I guess the safest solution is to add an in-game setting for UI scale and allow users to change it.

  • On mobile devices, your best bet is probably just to rely on the screen size reported by Platform Info. That is in CSS pixels so does not vary with the device pixel ratio,

    Unfortunately, when I change scaling/text size in my phone settings, this changes the screen size in CSS pixels reported by PlatformInfo, as well as the device pixel ratio.

    Same phone, different settings:

    CanvasCssHeight=510, pixel ratio=2.1

    CanvasCssHeight=320, pixel ratio=3.37

  • But the aspect ratio is what really matters for display on mobile devices.

    I agree, but my question was NOT about the aspect ratio.

    I need to know the physical dimensions of the screen to scale the UI accordingly. Basically, if the game runs on a 6" mobile screen, all texts and buttons will be bigger. On a 10" tablet I can make them smaller. On a 24" desktop monitor I can make them even smaller and fit more information on the screen.

  • igortyhon I think you misunderstood my question. I'm not asking about the aspect ratio. There are thousands of different screens with different aspect ratios, so this metric can't be used to estimate the physical size of the screen.

    In my above example, the aspect ratio for both screens is 16:9, but 15" screen is about 600% larger than 6" screen.

  • I am making a mobile game and want to detect roughly if the screen (window) size is closer to a phone or a tablet. Basically, if it's bigger or smaller than 8".

    I'm reading the documentation for PlatformInfo, but can't make sense of it.

    I found an old post where Ashley says it's possible to estimate screen size from CanvasCss Width and Height. But I tested on my phone and PC screen with the same resolution, and by changing display scaling settings, I get vastly different results.

    • 6" mobile screen set to smallest scale: CssHeight=510, DevicePixelRatio=2.1
    • 15.4" PC screen set to highest scale: CssHeight=618, DevicePixelRatio=1.75

    So obviously this method doesn't work.

    ChatGPT says I need one more piece of information: the PPI (pixels per inch) or DPI (dots per inch) of the screen. Without it it won't be possible to estimate the physical size.

  • Loopindex doesn't work in For Each element loops. Either use System For loop, or Array.CurValue expression.

    Actually, that's not even "For Each element" loop on your screenshot, it's "For Each instance".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But what if we prefer to keep the original sprite orientation? I found that we can offset the angle somehow

    I don't know, it may be possible.

    Another option is to create two versions of the skeleton in the editor - normal and mirrored. Configure them as templates. And when you need to mirror it - destroy one hierarchy and create another in its place.

  • The main issue is that your sprites are rotated. You can select the lower leg sprite for example and mirror it in the layout editor - set width to negative value. You will see what happens to it.

    You will need to rotate the images in some external editor and set their angle to 0 in Construct.

    Also you need to disable Sine when the hierarchy is mirrored.

    Here is an example:

    dropbox.com/scl/fi/rhek2x89kjxmqzgxofrl8/test-mirror2.c3p

  • without using clones

    I don't think it's possible. You can use a clone sprite or paste the image to drawing canvas.

    Here is my old demo

    howtoconstructdemos.com/animation-frame-change-with-morph-fade-capx

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 247 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
  • x4
    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