Jump to content

Chris Paulson

Members
  • Posts

    134
  • Joined

  • Last visited

Posts posted by Chris Paulson

  1. I haven't done it yet but I believe you do this:-

     

    Create body/physic shapes to match bones. ie. cylinders for arms legs etc sphere for head.

    Create joints between physic bodies to imitate joints of real body.

     

    At rag doll time match all joint positions to current animation and let them fall.

     

    As they fall match all joint rotation with rotations to the bones in the skeleton of the body.

  2. Wouldn't that only prevent a particular section of my[/code] to be thread safe? Say I make the entire Update method mutually exclusive. The first time the method is called it gets a lock. A second call would wait until the lock is released but I never make a second call to Update.

     

    Maybe I get how mutex' work wrong. If I encapsulate all LW calls in a mutex, would that prevent LW commands from getting called concurrently? If I have two threads executing a different method but still calling LW commands from those methods, wouldn't I still be calling LW methods concurrently, even if I surround those methods in a mutex. If the former is the case than I can never send a packet from the main loop and listen for incoming packets (WaitNetEvent) in a second thread, making the entire library useless.

     

    I think however that is not how it works. It would only prevent my code getting called twice which I am not doing anyway.

     

    Thanks for the response though!

     

    Indeed - you can have no LW command issued in a thread while another LW is occurring in the main thread.

     

    You handle it this way:-

     

     

    mainLoop:-
    {
     gameLogic(with non LW commands)
     mutex(LW) 
     {
        updateworld
        networkstuff
        renderworld
     }
     render none LW stuff
     flip
    }
    
    thread:-
    
    loop:-
    {
      non LW commands
      mutex(LW)
      {
         LW network commands - which cannot block or wait
      }
      sleep
    }
    

  3. I'm using SDL_net, because I need SDL for many other things which LE doesn't support also, like Joysticks, Forcefeedback, Console Controllers, etc...

    With SDL_net I have reliable and fast cross-platform UDP networking.

     

    Have you managed to get SDL and leadwerks to render to the same window? If so I'd like to see example code (sorry to hijack the thread).

     

    Threading with mutexs around LW commands would be best way to handle networking using LW commands. The boost stuff is good for threads, I've got example code if you need it, although not with network stuff.

  4. I would stay away from neural nets, they are for academics not real world games.

     

    Check out: -

     

    http://gamma.cs.unc.edu/RVO2/

     

    http://digestingduck.blogspot.com/2010/10/rvo-sample-pattern.html

     

    Also:-

     

    http://aigamedev.com/insider/discussion/motion-planning-thoughts/

    and

    http://aigamedev.com/open/articles/simulating-crowd-flow-dynamics/

     

    but you'll have to register to see these, but if you're doing a game with real game play you should already be registered...

  5. Hey, you're back :P

    How is your IK project? You worked on blending, as i remember?

     

    It's still ongoing and it's getting closer. I've redone my navmesh code to get rid of opensteer and use the new RVO/steering in recast as it handles crowds better.

     

    My character can walk around and place it's feet on the terrain with 80% success. I just need to handle extreme slopes and stairs better.

     

    The blending of idle/walk/runs are now fairly smooth with minimal foot sliding.

     

    There's still plenty of work to be done and it all comes down to how much time I can find. I crashed my rally car this weekend so I need to spend time on repairing that :(

  6. For me I find one limiting factors is the amount of artwork available especially decent animated characters/models available with a workable amount of animations.

    I search the internet for decent stuff but I only ever find models that have about 10 animations which is about 90 short of what you really need.

  7. This is an untested idea which is complicated but might work.

     

    1) Place camera high (some height depending on grid resolution needed) in sky pointing at ground. Place camera in orthogonal view mode?

     

    2) Render scene to texture/buffer

     

    3) Process depth buffer - this giving you a height map grid (not sure how this is done - this is the tricky bit)

     

    4) Set rain emitters to only fall distance from camera height to height in height map grid

    • Upvote 1
  8. Hi,

     

    I'm still working away on this sort of stuff in the background. I've not posted anything about it because I've not made lots of progress until recently.

     

    I'm hoping if I succeed to put a video together on this in about a months time and I'll release all my code.

     

    There should be some nice blended animation and foot placement stuff in it. I've done the blend trees I just need to incorporate it into my overall game system then do the IK foot placement.

     

    I've got a blend system that will blend and play:-

     

    idle, walk/run, walk left/right, crouch walk/run, crouch left/right all at the same time depending on speed/angle/crouch factor.

  9. The animation system/blend tree system in UDK is very advanced.

     

    It would take a lot of effort (which I'm currently trying to do) to replicate something similar in leadwerks.

     

    When I say a lot of effort I mean 1000's of lines of C++ code not just some noddy lua scripts!

  10. Yes 1 is light I did try other settings but I found it difficult to get any kind on decent balance.

     

    I kind of thought 1 meant 1 kg so that's really light. I did try 800 (still really light) and up the other values but that didn't help either.

  11. Hi,

     

    I thought I'd have a little play with doing a vehicle based on the monster truck lua stuff. The suspension appears to behave like a March hare on a pogo stick after dropping a few disco biscuits.

     

    Any idea what good addtire and mass settings are? I tried lots and lots of settings but couldn't improve the situation.

     

    Everyone else seems to use: -

     

    local springconstant=25.0

    local springdamper=115.0

    mass = 1.0

     

    but this doesn't give the quality I'd expect.

  12. The dividing into cycles is simple compared the usual stuff. Have a look a aigamedev web site etc. They use complicated maths such as point clouds and interpolation, my project is much simpler.

     

    Also read rune's thesis.

  13. I would use a method similar to how terrain is done but instead of it being 2d make it 3d.

     

    ie make you level made up out of a 3d cube grid/mesh (like a Rubik cube) and take a piece away when it's mined, like removing a block from a Rubiks cube.

     

    Its then down to how you make the removed space appear, you could place different shaped rough stone/mud to fill the edges.

  14. Good job at getting my code working so far.

     

    The IK stuff needs at lot more work on it to get it working. It needs to the following: -

     

    predict the next foot placement

    do a line pick on it

    Work out a height to place model/hips

    IK adjust both feet to meet correct floor height (determined by line pick)

     

    I halted work on IK stuff to get the blend tree code working, as this would effect the next foot placement.

     

    The first picture is showing a bug as it says the stance is "unknown", I have already fixed this bug in the animation analysis code.

     

     

    I really didn't think you'd get your head around my code so fast, amazing.

×
×
  • Create New...