Results 1 to 9 of 9
  1. #1
    sgthale is offline Member
    Join Date
    Apr 2011
    Posts
    48
    Rep Power
    0

    Red face Physics Engine making constraints

    So im making a game and currently working on a simple physics engine. Can anyone help me how to make rigid constraints? As in fixing 2 points to a certain distance from each other and then from there making a ragdoll body. I know its a big question but id appreciate it if anyone posted their thoughts in at least pseudocode.

  2. #2
    Skiller is offline Member
    Join Date
    Jan 2011
    Posts
    67
    Rep Power
    0

    Default

    How familiar are you with the workings of physics engines?
    Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.

  3. #3
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    This would definitely not be a intro to java question.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

  4. #4
    Jodokus's Avatar
    Jodokus is offline Senior Member
    Join Date
    Jan 2011
    Location
    Amsterdam, the Netherlands
    Posts
    230
    Rep Power
    4

    Default

    You have to provide more detail. Are you working 2D or 3D? Are you just experimenting with physics: very informative to try in Java.
    But if you seriously try to make an engine: they are huge and complicated projects often made in a language like C++ and called from Java (and probably better then your own).
    Try to see the interfaces of Physics engines like ODE or JBullet to get the idea of what is needed, you can then make your own selection for a "simple physics engine".
    Make some effort and then pose specific questions here when you are stuck.
    Last edited by Jodokus; 04-17-2011 at 12:18 PM. Reason: spelling

  5. #5
    sgthale is offline Member
    Join Date
    Apr 2011
    Posts
    48
    Rep Power
    0

    Default

    well i have made a physics engine and sorry but i forgot to include that its 2D. My current way of doing constraints is simple taking 2 points, finding their midpoint and then making them have the same distance from that midpoint at the same angle they face each other. It works well but if i do it with multiple lines of with this constraint, I get wobbly lines. So i was looking for a better way to make constraints.

    Also for the not intro to Java, well i just thought making constraints was simple

  6. #6
    Jodokus's Avatar
    Jodokus is offline Senior Member
    Join Date
    Jan 2011
    Location
    Amsterdam, the Netherlands
    Posts
    230
    Rep Power
    4

    Default

    I'm may be too sleepy, but I just don't understand what you want.
    I'm figuring a kind of puppet on a string now. What are the constraints, what are the two points, what are the same angles? Is it the puppet moving symmetrically? Is there gravity? What makes it move? Is the constraint that it can't reach its toes? :confused:
    You understand, I'm lost, but maybe to someone else it is clear.
    Try to post idea's and some code that you have, and point out what is not working as expected.
    (preferrably a SSCCE)

  7. #7
    sgthale is offline Member
    Join Date
    Apr 2011
    Posts
    48
    Rep Power
    0

    Default

    Okay ill narrow down my question to what i need help with: How would you make a solid fixed constraint between 2 points on a 2D plane....


    [EDIT] ill take it to advanced Java
    Last edited by sgthale; 04-18-2011 at 04:05 AM.

  8. #8
    Jodokus's Avatar
    Jodokus is offline Senior Member
    Join Date
    Jan 2011
    Location
    Amsterdam, the Netherlands
    Posts
    230
    Rep Power
    4

    Default

    I can feel your despair, but I don't think it's a good idea to break the thread. People then miss the bright narrowing down of your problem. And "they" are not more clairvoyant "over there". Only now I get the idea that it has something to do with collisiondetection because of the word "solid". I think you should give the information to not make this a guessinggame. Of course you can politely tell me that I'm a to slow thinker and to please back of. Then hopefully the others will jump in.
    Again: provide a clear idea of the problem and your solution, and some code that is not performing as expected.

  9. #9
    sgthale is offline Member
    Join Date
    Apr 2011
    Posts
    48
    Rep Power
    0

    Default

    Okay well I am not worrying about the collision detection right now. I am just simply looking for a way to constrain 2 points to a fixed distance.

Similar Threads

  1. Wall bug on physics simulation
    By mustachMan in forum New To Java
    Replies: 2
    Last Post: 07-14-2010, 05:56 AM
  2. Time constraints on object state
    By Flipke in forum New To Java
    Replies: 4
    Last Post: 04-11-2009, 06:12 PM
  3. H2 Database Engine 1.0.77
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 08-20-2008, 02:33 PM
  4. H2 Database Engine 1.0.74
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 06-24-2008, 03:12 PM
  5. H2 Database Engine 1.0.62
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-27-2007, 08:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •