R0J0hound's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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:

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

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound