Ashley's Forum Posts

  • Take a look at the guide Supporting multiple screen sizes. If you want to support different aspect ratios, the scale inner or scale outer modes are probably what you want.

  • Browsers sometimes start pages muted until a "user gesture" (i.e. any kind of input from the user) in order to prevent abuse. Construct does try to start audio playback in "gamepadconnected" events, which is an event that fires when you first press a button on a gamepad, and IIRC it is supposed to be an allowed way to start audio playback. However it doesn't look like it works in Chrome - it still blocks the audio playback. I filed an issue with Google about that - presumably they'll need to fix that before it works.

    Note roden1 - the style of your post is very much like an AI chatbot (and the em dash is a pretty good giveaway). Please see the Forum & Community guidelines: posts generated with AI are not allowed.

  • Device-specific graphics glitches are usually caused by bugs in the graphics driver (part of the system software), rather than Construct or the browser. The best thing to do is check for any available system software updates and install them, or check for an updated graphics driver for the device if one is available. You could also try changing some graphics-related settings to work around it - for example you could try disabling WebGPU in Project Properties, in case using WebGL rendering avoids the problem.

  • Maybe check your Internet connection is working correctly?

  • Without knowing more, I'd say you want to use CSV for dealing with CSV data, and Local Storage for storing data.

  • That shouldn't happen. Those are all normal setters and getters that are updated independently of the texture, and calling getTexture should have no effect on them, as updating the texture just does what it says on the tin: it updates the texture using the latest settings, and doesn't change anything else. Perhaps you got confused by something else in your code, or perhaps there's a bug, in which case you should file it the usual way on the tracker.

  • I don't want to re-explain the entire situation, but I do want to point out a major motivation for this was that SDK v1 addons were routinely responsible for ruining people's projects, risking wasting the work of thousands of customer's projects that in some cases they had worked for years on. We provided well over a year for addon developers to update their addons, including providing documentation covering the porting process, and making a range of changes and updates to SDK v2, including implementing a range of feature requests. We also created the LTS release channel in part to help with this process: you can still use SDK v1 addons in the r449.x LTS releases which are officially supported up until the end of next year.

    This is not a decision we took lightly but it is essential for the future reliability of Construct and for customers to be able to trust the addons they install, and I'd say that we've actually done a lot of work to try to ease the transition.

  • FWIW, Firefox 145.0.1 has now been released and fixes the bug that was affecting Construct, so if you make sure Firefox is up-to-date it should be working OK again.

  • Well, if you want to preload them on the main menu, then you still download 600KB before the game starts. The only difference is when you download them. If you enable offline support, everything will be downloaded on startup anyway in order to save it for use offline, so in that case it's a moot point.

    Construct doesn't currently have a way to automatically preload all sounds, but I'm not sure if it really needs one. If you want to start the project running sooner before downloading everything, a loader layout is probably a more effective solution, as that can start the project running before all images are downloaded, and usually the project images are the majority of the download size. If your main menu is a single layout, then you can make that the loader layout, so then you can show the menu before the entire project has finished loading.

    Besides these days 600KB is a small amount of data. Loading the Apple homepage is a 10 MB download. Even on cell data, with a half decent connection it'll probably add less than a second to the load time.

  • It'd be nice if people credited Construct as the tool they use in games they publish, especially if they do something like show a "Made with Construct" logo on startup. We don't require that though, nor do we want to require it for paying customers. I understand if people want to focus on the game they're making rather than the tool they used, but if you want to help us out, don't forget to mention the tool!

  • File System doesn't work with full absolute paths, mainly because those aren't supported in browsers. Everything is basically a relative path to a root folder, which is either a known folder, or something the user picked with a dialog. The picker tag "<app>" corresponds to the NWjs.AppFolder expression, so you can use that with a folder path of "Mega/runmega.bat" to refer to the same path.

    On Windows the File System 'Run file' action comes down to a call to CreateProcess. As that is a direct API and not a shell I think that means you don't need to worry about adding extra quotes around the file path - it should just work as there is no ambiguity as the path is passed as its own separate argument, so it should just work even when the path contains spaces (and the documentation does not say anything about having to do anything different for paths with spaces). However if you pass arguments those must still use quoted paths as arguments are normally separated by spaces.

    Another option in case it helps is the 'Run file' action allows leaving the picker tag empty, and then you can pass a system executable like "cmd.exe" in the folder path. So you can do something like 'Run file' with picker tag "", folder path "cmd.exe", arguments "/c ""path\to\batch\file.bat""". But note cmd.exe is specific to Windows.

  • This is one of those times I have to ask: why are you trying to do that?

    Construct doesn't support this because it's a really ugly thing to do - as noted it will sometimes look absolutely horrible, such as on an ultrawide monitor. Even if it only does a slight resize, it will make a mess of your artwork: with linear sampling it will make everything look slightly blurry, and with nearest sampling it will look uneven.

    Construct supports letterbox mode with black bars, which should work fine under basically any circumstances. Pick a common aspect ratio and many people will never see black bars down the sides. If you really want to fill the entire window with different aspect ratios, you can use the scale inner/scale outer modes, but that means adapting the project to handle different aspect ratios.

  • We don't publish games ourselves, we just build the tool to develop the games with, so it's not something I've personally tried. We use development tools like the Steam Devkit client to test things work but we don't usually use the full publishing flow, because we don't have anything we actually want to publish, and because it's extremely rare that any issues come up only after publishing - the development testing virtually always catches anything wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you want the layer cssPxToLayer method. There's sample code in the Input event position example.

    Your original code sample includes nonexistent methods. There is no such layout method named _canvasToLayer, nor is runtime.input._setMousePosition a valid method. If you used AI to generate it then it's probably just made all that up and given you broken code, which is a pretty typical result unfortunately.

    Consider using TypeScript which will show an error if you get something like a method name wrong, and autocomplete will list all the available methods. Here's the TypeScript version of the input event position example.

  • Just check 'Preload sounds' in Project Properties, and it does that for you while loading.