mistouluf's Forum Posts

  • Hi,

    I'm investigating the possibility of creating a Construct 3 addon for **GPU-compressed textures**, using formats such as KTX2 / Basis Universal and GPU formats like BC, ETC2 and ASTC.

    The goal would be to reduce GPU memory usage for texture-heavy 2D games.

    For example, a 4096×4096 RGBA8 texture normally requires about:

    **64 MiB VRAM**

    Whereas the same texture could require approximately:

    - BC7: ~16 MiB

    - ETC2 RGBA: ~16 MiB

    - ASTC 4×4: ~16 MiB

    - ASTC 6×6: ~7.1 MiB

    - ASTC 8×8: ~4 MiB

    The ideal implementation would allow compressed textures to be used with normal Construct rendering and batching.

    In particular, I would eventually like to support:

    - Sprite

    - Sprite animations / frames

    - Tiled Background

    - 9-patch

    - Tilemap / tilesets

    My main question is about the current Addon SDK / renderer API.

    **Is there currently a supported way for an addon to create/upload a native GPU-compressed texture and expose it as an `ITexture` usable by Construct's renderer?**

    For example, something conceptually equivalent to uploading BC / ETC2 / ASTC compressed texture data rather than creating a texture from an `HTMLImageElement`, `ImageBitmap`, canvas, etc.

    Ideally the addon would:

    KTX2/Basis file

    → detect GPU capabilities

    → transcode to BC / ETC2 / ASTC

    → upload compressed blocks directly to the GPU

    → obtain an `ITexture`

    → use normal Construct rendering/batching

    A second question:

    **Can an addon provide/replace the underlying texture used by built-in objects such as Sprite, Tiled Background, 9-patch or Tilemap?**

    Or are their internal textures intentionally inaccessible to addons?

    If replacing native textures is not supported, another possibility would be implementing custom objects such as `CompressedSprite`, `Compressed9Patch`, etc. However, this would duplicate functionality already present in Construct.

    It would therefore be useful to know whether the renderer abstraction could eventually expose something along the lines of:

    `CreateCompressedTexture(...)`

    with implementations for both WebGL and WebGPU.

    The objective isn't primarily reducing download size — WebP/AVIF already help with that — but reducing **actual GPU texture memory and memory bandwidth**, while keeping textures compressed on the GPU.

    Would this be possible with the current Addon SDK, or would it require a new renderer API from Construct?

    Thanks!

  • [youtube video="[youtube video="

    "]"]**Title:** How can I prevent Physics from moving an object before Event Sheet correction?

    Hi,

    I’m trying to find a practical solution to a Physics issue in Construct 3.

    I have a physics-based object landing on a slope, for example around 45 degrees. Once grounded, my Event Sheet logic prevents it from sliding.

    The problem is that, at the exact moment of contact, the Physics behavior seems to move the object very briefly along the slope before my Event Sheet logic can stop it.

    There is no player input involved when this happens.

    It looks roughly like this:

    Physics simulation

    → contact with slope

    → very small movement along the slope

    → Event Sheet runs

    → velocity/state is corrected

    The movement is extremely brief, but visible.

    An important detail is that the issue seems to disappear when using **Unlimited framerate**, which makes me think the unwanted movement happens during a physics step before my correction code runs.

    What I’m mainly looking for is a way to **prevent that first unwanted movement entirely**.

    Is there any solution for this, for example:

    - running code before the Physics behavior updates;

    - using JavaScript and `pretick`;

    - manually controlling or stepping the physics simulation;

    - creating a custom addon/behavior;

    - changing the physics timestep or update order;

    - intercepting the contact before the solver applies movement;

    - or any other workaround that would let Event Sheet/JavaScript logic modify the object before the Physics step?

    Ideally, I want to keep using the Physics behavior, but have enough control to make a character remain perfectly stationary on a slope without one visible physics step occurring first.

    If this cannot be done directly with Event Sheets, I’m also open to a JavaScript or addon-based solution.

    What would be the recommended way to achieve this in Construct 3?

    Thanks.

  • Hello,

    I am testing GPU memory usage in a Construct 3 Windows/WebView2 export.

    Test setup:

    - One 4K PNG image

    - 3 HTML <img> elements using the exact same src

    - compared with 3 cloned Construct Sprite object types, each using a copy of the same 4K image

    - Windows Task Manager > Details

    - monitored process: WebView2 GPU Process > Dedicated GPU memory

    Approximate results:

    Baseline:

    - Dedicated GPU memory: ~142 MB

    3 HTML images using the same src:

    - Dedicated GPU memory: ~167 MB

    - Increase: ~25 MB total

    3 cloned Construct Sprite object types:

    - Dedicated GPU memory: ~468 MB

    - Increase: ~326 MB total

    The HTML case appears to share one decoded/GPU resource for the same src. However, the 3 cloned Sprite object types multiply the GPU memory usage of the same image.

    Questions:

    1. Is this expected behavior?

    2. Does each cloned Sprite object type always allocate its own GPU texture, even if its source image is identical?

    3. If I instead create 3 instances of one single Sprite object type, will Construct share one GPU texture between all instances?

    4. Is this also the expected behavior for Tilemaps using replaceImage()?

    5. For large 4K decorative backgrounds/parallax without collision or gameplay interaction, is HTML the recommended memory-efficient approach?

    Thank you.

  • Hello,

    I am experiencing a synchronization issue between the official HTML Element object and the Construct canvas when the camera moves.

    The HTML element appears to lag behind its expected position. The faster the camera moves, the larger the visible offset becomes. When the camera stops, the HTML element returns to the correct position.

    This looks like a temporal synchronization issue rather than an incorrect coordinate calculation:

    visible offset ≈ camera speed × update delay

    Minimal reproduction setup:

    A Sprite and an HTML Element at exactly the same position and size

    Both objects are on the same layer

    Layer parallax: 100, 100

    Layer scale rate: 100

    Layer angle: 0

    Z elevation: 0

    Simple HTML content:<div style="width:100%;height:100%;background:red"></div>

    No additional CSS classes or effects

    V-synced framerate

    Camera moved continuously across the layout

    I also tested the project with Use worker enabled and disabled, but it did not change the result.

    The Sprite remains correctly synchronized with the camera, while the HTML Element visibly trails behind it. The problem becomes much easier to see at higher camera speeds.

    It seems that the WebGL canvas and DOM overlay may be updated or composed at slightly different times.

    Is this a known limitation of the HTML Element plugin or the browser composition pipeline? Could Construct compensate for this internally, or update the DOM container at the same stage as the canvas camera transform?

    A speed-based prediction could reduce the issue, but an engine-level solution would probably be more reliable because Construct knows the exact camera position and rendering timing.

    Thank you.

  • In 60fps and vsync enabled, if i do every 120fps (with x seconds condition) ceck collision with paddle, it's simpler?

  • (>> physic2d behaviour add the collision angle expression)

    I have a ball that bounces off walls with a value of 1, but when I try to detect the collision as it bounces off the paddle for a brick-breaking game, it's delayed due to the 60 frames per second limit. I absolutely have to maintain 60 frames per second and use V-Sync.

    To test it, when there's a collision, I disable the ball, and after that, it has already started bouncing. How can I fix this problem and ensure the event triggers precisely at the moment of collision without any delay?

    I need it to make it bounce differently and manually.

    The best way to solve the problem would be to add the collision angle expression, as in lineofsight in raycast mode. The ball doesn't bounce, but when there's a collision, we make it bounce and not before; this synchronizes with the collision detection speed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • anty21ro

    Does your addon only load what's on the screen for optimization purposes?

  • I would like to reproduce the same effect as this demo made several years ago and is not accessible.

    Click button page 4, with the autowave parameter and if possible smoothing, but how does it curve line?

    construct.net/en/free-online-games/water-simulation-25287/play

    dropbox.com/s/pmcjiyl3yn48p5w/1dcwater.c3p

  • Idea for improving construct 3:

    1 - shortcuts to open /close windows (properties, z-order, layer, etc.) or simply focus if it is merged with another and not displayed.

    2 - When you move an event or an event group, if one or more variables exist inside, a message appears, "Cannot drag event here": because cannot find variable...

    3 - a window or a vertical bar, which contains the active views of the scenes and eventsheets to be able to select them more easily ideal with the first idea.

    User for many years, on construct 2 it was already possible to display /hide windows, thank you for your understanding...

  • i don't understand [insert]inserted text[/insert]

    I want to display part of the text in a different direction within the same global string

  • I found a solution: use DrawinCanvas and pixelColor with sprite collision polygon points. I created the project for you.

    This requires:

    DrawinCanvas(getPixelColor),

    Second ShadowLight for collision (pixel color),

    Second player sprite for collision (uses polygon collision points)

    in runtime:

    You can drag&drop light source, move player with arrow key, scroll in layout (work with canvas)

    in editor:

    edit polygon collision, modify shadowHeight individualy (from shadow caster)

    resolution of canvas (not affect detection)

    Youtube (video):

    youtube.com/watch

    Project File:

    drive.google.com/file/d/1kmcNZvUHXezepH6J5YOd325XL5nz10t2/view

  • Is there a way to synchronize the exact position of an HTML element (HtmlElement, Button, List, Slider) with the canvas when it's moved? Currently, there's a constant misalignment.

    For example, if text (canvas element) and button (HTML element) are linked in the hierarchy, moving their position with a c3_event causes this issue.

  • can we use very large map of tilemap without difference performance than tilemap

    loads dynamically according to the camera ?

    For tilemap render and collision (and platform android or pc)?

  • make sprite at pos 0;0 with anchor all except right side, then on start, on hierarchy load or on create > return Y= 0

    After 0.1 seconds start layout = 228 or other (depend anchor)

  • Could you update this plugin? It's hard to do without, I'm still using R449...

    spriter_2d (brashmonkey): construct.net/en/make-games/addons/192/spriter