Prominent's Forum Posts

  • What's wrong with using Tiled..? I still don't understand.

  • getting another error when I try to add a joint

    TypeError: Cannot read property 'inst' of undefined

    at Exps.jointOtherUID (http://localhost:50000/rojoChipmunkBeta ... js:7921:36)

    at ExpNode.eval_object_behavior_exp (http://localhost:50000/expressions.js:333:29)

    at Parameter.get_exp (http://localhost:50000/eveng.js:2049:19)

    at Condition.run_static (http://localhost:50000/eveng.js:1297:41)

    at EventBlock.run (http://localhost:50000/eveng.js:866:46)

    at EventSheet.run (http://localhost:50000/eveng.js:224:7)

    at Runtime.logic (http://localhost:50000/preview.js:2404:36)

    at Runtime.tick (http://localhost:50000/preview.js:2066:8)

    at tickFunc (http://localhost:50000/preview.js:629:38)

    the object is set to -1 because i'm using layout coordinates(it's set to layout)..

  • javascript error!

    uncaught error: assertion failed: this addition/removal cannot be done safely during a call to cpSpaceStep() or during a query. Put these calls into a post-step callback.

    How do I delete joints on post collide? I get that message when I try to do that. Not sure how to get around it.

  • I'm wondering if this will fix the issue with libudev.so.0 ? https://github.com/nwjs/nw.js/wiki/The- ... budev.so.0

  • R0J0hound , ah cool. The way the map polys are organized is interesting- That's a good point about the possibility of objects getting trapped if they were polylines- If anyone really wanted to use lines instead, they could generate that themselves anyway I think.

    Any plans for a document or something where all the nuances of the behavior can be found?

  • Somebody , thanks!

  • 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.

    You have to move it both in the x and y axis one pixel to remove the issue completely. Doesn't seem to matter which direction either.

  • Here's a quick gif showing it in action.

    You can have as many different container styles as you want.

  • Inventory System — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/inventory-system-605

    <p>Create containers and items. Items can act like containers, example: a bag. Containers can be customized any way you want, with whatever margin sizes. Item size can be adjusted. When creating containers, you can specify if resizable, movable, and more. Items can be created inside or outside containers, moved, etc. This system is suitable for any type of game that needs an inventory.</p><p>setupContainer(Container.UID,slotLimitX,slotLimitY,showXslots,slotYslots,pixelwidth,pixelheight,resizable,movable,visible)</p>

    • Container.UID - The uid of the container that was created that this function will set up(Create a container object first, then use it's uid).
    • slotLimitX - slots wide.
    • slotLimitY - slots high.
    • showXslots - slots wide to show.
    • showYslots - slots high to show.
    • pixelwidth - If showXslots equals 0, container's width will be set to this.
    • pixelheight - If showYslots equals 0, container's height will be set to this.
    • resizable - 0 for no resizing, 1 for resizing(click and drag edges of container).
    • movable - 0 for unmovable, 1 for movable(click and drag container).
    • visible - 0 for invisible, 1 for visible

    <p>setupItem(animation,posx,posy,quantity,connected container uid(-2 none),in container uid, slotx,sloty)</p>

    • animation - The animation within the Item sprite.
    • posx - coordinate to place item if it isn't being placed into a container.
    • posy - coordinate.
    • quantity - the item quantity.
    • connected container - the uid of the container that this item will open and close (use a value of -2 if there isn't one since -1 is used in the container data array).
    • in container uid - If this item will be placed in a container then put the uid of container.
    • slotx - the horizontal slot (1 for first column).
    • sloty - the vertical slot (1 for first row).

    <p>toggleContainer(Container.UID)</p><p>destroyItem(Items.UID)</p><p>destroyContainer(Container.UID)</p><p>addToContainer(Items.UID,Container.UID)</p><p>dropOutItem(Items.UID,posx,posy)</p>

    Use this topic to leave comments, ask questions and talk about Inventory System

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound , appears as if bodies don't drop through.

  • mattb , thanks!

    also, here's a shot of the tile issue- I think this shows what's happening more clearly.

    [attachment=0:v5zeloow][/attachment:v5zeloow]

  • mattb , seems like the line isn't hitting one of the tiles in the tilemap- looks like a bug. Just tried it with the 1.5 version as well. Seems like it happens when a tile shares a corner with another tile and isn't flush with any other tiles.

    My guess is it's due to the way the lines are being generated? I know that you could essentially create lines around each tile, and then if a line overlaps another line in the opposite direction just remove one of them.. Then cycle through all and if one line extends from another line, add the length of one to the other and then delete the shorter one.. In the end, you'd have the lowest number of lines constructing the collisions for the map.

    you could probably do the calculation before making the lines too..

    edit: actually, you'd remove both lines if they overlap in opposite directions..

  • By the way Rojo, the raycast query doesn't seem to work if chipmunk is used as a family behavior. Not a big deal but I thought I'd mention it.

    That is a big deal if it's true, because families are an important feature. Any more info on this?

  • cool, tilemaps.. Hope you provide some detail on how that is handled once you get it sorted how you want it- I'd be interested in knowing how it works. One thing that has me wondering is if the tilemap will get updated if the tiles change during runtime(if you erase or add tiles).

  • I believe the collisions use vectors, and they span across multiple tiles if the edge of one tile continues with the edge of the next- so multiple tiles may share the same vector that has the collision.. Finding the collision point on the vector would help, but I'm not sure how to get that, and it would probably depend on what is hitting it.