1,347 reputation
312
bio website hexgridutilities.codeplex.com
location Canada
age 59
visits member for 2 years, 4 months
seen yesterday

A physicist, accountant (CGA,CPA), and software developer by training, and a professional developer by employment, I wrote my first computer program in FORTRAN w/ WATFOR in high school. Since then I have written device drivers for a PDP-15, CAD/CAM applications in C, and Database applications in everything from FORTRAN (?!) and C to SQL and MS-Office.

I currently build financial and business applications professionally, mostly with VBA / C# / SQL, while developing my own Napoleonics game engine in C# on weekends and evenings.


Jun
23
comment Using an object as a model to avoid too many parameters - XNA/C#
And, if you are de-serializing text content, learn and use the built-in de-serializing mechanisms.
Jun
23
comment Using an object as a model to avoid too many parameters - XNA/C#
This is not a good practice. Other than for data collection, you are much better off practicing the design and use of immutable objects. This may feel unnatural at first, but will immensely ease reasoning about your object/application state as your application grows.
Jun
22
comment Idle clicker game. Math for the economy(Upgrades and more)
And if you are looking for the sum of the first n triangular numbers, that is exactly f(n) = n (n+1)(n+2)/6
Jun
20
comment How to check distance between two different vectors?
@DMGregory: Often when distance is being referred to the intended meaning is not actually it's technical meaning, the magnitude of a displacement vector, but rather the projection of a displacement vector onto a preferred axis. In these cases it does in fact make sense to allow both negative and positive distances.
Jun
20
comment How to check distance between two different vectors?
@DMGregory: While distance cannot ever be negative, the projection of a vector on an axis can be and is easily calculated as the dot product of the original vector and a unit basis vector for the axis.
Jun
17
reviewed No Action Needed Effecient tilemap rendering
Jun
16
comment How can I calculate the future position of my moving object?
The 1-D kinetic equations as noted here (gamedev.stackexchange.com/questions/54732/…) can be applied in the horizontal and vertical directions independently. Additional links: gamedev.stackexchange.com/questions/71900/… and gamedev.stackexchange.com/questions/71900/…
Jun
16
comment What is the difference between Djikstra and flow fields?
@Asik: A solution is a solution; though performance differences as noted above exist. Do you want a simpler implementation for small grids or a fast one for large grids, or a bit of both?
Jun
14
revised What is the difference between Djikstra and flow fields?
added 8 characters in body
Jun
14
revised What is the difference between Djikstra and flow fields?
added 153 characters in body
Jun
14
revised What is the difference between Djikstra and flow fields?
added 1 character in body
Jun
14
answered What is the difference between Djikstra and flow fields?
Jun
14
comment What is the difference between Djikstra and flow fields?
Check out this abstract, for a more detailed summary of research into this question:mit.edu/~jnt/dijkstra.html. The Fast Marching techniques for solving the Eikonal Equation are in fact based on Dijkstra-like techniques.
Jun
3
comment finding a path from one point to another with obstacles help
Check out Eric Lippert's implementation in C# of A* on a square grid: blogs.msdn.com/b/ericlippert/archive/2007/10/10/… and blogs.msdn.com/b/ericlippert/archive/2007/10.aspx
May
30
revised Pathfinding Algorithms
Added appropriate tag.
May
30
comment Pathfinding Algorithms
The A* algorithm itself is very straightforward, and not at all difficult to program. However the particular heuristic that is appropriate for your circumstance is another matter. If you are using a as-the-crow-flies or Manhattan heuristic that is very simple as well. For my game I use ALT, with pre-computed distances from a variety of landmarks, to calculate the heuristic. This is much more efficient and more complex than simpler heuristics, but gives me much smaller search spaces on large terrain (map-like) grids (750 * 450 hexes).
May
30
suggested approved edit on Pathfinding Algorithms
Apr
30
comment Error in Finding Nearest Hexagonal Tile
You can check out my (Open Source, MIT License) HexGridUtilities library here: hexgridutilities.codeplex.com
Apr
3
comment How the values of h and the perpendicular had computed
@DMGregory: Good point; I will correct when back on a proper keyboard.
Mar
20
comment A* pathfinding for grid with direction-dependent nodes?
If you are using a hexagonal grid, check out my HexgridUtilities library (open source, MIT License) here: hexgridutilities.codeplex.com. It includes an efficient A-star implementation as well as raycasting line-of-sight on terrain hexgrids.