Posts

Showing posts from July, 2010

Make Team Explorer Remember Login Credentials

When working with Team Explorer in Visual Studio, you might have come across the annoying user login box that pops up each time you open a Team Foundation Server connected solution. The Team Explorer development team decided to use the built-in credential vault in Windows instead of using their own implementation. Here is how you save the credentials inside the Windows 7 credential vault. Open the Control Panel Click on User Accounts (Called User Accounts and Family Safety in category view) Click Manage Your Credentials to the left (Called Manage Windows Credentials in category view) Next to the Windows Credentials category you click the Add a Windows credential button. Enter server address, username and password. Click Ok Now the Team Explorer client should remember your password.

Broad And Narrow Phase Collision Detection Systems

Image
If you don’t know about the big O notation, I recommend you read about it here first. This post gives you an idea of what broad and narrow phase algorithms are and how they are used in physics engines. Broad Phase Collision Detection Performance is an essential part of a physics engine. You can get away with just implementing a few algorithms that detect collisions using a O(n^2) algorithm, but when you add more and more objects to the simulator It becomes quite expensive (CPU wise). Not very good for performance. We can reduce the amount of tests by implementing a broad phase into our collision system. It is responsible of eliminating tests and thus reducing the number of tests needed (We obviously don't need to test objects far away from the player). We could for example have an algorithm that tests the distance using the X and Y axis of the screen, if the objects are too far away from each other, we can eliminate them as potential collisions. There are many algorithms tha...

The Big O notation – Summary

Image
Big O notation was invented to describe the growth rate of a function. You basically take away all constants and small factors and only focus on the big factors. Let’s take an example; the function: x ^2 + 2 x + 6 in terms of big O notation becomes: O( x ^2) We use this notation to describe the growth rate of algorithms too. A brute force algorithm that checks each and every object against the next is called O(n^2) (quadratic growth). If you have 100 objects, you will have to do 100^2 = 10.000 checks. Having a O(n log(n)) algorithm is obviously better as it grows slower. If you have the same 100 objects, you will only have to do 100 * log(100) = 200 checks! To give a graphical view of the growth. X is the number of objects and Y is the number of collision checks that needs to be performed. As you can see, when the number of items increase, the number of checks to perform increases much more rapidly in the n^2 function than the n*log(n) function. Here is a table of t...