physics on tilemap crash which i dont understand why

  • Problem Description

    ____ my sprites have physics and my titlemap i added physics so the sprite wouldn't fall though the titles but when i remove a title with physics or place a title the game would crash and say Physics_behavior.js:1888:9)

    If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

    Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 33554432, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

    Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 33554432, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

    Uncaught abort() at Error

    at Error (native)

    at fb (http://localhost:50000/Physics_behavior.js:31:26)

    at ua (http://localhost:50000/Physics_behavior.js:417:61)

    at Function.o (http://localhost:50000/Physics_behavior.js:17:91)

    at nc (http://localhost:50000/Physics_behavior.js:167:483)

    at NB (http://localhost:50000/Physics_behavior.js:196:40914) ____

    Steps to Reproduce Bug

    • remove titles
    • place titles

    Observed Result

    ____ game crashes ____

    Expected Result

    ____ game will come up with a error and game will stop working ____

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    ____ windows 10 ____

    Construct 2 Version ID

    ____construct2-r233 ____

  • Tilemaps aren't made to work with physics since they don't move.

    You could try using the Chipmunk Physics behavior, but I would guess the outcome would be the same.

    What can be done is using the Platform behavior on a sprite, and the Solid behavior on your tilemap.

  • newt

    Tilemaps aren't made to work with physics since they don't move.

    You could try using the Chipmunk Physics behavior, but I would guess the outcome would be the same.

    What can be done is using the Platform behavior on a sprite, and the Solid behavior on your tilemap.

    I am confused by this since physics behaviour on tilemaps seems to work fine for me (set to immovable of course) and provides a barrier for physics objects?

  • A tilemap is one object, so it's like a sprite with a complex collision polygon, which is fine, until you change the collision polygon.

  • (newt) Oww i see i didnt know titlemap didnt work with physics thanks and i try using the Platform behavior then and i see what happens.

    (DankP3) my Tilemap is set to immovable but after a certain amount of titles remove or placed it would just crash it has confused me a lot xD .

  • Ok, so I reread, you are changing tiles in gameplay!

    With static tilemaps I haven't had a problem.

  • You should be able to fix it by selecting the non asm.js physics setting in the project properties. That error is cased by asm.js only being able to use a fixed amount of memory and when you create a lot of new physics objects (like changing a tile does) then eventually it will run out of that fixed amount of memory.

    Now it could be argued that the memory management of the asm.js version of physics is broken, since even if all the physics objects are recreated every frame, then the total amount of memory needed should be the same.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks that seem to have worked. that issues was really annoying so thanks .

  • Having said what I said, I have just found a browser specific fail with key presses when physics tilemaps are present - will make a capx and file.

  • Closing as nothing we can do without a .capx. That error should not normally happen unless you use a great many physics objects, though.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)