R0J0hound's Forum Posts

  • sqiddster

    Maybe a shader that draws the circles, since they're in a pattern. But really the gpu should be faster than that, and on my pc it is outside of web browsers.

  • sqiddster

    My best guess is there may be an optimization in the browser for drawing lines with a width of 1. For the best performance with this plugin you'll want webgl set to off. That way it avoids the need to copy the entire canvas to a texture every frame.

  • spongehammer

    Max force limits the amount of force a joint can exert. One possible use is to limit motor force. Also it can be used for situations where a things bind up. Without a max force the objects can break free at a high rate of speed once they're no longer bound up.

  • You could do your own collision detection with some math if you want it to be very precise.

    In the attached capx it does point vs ring with gap collision detection.

    The idea is you can find if a point overlaps the ring if the distance from the point to the center of the ring is between the inner and outer radius' and if the angle from the center of the ring to the point is not within half the angle width of the gap from the current angle of the gap.

    Like most math like this it makes more sense if you draw a diagram of it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:180no4fa]outside position updating is worst then web.js for collision games (as pool ) nothing much different...

    I do not understand.

    damjancd and everyone else with encouraging words to say, Thanks, I'm glad this is useful.

  • Sprites share the same image across instances, so if you change one frame all other instances will change too.

    You'll need to use another plugin to allow each instance to have a unique image. The paster plugin can do this, and I think tiledbg can as well.

    There may be others. Here's where to go to find them:

  • For like your picture you can use cos() to calculate the amount to rotate. Grass directly above and below won't rotate at all, and grass directly to the sides will rotate the most. 10 degrees in the following.

    Set angle to 10*cos(angle(centerx,centery,grass.x,grass.y))

  • mattb

    No it doesn't. It's part of the now free chipmunk2d pro version which isn't really portable like the normal chipmunk2d api.

  • Chipmunks collision response is just spongier than box2d as best I can tell.

  • le Canapin

    map.tileAt() is just getting the tile the projectile's center is currently on, which will almost always be -1 or empty because when it collides with the tilemap only it's edge is touching a tile.

    "on collision" may not be triggered because the physics already resolved the collision and it is no longer overlapping. You'd have to test this to be sure, since I thought that the physics behavior would trigger it directly.

  • heliogame

    The actions you're using to erase/set a tile are using

    Tilemap.TileToPositionX(loopindex("tileX"))

    but the actions are asking for tile column and row not layout x and y. So if you change it to:

    loopindex("tileX")

    it works.

  • Yeah, after creation, outside of the same event or sub-events you have to wait till the next toplevel event to be able to pick the new object.

    More details I've compiled in the past. CC did it too.

  • Arrays have a load action so you can do this:

    Array2: load from array1.asJSON

  • All the plugin does is load an url. Any caching is completely out of it's control as far as I know.

  • Personally I hate populating arrays one at a time like that. Also is the id just +1 from the array index at all times? I'd make a function to initialize in a cleaner way.

    Start of layout

    function call "initGun" (1, 10, 400, 1)

    function call "initGun" (2, 5, 400, 1)

    function call "initGun" (3, 40, 300, 3)

    function call "initGun" (4, 100, 200, 10)

    On function "initGun"

    GunArray Set value at (function.param(0)-1, GUN_ID) to function.param(0)

    GunArray Set value at (function.param(0)-1, DAMAGE) to function.param(1)

    GunArray Set value at (function.param(0)-1, SPEED) to function.param(2)

    GunArray Set value at (function.param(0)-1, FIRE_RATE) to function.param(3)

    And you can also make a comment by adding another parameter that you don't use. ex:

    Start of layout

    function call "initGun" (1, 10, 400, 1, "pistol")

    function call "initGun" (2, 5, 400, 1, "rifle")

    function call "initGun" (3, 40, 300, 3, "shotgun")

    function call "initGun" (4, 100, 200, 10, "pea shooter")

    If I had an immense amount of guns I'd go a step further and add a txt file to the project that I'd load and with ajax and parse the data from it with tokenat().