Tag Info

New answers tagged

0

There are a few ways to move along at a constant speed along a path whose "segments" are not a constant length - and it's not trivial to make them that way. I would approach the problem by making a "Mover" of sorts which follows a "Path". public interface Path<T> { public T getPoint(float delta); } public class Mover<T> { public ...


1

This article: http://www.ai-blog.net/archives/000152.html gives a good overview of Navigation meshes and discusses dealing with realtime modification of the mesh due to environmental changes at least a little bit... The basic idea is that you mesh out all the potentially walkable spaces by default, then either mod a section of the mesh, or deal with moving ...


3

What you're really looking for are navigation meshes: These meshes will conform to the walkable areas in your game. You can make the nodes as small as you like. In this way, you can have far fewer nodes for your A* algorithm to work on. You can still have smaller nodes if you like for fine detail pathing, or you can use something like steering to get ...


1

Start with an empty board. ........ ........ ........ ........ ........ ........ Add 2 tiles with the same image to different columns on the the left. Add 2 tiles with the same image to different columns on the right. ........ A....... .......B ........ A....... .......B Repeat this pattern until the board is filled. ........ AC.....D .......B ...


1

A similar problem is finding the largest square block in a binary matrix and the algorithm actually gives the number of largest square blocks for every cell if this cell is top-left of the square block. A very good documentation of the algorithm is the answer by Joy Dutta in the Dynamic programming - Largest square block question on SO.


0

EDIT: Ok apparently this is totally different question now so here's my factored answer (v3) ... Marching Squares http://www.emanueleferonato.com/2013/03/01/using-marching-squares-algorithm-to-trace-the-contour-of-an-image/ Taking this approach will allow you to crawl your map and determine areas on the outside of / inside of something. This assumes you ...


0

I would try using a heuristic. From what I can tell there are at most 5 areas to move around in and 4 passages between them. As the bars move around, the 5 areas, we will call them, top, left, center, right, and bottom, are either expanding or contracting. Your heuristic could be based on whether an area is expanding or contracting. Obviously, it would be ...



Top 50 recent answers are included