I'm currently writing a 2D game in Javascript using the HTML5 <canvas> element. It's coming along very nicely, but i have run into a problem.  The level design for my game is a grid (so path cost moving from one cell to the north/south...
Can anyone point me to a simple example that implements A* path-finding algorithm on a hexagonal grid (in JS). I have made it working on a square grid, however all my attempts to make it work on a hexagonal grid have failed.  This is how my grid look...
I've been trying to create a jQuery code that would scan a div with the id map and .map everything within it, and find the shortest path from #A to #B while trying to avoid crossing/touching the #blockings, but I'm clueless on how to do the l...
I want to use the A* path finding algorithm in my game with a hexagonal map. I found some JavaScript implementations here and here. But is there any possibility to apply it to the hexagonal map?  In most cases it uses some external file. I think I mu...
I seem to have a error in the following A* pathfinding implementation, which I implemented based on the psuedocode found here.  function NodeList() {     this.nodes = [];      this.add = function(givenNode) {         for(var i = 0; i<this.nodes.le...
I'm trying to implement AI behavior similar to Bomberman-like game. I have 3 types of tiles, walkable, unwalkable(walls), and destructible(boxes, etc) which can become walkable if destroyed. So, for example:   select random player-target if there...
Does anyone know a good javascript npm package (or have some good function) to find a JSON key and return its path (or paths if key exists more than once in nested JSON)  for example: var person={ "name":myName, "address":{ "city&...
I'm making an AI navigation system based on polar coordinates. The purpose is to move an actor to a position, while also moving away from a possible obstacle on its path.  The code works perfectly most of the time but after testing, I discovered...
I need to write a JavaScript algorithm to find the shortest path between 2 co-ordinates. I have looked at using a few route finding algorithms, such as the A* algorithm.  The difference in my application however is that I know all of the co-ordinates...
I am trying to learn A* Star Path finding for which I'm using this Library - https://github.com/qiao/PathFinding.js  But I don't understand one thing how to do it.  I need to find path from player.x/player.y (player.x and player.y is both 0)...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.