431 reputation
310
bio website
location Portugal
age
visits member for 3 years, 7 months
seen Apr 14 at 0:00

Jan
11
awarded  Popular Question
Nov
22
comment Monogame is not using GPU?
Either way, are 512x512 grass tiles visible at once? If not, then I suggest quickly computing which ones might be visible (firstX, firstY, lastX, lastY) and rendering only those tiles.
Nov
22
comment Monogame is not using GPU?
@IcyDefiance Creating that many floats per frame does not seem that much intensive -- are the registers even spilled to the stack? Not compared to everything else that's got to be done for the rendering.
Nov
21
comment Monogame is not using GPU?
@IcyDefiance Vector2 is a struct. As far as the GC is concerned, it is as processor-heavy as two floats on the stack (which is what it most likely is).
Sep
29
comment Can I use DirectX with C#?
I'd say SharpDX is the closest to what is being asked. XNA and MonoGame do not allow the user to directly call DirectX, as far as I know.
Sep
21
comment I am getting zero in my int x() when using Mouse.getstate().X?
Negative positions are possible "f the mouse is to the left of the client area (the inside portion of the game window, excluding the borders), the returned coordinate is negative." (see msdn.microsoft.com/en-us/library/… )
Sep
21
comment I am getting zero in my int x() when using Mouse.getstate().X?
Have you tried debugging using breakpoints? Which parts are unexpected? Does x work if you replace Mouse.GetState() by a dummy test value (such as 123)?
Sep
21
comment I am getting zero in my int x() when using Mouse.getstate().X?
Could you show us the body of your function x()?
Sep
14
comment OpenGL: What are the adoption rates of the various versions (And what's a reasonable version to use)
Check store.steampowered.com/hwsurvey It does not have the OpenGL version numbers but it's still a good starting point. Note how virtually everyone (almost 95%) has a DX10-capable GPU. DX 10-capable GPUs typically run OpenGL 3.x if the right drivers are installed.
Sep
7
comment In A star, how does the heuristic help determine your path?
@Mastrolinie No problem.
Sep
6
comment In A star, how does the heuristic help determine your path?
Note that if both g(n) and h(n) were multiplied by 100, it wouldn't make a difference. It would be the equivalent of changing the units used to measure distance.
Sep
6
comment In A star, how does the heuristic help determine your path?
Let's say the values of g(n) range from 0 to 20 and h(n) also ranges from 0 to 20. If we add g(n)=1 and h(n)=2, we get 3. If we add g(n)=3 and h(n)=1, we get 4. So the first option is predicted to be the "most promising" path. Now, let's multiply the h(n) by 100. g(n)=1 + h(n)=200 gives us 201, while g(n)=3 + h(n)=100 gives us 103. So now, clearly, it's the second the one that's the "most promising". In other words, multiplying the heuristic changed the results because it made the value of the heuristic "more important" and the value of g(n) "less important".
Sep
6
comment In A star, how does the heuristic help determine your path?
@Mastrolinie The article you quoted uses the formula g(n) + h(n). if h(n) is very big, then g(n) + h(n) is aproximately equal to h(n) (just like 1 + 1000000 is approximately 1000000). So, in short, if h(n) is too big, the algorithm kind of ignores g(n).
Sep
6
comment In A star, how does the heuristic help determine your path?
@Mastrolinie I improved the formatting. I hope it's more clear now. I'm not calculating the cost from BR, I already have the cost from BR from the previous iteration. I just compute the cost from MR and see if it's better than what we already have. It's not, so we ignore it. By "MR MM" do you mean "MR to MM" or "MR from MM"?
Sep
6
revised In A star, how does the heuristic help determine your path?
Added code blocks for improved clarity.
Sep
6
awarded  Yearling
Sep
6
awarded  Custodian
Sep
6
revised In A star, how does the heuristic help determine your path?
Another small fix
Sep
6
reviewed Approve suggested edit on In A star, how does the heuristic help determine your path?
Sep
6
answered In A star, how does the heuristic help determine your path?