Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

550 Good

About wildbunny

  • Rank
  1. wildbunny

    An "AABB Physics Engine"

    Hi there,   I wrote a series of articles about the process of creating a 2D platform game which uses AABBs exclusively for collision detection. Here is a link to the article which covered the collision detection and resolution:   http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/   There is some free downloadable source-code linked in the article as well which should get you off to a good start :)   Cheers, Paul.
  2. Hi guys, Just written this article that you might find useful; 10 things which have helped me become a better programmer and be more productive in general: http://www.wildbunny.co.uk/blog/2012/11/01/10-steps-to-becoming-a-better-programmer/ Hope it helps! Cheers, Paul.
  3. Hi guys, Just written a new blog post intended to provoke discussion on ways to deal with internal edges in 2D polygonal collision detection: http://www.wildbunny.co.uk/blog/2012/10/31/2d-polygonal-collision-detection-and-internal-edges/ Cheers, Paul.
  4. wildbunny

    Link to a Game development themed math primer?

    I wrote this primer / reference material a while back: http://www.wildbunny.co.uk/blog/vector-maths-a-primer-for-games-programmers/ Cheers, Paul.
  5. wildbunny

    Dynamic friction 2D rigid body

    First of all you'll need an equation which lets you remove velocity in one dimension via an impulse. If you have frictionless collision resolution working already, you have this equation to hand (you're using it to remove velocity in the contact normal direction). So, next step is to find the velocity component in the tangential direction that you want to remove to create friction. * Form the tangent vector using the perp operator on the contact normal * Get the relative tangential velocity by dotting total relative contact point velocity against the tangent vector * Now, you can then generate an impulse to remove some or all of this tangential velocity (most text books say the magnitude of this impulse should be bounded by the magnitude of the normal impulse, but if you just want infinite friction, remove the whole lot) Job done
  6. Take a look at my little multi-player version of Asteroids, the mechanics are actually quite similar to a racing game where the cars have weapons: http://mmoasteroids.wildbunny.co.uk/ If there's anyone else playing when you try it you might be able to see the mechanics you're after working. My server is authoritive over everything except the position of each player; but to mitigate the inherent problems with that, the server simply clamps the maximum speed of each player so no cheating is possible. I simulate on client and server - the only thing I don't do that you'll require is collision between players.
  7. This problem is quite hard - you need to have the client tell the server how many fixed sized time-steps there were between key-actions, then the server can correct forward or backwards (by rewinding time).
  8. wildbunny

    AS3 Collision Resolution

    If you're looking for polygonal collision detection and resolution in AS3, I have a couple of articles which might interest you: http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/ http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/ Cheers, Paul.
  9. wildbunny

    Better way of doing constraints

    Hi there, Sure, you need to design your constraint so it works in 'relative space' and pushes on object A while pulling on B. I wrote just the article which should help you out with understanding how to design a constraint: http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/ It starts off dealing with simple concepts and builds up to designing a constraint Hope that helps! Cheers, Paul.
  10. wildbunny

    2D Networked Physics Simulation

    Yes, this problem is hideous. You may have to author your own engine to get the guarantees you need.about the determinism. Alternatively you can use a non deterministic engine and send correction vectors along with the keyboard inputs.
  11. wildbunny

    2D Networked Physics Simulation

    Its very, very hard to get right. Some tips: * use a fixed time-step on client and server * send player inputs and correct for latency - keys must be down for the *exact* number of time-steps on both client and server The goal is to try and get exactly the same results on client + server given the same inputs. You'll probably need to hash the state of the client and compare that against the hashed state of the server to detect desyncroisation issues. Cheers, Paul.
  12. wildbunny

    Contact force situation

    Certainly it used to be the case that most simulators would treat collisions via impulses and then resting contacts via a force/acceleration model, but things have come a long way since then - these days its popular to treat collision and resting contact via impulses only - if handled correctly they are just visually stable, handle stacking very nicely, can treat friction without having to linearise and are numerically stable and you'll never end up in a situation where your LCP solver suddenly explodes due to an 'infeasible solution'. For research, I suggest googling 'sequential impulses' ref Erin Catto. Cheers, Paul.
  13. wildbunny

    Contact force situation

    I strongly urge you to discard the force/acceleration model in favour of impulse/velocity. The later is a million times easier to implement and to find up to date tutorials / example code. Have you seen my 'Physics engines for dummies' article? http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/ It should give you some pointers Cheers, Paul.
  14. wildbunny

    Achieving oldschool platformer physics

    I wrote a series of articles about making an old-school 2d platformer using modern techniques, including a physics engine: http://www.wildbunny.co.uk/blog/2011/12/11/how-to-make-a-2d-platform-game-part-1/ http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/ http://www.wildbunny.co.uk/blog/2011/12/20/how-to-make-a-2d-platform-game-part-3-ladders-and-ai/ Hope they help! Cheers, Paul.
  15. For the sake of closure - the fault was mine. By putting an 'infinite' loop inside the BeginAccept callback I was essentially hijacking the IO thread-pool's threads, depleting them to such a degree that they must have run out inside the BeginReceive() callback which would cause the lag. I fixed this by relinquishing the callback threads as quickly as possible so they could be returned to the IO completion thread pool.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!