matriax's Forum Posts

  • Colludium Hi, well i need 1x1 pixel in tilemap(With polygon collision) for perfect destruction and colliders. 2.5 means that in real they will need to be 3x3 minimun if i understand you well.

    The physics default behaviour can handle tilemap 1x1, why the Box2D+ that in theory is an improved version can't ¿? . Yes, at some point appears that error in previous post but can manage them at start, maybe porting some function from there to here?

    Also, please, can you add the demo .capx to the files? Will be great to play around with the different demos to see how all works.

  • Well, just bought.

    The first thing is that i had to erase all the physics behaviours on the project and then i added the Box2D+ behaviour to the TileMap Family and i got this error:

    Also tried to open a new blank project and still the same error message. Nor works on tilemaps for object or family. Tried to change for static, dyanmic and other values and same problem.

    Tried with sprites and works perfect.

    EDIT: Found the bug, with tilemaps with 1x1 pixels to 7x7 pixels not works, for 8x8 pixel size to up works(I mean the Tile Width/height). Can you fix it?

    EDIT2: Tried with my project and only works with tile width/height to 64x64 , mmm i dont know what is happening :S . Seems only works when there is no tiles on tilemap. In the moment you set at least one tile then the error appears.

    ---

    Also is possible that you include the .capx of the demo with all the tests? The one with polygons, comparision, drawing objects,etc... ?

  • R0J0hound yep, worked , thanks! I need to detect the side left-right to add -speed or speed to give the exact angular rotation but now looks much better.

  • I'm using a Tilemap with 1x1 tiles to achieve pixel-perfect destruction. Also i use canvas to read the alpha from sprites and set the tiles on tilemap only on tilesets with 0 alpha.

    I read the info in your page that says:

    [quote:2m6jdq55] If you do use a tilemap, please try not to make lots of in-game changes to the tiles – each time you do the plugin destroys all of the fixtures and then recreates them for the whole tilemap (which might cause jank if the tilemap is large).

    Maybe this is what i mean. Using solids/chipmunk on tilemap i can erase perfectly a 1280x720 tilemap full of destructible objects, but using Box2D at around 30-40% crashes and shows that error.

    This is a video of the prototype:

    Subscribe to Construct videos now

    Any chance to send you the .capx and in your side add your Box2D+ plugin to the tilemap and test if erasing all the destructible objects works or crashes in the same way?

  • Here are the shell bullets on shoot, can't fix the rotations stop after time XD

    In the default physics there is in properties an "Angular Damping" but on Chipmunk only i found:

    Damping = Decrease the simulation of the speed but affects to all objects

    Angular velocity= Is set when the shell bullet creates and keep that velocity always.

    So i made another event that if Angular velocity is greater than 0 = Sprite.AngularVelocity-10,, and works in this way but in no realistic mode, here a gif to show:

    I saw R0J0hound say this on the chipmunk physics thread

    [quote:5yyk5be0]2. applying a force in the opposite direction as the velocity or angleOfMotion.

    But at some point you get negative values, or the velocity is negative and you get positive values, don't know how to detect each case depending of angle of motion / velocity :S .

  • Colludium Your physics behaviour fixes the default physics behaviour problem on creating/destroying lots of instances?

    This error: https://i.imgur.com/H126akC.png

    I was using the physic behaviour on tilemap for pixel destruction but had to change for Chipmunk physics due this error, that seems is a know bug of this behaviour.

    ---

    One of the things i was looking to do is some kind of destruction like the next gif one. I saw your samples on you draw a polygon and this one falls with physics,etc... your physics behaviour can do that? or there is any kind of helper like the platform Box2D+ but for destruction? .

  • Seriously, why do you need physics? Your particles are simply flying, falling and bouncing off the floor/walls. Bullet can do all this. And, I'm guessing, Bullet must be much better for performance.

    Hi, actually my particles are doing that yes, and bullet is enough but i want to do more.

    I want sprites colliding with walls/floor/player, i want that after shot a bullet a shell is spawned in the other side bouncing on the floor. I want some group of objects falling and get breaks on colliding with the floor, bouncing debris(1x1 ,1x2 pixels...) and interact with others,etc...

    I just want keep all the doors open, then will see the limitation of engine, perfomance and what kind of game can be done using the cool stuff .

  • Yep, both things are considered, first just playing around to see all together and check the limitations and see how far can go this prototype. That visuals can wait for the moment . The physics pieces falling is what i mentioned in my last post, but i don't know hot to achieve them.

  • R0J0hound Oh i see! :S

    dop2000 Yes, i did it before for other game, mainly make bounce with an instance variable to know how many times did it and at X bounces disable collision and fall off outside screen to optimize the perfomance, but i really want physics if is possible.

    I was looking for physics behaviours and i found two things:

    1.- Chipmunk Physics

    I saw that in my behaviours list, i searched on forums and was ported by R0j0hound. Is more complicated than the official Physics behaviours but i achieved working for my purposes, in this case i can destroy an entire 1280x720 layout witout problems <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    2.- Box2D+ : https://colludium.itch.io/box2d-plus

    Seems to have nice features and interesting action/expresions. Anybody tested it? Somebody knows why is not on C2? I mean, why scirra guys no added/improved the actual one if seems to be much better in all ways?. Btw, being a paid plugin using it can't share the source code anymore or i can but people should buy the plugin too.

    ---

    In other side i saw this and wonder if can be achieved in C2:

    ( Source: https://twitter.com/wilnyl/status/897599318521249794 )

    Seems a procedural destruction. When a bullet impacts an X area afected, destroy x part i guess and adds sprites poligons with physics matching the form destroyed. I can fake it creating some pieces of tetris and build forms but here are just rectangles that after shot are cutted with some kind of voronoi algorithm maybe?. And then the shape is added to an sprite with physics? mmm, Any idea?

    I'm going to focus on chipmunk physics now to learn how all works and see if there is another limitation i'm missing and organize the code with all the additions that now is mess with families with physics/bullet/chipmunk,etc... XD .

  • Ok. found the first limitation, i don't know exactly why but i guess too much points of collissions for physics.

    https://i.imgur.com/H126akC.png

    This happens after lots of destructions, but happen always. I tried to set all physics values to 0 and other stuff but nothing.

    No matter the layout or how many objects, is when you get X level of destruction this appears, always. With tilemaps using solids i can destruct an entire 1280x720 layout without problems. So, something regarding the physics behaviours.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Added a better explosion and lots of particles and still 60 constant frames. Now the size is 640x480.

    Have to add also particles with physics that bounce on floor and when they velocity is less than X disable collision to disappear on the bottom and erase them to optimize the results.

    Also had an idea on destruction. The image of the explosion make a little more bigger than the erase tile and then the tiles on tilemap overlaped change their state/tile to a red one, to give the feel that zone was burned or similar, i don't know if i'm explaining well XD, btw i will post tonight or tomorrow if can achieve that.

  • At the moment an unique tilemap.

    For breakable moving platforms i will have to create one for each, so will see how many tilemaps moving at the same time and with destruction can manage C2 with shadow caster

    But at the moment all that i'm testing is working with a great perfomance.

  • Just added shadow caster, thought was gonna be a 0 Fps thing but the perfomance looks the same even with a bigger room.

    Next thing to add are custom destruction instead the circle and some particles. I think is looking interesting .

  • Ok, got working using only one canvas:

    https://drive.google.com/file/d/1PCsZN6 ... sp=sharing

    So sprites with pixel-perfect collision based on their alpha <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    have to work with the bullet-shoot because sometimes get stucked and not does the destruction correctly but well just time.

    When i fix this i will try to some crazy stuff if not achieve i will post there what i done to see if somebody know.

    EDIT: The bullet thing is due the speed of the bullet that starts as 64x64 and then when is created i set as 8x8, but seems already "walked" so the stepping/frames makes collide before get on the collision. Just set in layout 8x8 or in events on starts layout, and then depending of the shot make it bigger to avoid this problems.

  • dop2000 Who want a cofee? XDD I can't get the Canvas plugins with alpha working arggg

    One of the problem is that each canvas uses X,Y 0.0 as their hotspot position and they needs to be translated to the layout 0.0 to fit with the tilemap coordinates that is a problem i can't get fixed :S . Also the rezise canvas(Resolution inside the canvas size) not works, when try to resize in any way dissapears.

    This is the .capx

    https://drive.google.com/file/d/1OslraA ... sp=sharing

    (The errors are marked with bookmarks to find easy)

    So due the resize canvas not works after runtime i guess the unique option to achieve pixel-perfect will be using a big canvas set at 0.0 and pass the position of the objects box and look for the alpha if i'm not missing something.

    But, before that i'm gonna still trying other workarounds with the same idea.

    EDIT: Workarounds failed so i tried the Big canvas idea and worked to set correctly the tiles, but seems the expresions to detect the alpha not works, mmm:

    Big canvas:

    https://drive.google.com/file/d/1h44-Hg ... sp=sharing