R0J0hound's Recent Forum Activity

  • The library to use depends on what file format you want to play. Taking that adpug link I posted and tweaking the js it uses a bit results in the attached capx. It uses the same method as my mod player capx'. All it does is play any file you specify. Any other features would require delving deep into the source to: A find if such a feature is possible and B. figuring out how to use it.

  • Very cool. Making a loader for a file format is always something fun to do.

  • Here's a general tutorial about that sort of thing:

    http://69.24.73.172/scirra/forum/viewto ... lit=3D+box

  • The next step would be to make a plugin that runs the js code necessary to start playing sound. The js libraries usually have a working example that you'd mostly copy.

  • Try Construct 3

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

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