R0J0hound's Forum Posts

  • You can set the position and size of the video at any time with:

    windll.user32.SetWindowPos(fwnd, 0, x, y, width, height, 0x4)

    Here's all the nitty gritty about that function.

    https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

  • You could create multiple arrays and think of each array as a row. Then it can be irregular.

  • Lange

    You need to destroy fwnd instead of hwnd. hwnd is the game window.

    windll.user32.DestroyWindow(fwnd)

    I don't know if any other cleanup may be needed.

  • Prominent

    The slowdown is from a memory leak somewhere that's preventing stuff from being garbage collected, but I haven't had much luck identifying where, although hearing that restarting the layout speeds it up is helpful to know.

    Negating gravity was the main purpose for pre-step. There may be other uses, since the chipmunk library has it too.

    Joints in the chipmunk library are velocity based, which means they change the connected bodies' velocity so that the joints match up. The pin joint in your capx from best I can tell does a better job than just setting the object's position. Without the pin joint you're just transporting a free-falling object, so the y velocity would always be increasing and make it swing more. Maybe you could pin to an immovable object and move that if you want the pin point to move.

    With physics libraries it's generally better to constrain objects with joints than setting position and velocities. At least from what I've seen.

    bla6546

    It already has angular velocity.

    "surface velocity" may indeed be useful, I'll put it on the todo.

    A kinematic body is just a body not affected by gravity, correct?

    For that you just undo the gravity in a "pre-step" condition like so as I recall:

    Pre-step:

    Apply force rect(0, -Self.Chipmunk.mass * Self.Chipmunk.gravityY)

  • Right, forces and impulses are relative to the object, object rotation is ignored. If you want a force/impulse to a particular layout position use polar with the angle(self.x,self.y, posX, posY) expression.

  • That should be right. By definition impulse=force*time. So to get the force dividing by the time (1/30).

  • To me it's just another file format. It looks like it's been ported to javascript here:

    http://www.wothke.ch/AdLibido/

    It likely can be used in a similar manner to the stuff in that other topic.

  • Or you can make the local variable "static" so it saves it's value.

  • There's no plugin but you can play mod files with examples here:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The physics is updated every frame. 1/30 just means the amount of time simulated in a frame.

    It looks like it's just a difference between the libraries. It may be corrected in a newer version of the chipmunk library since it changed it's collision detection code. Unfortunately there isn't an updated js port.

  • anpur

    Just to point out, the same simplifications you did by typing can be done in events by using families.

  • Drawing with effects is currently an incomplete hybrid of how c2 internally draws them. The edge problem likely isn't fixed. The plugin needs to set the proper bounds for drawing.

    I initially had o's instead of zeros in my username, but I lost the password and no longer had that email. It only has maybe 3 posts, and I imagine is a pm graveyard.

  • Somebody

    It uses a texture the same size as the paster object's texture. It's simpler since it can be created once. If the size of the object being pasted in was used the texture would have to be created and destroyed per object pasted. Also it would crash if you tried to paste in an object larger than the supported texture size.

    That being said, I'll probably make it so the second texture will only be created once an object with an effect is pasted to save memory when it's not needed.

  • Fixed the "paste object" action. It was a typo. Now it also uses an object's bounding box to cull instead of it's collision polygon.

    Did the preliminaries for pasting objects with effects and transparency. Not working quite right for some reason, but it'll have to do for now. A side effect is paster object's now need twice as much vram.

    The internal process is:

    1. draw to a blank off-screen texture with an effect.

    2. draw that texture to the paster's texture with opacity.

  • Update 2.2b

    Download in first post.

    Fixed: "idle speed threshold" action was broken.