3,213 reputation
717
bio website redblobgames.com
location California
age
visits member for 4 years
seen 5 hours ago

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).


12h
comment Required number of images for octagonal tiles
While looking for something else unrelated, I found this page that has a visualization of the patterns: jasondavies.com/necklaces ; it shows that once mirrors are taken into account, the number drops from 36 to 30.
Oct
27
revised Required number of images for octagonal tiles
removed redundant sentence
Oct
26
answered Required number of images for octagonal tiles
Oct
16
comment isometric movement
Whatever you end up picking for movement, I recommend doing it in the game world coordinates, not the isometric view. See the diagram on this post. Things are simpler if you do all the game logic in the game world coordinates and then apply isometric only for rendering.
Oct
13
answered How to calculate left/right oriented angle between two 2D vectors?
Oct
11
awarded  Yearling
Oct
10
comment Artificial Intelligence - when to update pathfind?
If you're precalculating for every node, use Floyd-Warshall instead.
Oct
9
answered Why does my A* implementation overflow the stack?
Oct
7
comment Random Placement of Objects on a Tilemap
Some noise functions (including Perlin Noise) will let you generate any portion without generating the whole thing. For storage, you can use a hash table that uses (x,y) as the index. In C++, that could be std::unordered_map<pair<int, int>>. That way, you can store only the parts of the map you generate, and you also get to use negative indices. In practice, you'll probably generate a chunk at a time instead of one tile at a time.
Oct
7
answered Random Placement of Objects on a Tilemap
Oct
4
reviewed Approve suggested edit on Why is it bad to hard-code content?
Sep
30
comment What's the 'proper' way to get unit vectors?
sqrt is also relatively fast these days, and the overhead of a function call will be larger than the cost of the sqrt itself. Write clean code, and if it's not fast enough, run the profiler, then focus on the areas that are slow.
Sep
30
comment What's the 'proper' way to get unit vectors?
Since you're working in python, I'd suggest - just use the sqrt and don't worry about it.
Sep
24
awarded  Autobiographer
Sep
9
comment How to handle a negative coordinate 2d map with a growing map size
Ah, cool. Just be careful — some of the methods like slice() behave differently when given negative indices.
Sep
9
answered How to handle a negative coordinate 2d map with a growing map size
Sep
3
comment Building stable ecosystems
"Cybernetics", "Systems Theory", and "Control Theory" are probably the fields of study you're looking for. All fascinating! You might also find this interesting reading (and part 1 and part 3.
Aug
10
answered A star pathfinding and discrete/smooth positions
Jul
21
comment Fast, simple procedural 2d island generation
You might be able to use fewer octaves. The lower octaves are smoother than the higher ones. Or you might post-process in some way, to smooth out the corners with some sort of blur algorithm. For example, set a block to water if its eight neighbors include at least 3 water (you might need to try different numbers). This might remove some of the rough borders.
Jul
20
answered Fast, simple procedural 2d island generation