dop2000's Recent Forum Activity

  • Use text expressions: mid(), left(), right(), len(), etc.

    For example, mid(string, 5, 1) returns the 6th character from the string.

  • You do not have permission to view this post

  • In the browser there are always black bars on the sides and it really doesn’t look good. If I choose another mode, it causes unpleasant cropping. Stretching in the browser is usually very small because of the toolbars, so it’s really not a big deal, and in my opinion the game looks much better when it fills the entire screen.

    Ultrawide monitors are very popular these days. And there are super ultrawides. Some people install them vertically. And of course many people browse on their phones/tablets.

    So your game will look like this:

    You need to use the Scale Outer mode and stretch the background to cover black bars. See my previous demo.

  • How to intercept the pointer events before Construct processes them

    How to apply the corrected coordinates so Construct's "Mouse → On object clicked" conditions work properly

    I don't know if that will be possible.

    You can still click things:

    dropbox.com/scl/fi/k9byucogoqex2ymq60yd5/DistortedScaleDemo.c3p

  • I never imagined something so simple would be so complicated.

    I've been using Construct for many years, and this is probably the first time I've seen someone ask this. In 99.99% of cases, people want to scale the game while preserving the aspect ratio.

    Anyway, here's a simple way to recalculate the mouse position:

    function OnPointerMove(e, runtime)
    {
    
    	const w = window.innerWidth;
    	const h = window.innerHeight;
    	const layerX = e.clientX * (1920/w);
    	const layerY = e.clientY * (1080/h);
    
    	const sprite = runtime.objects.Sprite.getFirstInstance();
    	sprite.x = layerX;
    	sprite.y = layerY;
     
    }
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The screenshots don't help much. You probably have other events which override the animations.

    I've also discovered that the animations dont even finish, like when you use a light attack within the second area, it fails to finish it.

    There's almost certainly some other event which sets a different animations in the same tick. That's why the animation is restarted all the time and never finishes.

  • even if it distorts the game slightly.

    I don't think it's a good idea. What if someone runs your game on an ultrawide monitor?

    To scale preserving the aspect ratio - use "Scale Outer" and enable "Unbounded scrolling" on the layout. No code needed!

    Here is a demo:

    dropbox.com/scl/fi/nlcnbsjne5ae9p90lixzf/ScaleOuterDemo2.c3p

  • Scale outer cuts the image, parts of the display are not shown in many situations

    It doesn't cut anything, you are probably not using it right.

    Can you post an image of what you are trying to make, or a demo project?

    Perhaps what you are looking for is the "System Set Canvas Size" action? It has the same effect as changing the viewport size in project properties.

  • Can you post your project file, or at least some screenshots of your code?

    Make sure the new position of the character is within the layout bounds - make the layout bigger if needed. Some behaviors (like Pathfindind) won't work if the object is outside of the layout.

  • I have no idea what your code does. I asked ChatGPT and it said "The code breaks Construct's input system by stretching the canvas with CSS instead of resizing the internal render size."

    Why don't you use the built-in "Fullscreen mode" setting? The most popular option is "Scale outer", it properly fills the entire viewport.

    construct.net/en/tutorials/supporting-multiple-screen-17

  • Your timescale is 0, that's why the Flash behavior is paused.

    You have a condition "if layer 4 is visible -> set timescale to 0", make sure you reset the timescale back to 1.

    I suggest using layer names instead of numbers, this way if you remove or add any layers, you won't have to change their numbering in your events.

  • Your link shows "Access denied".

    You can run your game in Debug Mode (Shift+F4) and check yourself what happens with the sprite.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies