2,783 reputation
615
bio website redblobgames.com
location California
age
visits member for 3 years, 6 months
seen yesterday

I help people make games. On my new site ("Red Blob Games") I post interactive tutorials and guides to game algorithms. On my previous site (Amit's Game Programming Information) I collect links to useful pages about maps, grids, tiles, pathfinding, and AI. On my blog ("Blobs in Games") I post experiments and projects and ideas. Previously I was an advisor to Wild Shadow Studios (Realm of the Mad God) and Root 1 (educational games).


2d
answered Generate a 2D distance grid in one pass
Mar
27
comment How to make character gain acceleration?
The simplest thing to do is probably to use interpolating functions such as the ones shown on easings.net (they don't have implementation code though)
Mar
10
answered Java Scrolling 2d Block game - Optimise my code?
Mar
3
answered Modify random distribution functions :: Make it less likely to get multiple similar values in a sequence
Feb
15
awarded  Nice Answer
Feb
10
comment 2D to 3D perlin noise, I'm not sure I get it
The sides of your blocks aren't tall enough to draw the difference between adjacent heights; if you drew taller sprites, I think it would cover the gaps.
Jan
29
awarded  Nice Answer
Jan
25
comment How to implement uniform grids
Take a look at gameprogrammingpatterns.com/spatial-partition.html
Jan
25
comment How can I incorporate the path of a jump into my A* implementation?
@eBusiness: with Dijkstra you have a variable cost, not 1 at every step, and you have to order the queue just like A*. I think you're thinking of Breadth First Search.
Jan
24
comment How can I incorporate the path of a jump into my A* implementation?
Scoreboard? Search tree? Collisions? Can you give more details about what you mean by these, and how it's different from Dijkstra's algorithm?
Jan
19
comment How do I make a natural-looking map from some Voronoi regions?
The borders you're looking at often are based on water or mountains. Noisy edges look more natural than straight edges, so add some sort of noise. Arthur's answer uses waves; I used 1D midpoint displacement for my polygon maps; check out this article with its demo. Either works. If you add a lot of noise, the borders might cross; see the Noisy Edges section of my article for how to add constraints to help prevent that.
Jan
17
comment 2D lighting causes black rings to appear
My wild guess would be that you need to use a different blend mode (maybe with premultiplied alpha) for drawing the textures. But this is just a really wild guess.
Dec
9
comment Randomly generating the hallways between a network of rooms
This site has in-browser demos of various maze generation algorithms. However, these mazes don't have “loops” in them.
Dec
7
awarded  Nice Answer
Dec
6
revised Why can't my A* implementation find a path out of an open room?
frontier is another name for the fringe
Dec
6
answered Why can't my A* implementation find a path out of an open room?
Nov
10
comment Using a permutation table for simplex noise without storing it
Looking at the code on 6by9.net/simplex-noise-for-c-and-python it looks like the tables are under 1 kbyte. Do you really need one table for each map? I thought the permutation table is shared among all maps. The compiled code is probably more than 1k.
Nov
4
comment A*, Tile costs and heuristic; How to approach
Note: "tile.H = Math.Abs(endTile.x - tile.x ) + Math.Abs( endTile.y - tile.y ) * 10;" is multiplying only the second Abs by 10, and not the first. You need parentheses if you want to multiply both by 10 (and you do)
Nov
3
comment How to make natural-looking paths with A* on a grid?
I think the bit about obstacles is expected; there's a diagram on the Heuristics page that is titled “less pretty with obstacles”. The tie breaking approaches don't help much around obstacles. One of the other approaches (such as Theta*) may be what you want.
Nov
2
answered How to make natural-looking paths with A* on a grid?