dop2000's Forum Posts

  • Setting the fullscreen quality to High fixes it for me.

  • Can you share a sample project file?

  • 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;
     
    }
    
  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • From what I've learnt the picking algorithms vary depening what you do in you function and if you use "for each" loops.

    I don't think that's true. As I wrote in my previous comment - picking the array instance should be the first condition!

    Pick, then loop through the array. It doesn't matter if you use "for each X" or a system "for" loop. And you don't need to pick the array again inside the loop.