R0J0hound's Forum Posts

  • Here's a way to find all the tiles a box object is currently overlapping.

    If you want to check against a different collision shape and/or with a rotated shape then try the second one.

    It's also possible to use tiles with non-box collision polys but you just need to set the tile sprite accordingly.

  • Update 1.8:

    * Fixed: changing object shape then attaching a joint in the same frame was positioning incorrectly.

    -cheers

  • You could use something like the separating axis theorem with the collision polygons to find it if you need to.

  • I believe I found the issue. The shape isn't updated till the next frame. I just need to update it if needed when adding joints. It appears to be working, but I need to test a few more things. It should be ready tomorrow.

  • I guess it may be graphics card specific? I don't see quality reduction on my machine.

  • Updated to 1.7a:

    * Fixed: Edittime.js typo

    * Fixed: Error when adding joints on "post collide"

    Prominent

    I can't wrap my head around that resizing then adding a joint bug. For now waiting a tick before adding the joint to the resized object works. I'll have to re-visit it later.

  • Thanks for the bug reports. Looks like I need to beef up my testing before uploading updates. I'll get a fix going tomorrow and it should be very fixable.

  • The system ACEs are hard wired into the exe from what I can tell. The cr namespace is in the common_prelude.js file as I recall.

  • Updated to version 1.7.

    Download link in first post.

    * Fixed: Crash with jointOtherUID expression when joint was connected to world (-1).

    * Fixed: "On pre step" and "On post collide" would crash if physics objects or joints were added and removed in the condition.

    * Added: "area" expression now works with tilemaps

    * Change: Tilemaps now use the "Collision Shape" property. They now support None, box and polygon. Circle and segment will be treated like none.

    * Change: "Set collision shape" action works with tilemaps as per the above.

    * Fix/optimization: Chipmunk objects will not needlessly update shapes if disabled.

    Prominent

    Thanks for the bug reports as always.

    -cheers

  • Prominent

    I do need to make some docs with examples in one spot. It's on my todo.

    The chipmunk library won't let you destroy shapes or joints under post collide. You could do the actions after a wait action for now. I'll try to work up something so that's done automatically in the plugin.

    Ah, I missed something there with joints. Thanks for the report.

    TiAm

    I saw that. There are some nice additions for sure. I may try my hand at updating the js port to include them. That vector processing stuff likely isn't usuable though.

  • 2048x2048 is just the text I used, however the error will occur if the texture size is bigger than what your system supports.

  • Updated to version 1.6.

    Download in first post.

    * Fixed: The "Query closest line segment" condition would fail to hit some tiles of a tilemap. See note [1]

    * Added: Changing a tilemap with this behavior will now update the collisions. NOTE: If the tilemap also uses C2's included physics behavior then whichever behavior runs first will update, the other won't.

    * Change: The "imagepoint" option for attaching joints now attaches to the "origin" if 0 is used and the Center of Mass (COM) if -1 is used. Previously 0 would use the COM. spongehammer

    Note [1]:

    Prominent mattb

    The bug would occur if PointA x was the same as the left or right of the tile, or if PointA y was the same as the top or bottom. Strangely enough the bug is also present in the original c library too.

    Also I don't generate the collision polygons for the tilemap. I use the polygons that the tilemap provides, which looks very decent.

    If I instead used a polyline instead of boxes there would be the possibility to get stuck inside.

  • Try Construct 3

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

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

    When you use "imagepoint" it just takes an imagepoint number. So 1 for the first imagepoint, 2 for the second...

    0 currently uses the object's center of mass instead of the origin. The built in physics does this, but I think it may not be very intuitive. Thoughts?

    So with "imagepoint" use

    1, 0 for the first imagepoint

    0, 0 for the center of mass

    If you use "layout" you can use:

    Sprite.ImagePointX(0), Sprite.ImagePointY(0)

    or

    Sprite.X, Sprite.Y

    Prominent mattb

    It looks like a bug in the js library itself, so it may take longer for me to debug. If you move the tilemap 1 pixel to the right it works flawlessly, oddly enough.

  • I'll look into it tomorrow, it's probably some typo in my code. I'm guessing the shape for that tile wasn't created. Can a body drop through it?

  • Updated to version 1.5

    Download in first post.

    * Change: Renamed the conditions in the "Query" group to with more intuitive titles.

    * Fixed: query conditions now work with families.

    * Fixed: some of the query conditions were not working with concave polygons or tilemap.

    mattb

    That's a cool example. Also thanks for the family bug report.

    Prominent

    It's now fixed.