R0J0hound's Forum Posts

  • QuaziGNRLnose

    So you only flip it in IE / FF? That's interesting since I needed to flip it in chrome, at least on my computer. Webgl support for my graphics card is dying off in the other browsers so I can only test in chrome currently. Unfortunately it appears to not be flipped on another users system across all browsers, so I'm at a loss atm. I'm thinking it possibly could be graphics card related? I'll let you know if I find any solution, since as of right now it has the same effect as what you're doing, drawing the quad inverted.

  • TiAm

    Well that's not very encouraging that it's mirrored and flipped, but you say it's the same across all the browsers IE, FF and Chrome with webgl on? I'm using chrome since that's the last browser that still supports my graphics card. What graphics card do you have? Maybe it's graphics card related (I have an Ati)

    If it's flipped or mirrored for anyone else let me know which browsers and graphics card if you could.

  • TiAm

    Re-download the c2addon, I added a "Load from canvas" action that copies the canvas to the paster's texture. The resulting resolution will be WindowWidth x WindowHeight. Not sure if it's faster, but you can do everything on the same tick you load.

    Somebody

    This may be useful for you for saving part of the window at any size image you want.

  • Try Construct 3

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

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

    I found a solution for upside down texture loading that may be helpful to you. I'm using it in the case of loading a html5 canvas to a texture. I set it, load, then unset it so no other image loading will be affected.

    glw.gl.pixelStorei(glw.gl.UNPACK_FLIP_Y_WEBGL, true);

    this.texture = glw.loadTexture(canvas, false, this.runtime.linearSampling);

    glw.gl.pixelStorei(glw.gl.UNPACK_FLIP_Y_WEBGL, false);

  • You can toggle the condition and the event (box around the condition) seperately

    Click on the box around the condition text so it highlights and right click->toggle disabled. Then if the condition is still disabled click on it so the event box is no longer highlighted and right click -> toggle that.

  • Updated to version 1.2:

    * Bugfix: Once a force was applied to an object it could never go to sleep. spongehammer thanks for the bug report.

    * Added actions and expressions for more control over sleeping:

    • sleepTimeThreshold, the amount of time an object has to be idle before going asleep
    • idleSpeedThreshold, the maximum speed an object can be going and still be considered idle.

    *Added "Prevent rotation" property that keeps objects from rotating when colliding. (Basically Infinite inertia) mattb

    • Also added an action to set it and a condition for it.

    * Added conditions "is enabled" and "is immovable" as well.

    * fixed the mass and inertia expressions to return correct values when the object is immovable or unrotatable.

    -cheers

  • Somebody

    The only way you could get that error should be if you paste a paster object to itself, since that's not allowed in C2's renderer. I can't reproduce it with your events but I can by pasting the object to itself. I don't think I can fix it in the second case since that's a requirement of the renderer, but I might if you're doing something else.

    You need to use the "set resolution" action to set the image size. If you place the paster objects in the layout editor they will automatically use a image size the same as the object's size, but if you set the object size in events the image size remains the same.

    I did notice the line numbers in the error is off and it looks like I forgot to upload some updates, so you can now re-download the c2addon and see if that helps. The main change was it fixed pasting when the paster object has a negative width.

  • It was kind of an arbitrary decision, either library would've worked. Box2d is already used in C2 and CC so I thought I'd try chipmunk instead. It's due to some bias too since I've only coded with chipmunk and my only exposure to box2d was the behaviors, which have some quirks that make then unwieldy sometimes. But to be fair the quirks are probably due to the way the behavior was written instead of how box2d was written.

    The actions to add joints are pretty much the same as the js functions to add joints. The only thing I added to them was the ability to use either rectangular or polar offsets.

  • I don't see an issue with installing third party plugins. Making plugins official would just transfer the burden of maintaining the plugins from the third party developers to basically Ashley, which I don't think would be a good trade off. It would require a lot of time to debug and add features since he'd have become familiar with what the code is doing. More likely the plugins would be made from scratch with differing features in mind so it would be different.

    And while I'm flattered that a few of my plugins/behaviors were mentioned I'm happy to keep updating them myself.

    Worst case if a new C2 update breaks my plugins a fix may take a bit to come out.

    TiAm

    By auto-rest state do you mean sleeping? If so the behavior already has that. Look at the "is sleeping" condition.

  • Here's an example of fisholith's idea with some random control scheme. It works quite well.

  • Somebody

    Family's can only have objects of the same type. So a family of Sprites, a family of TiledBgs or even a family of Pasters. Different plugin types can't be in the same family.

    If you need it for the move behind function then here's a solution to that:

  • Here's a function to take an object by uid and move it behind another object by uid.

    It handles sprites and tiledBgs but hopefully you can see how other plugin types could be added.

  • You can do this:

    1. save the x,y of the clicked object in some variables.

    2. pick all the sprites and check if the points overlap a sprite at offsets x+32,y x-32,y x,y+32 x,y-32

    3. If all four offsets pick a sprite then don't destroy the clicked object.

  • Somebody

    Oh cool, thanks for the icon.

    With the Draw Quad action the first coordinate in the top-left and the others are in clockwise order.

    So top-left, top-right, bottom-right and bottom-left.

  • Somebody

    You can do that. The only thing to consider is each instance will have it's own texture. It's not really an issue unless you run out of video memory.