# RichardGe

Member

112

236 Neutral

• Rank
Member

• Role
Programmer
• Interests
Programming
1. ## algorithm challenge

wow very interesting, I just read quickly the 2 articles. I think you pointed exactly what I was searching. I'll try to find more time later to take a closer look, and implement something.
2. ## algorithm challenge

@alvaro , even if we don't care of memory, if N and K are very big it could take years to fill the C[N][K] array . But for decent N and K it seems it's working @frob, I had no knowledge on the Fisher-Yates shuffle, but it looks like it's using several random numbers... However you can tell me that I told "Random function can manage numbers of any size you want", so we can generate small random numbers from a big number. Concerning your algorithm, I assume it's working correctly even if some indices are equal in the first step, so I think it would work too, with a very big initial random to generate the list of indices. In all the cases, it seems we need something big to initialize the algorithm. I don't know if we can do it, only with 1 initial random number R between 1 and binomial(N,K), I mean this is the number of possibilities. and then with a smart algorithm, have the Rth combination. (without iterating throw all combinations).
3. ## algorithm challenge

no it's from my mind
4. ## algorithm challenge

Hi, little challenge I was thinking... you have a lotto grid of N numbers. you have to pick K different numbers. order doesn't matter. my challenge : write an algorithm that generates 1 random pick combination. example with N=6 and K=3 , 1 pick would be (1,3,6) constraints : - you can call Random function only 1 time. ( this Random function can manage numbers of any size you want ) - N and K are very big - I mean, you can't iterate all the possibilities - all pick combinations must have the same chance to be generated on my side, I think I have an idea of solution, but I'm not happy with it, because it would imply some complex looping. I assume the start is to generate a random number between 1 and binomial(N,K)...
5. ## binary alpha

Hodgman, thanks for the fast solution. C0lumbo, thanks for the interesting details.
6. ## binary alpha

Hi,   In order to avoid the need of sorting the objects that need a simple binary alpha mask, I'm forcing  the alpha transparancy to be only 0 or 1.       To do that, I have added this line in all my pixel shaders : //force alpha to 0 or 1 if ( finalColor.w > 0.5f ) { finalColor.w = 1.0f; } else { finalColor.w = 0.0f; } This doesn't seem very beautiful. I'm wondering if there is another way to do that ? Like a DirectX implemented feature ?   Thank you !

8. ## A Verlet based approach for 2D game physics

Very good article! Since a long time I'm searching how to develop a physic engine like Angry Birds. I think this algorithm is a good way to do that. Moreover, I'm sure this approach could be used for a 3D game physic.

love it !
10. ## 3D stereoscopic rendering

Interesting, I didn't know this method of interleaving the left and right eye views.

12. ## Very soft pathfinding algorithm

@ Matias Goldberg: Absolutely, this path-finding algorithm is easy and soft but could be quickly limited. However, I think it can apply in many games... For example, it would not surprise me that World of Warcraft uses this kind of algo...

14. ## Very soft pathfinding algorithm

Very soft pathfinding algorithm Introduction