Giter Site home page Giter Site logo

gmclan-org / dijkstra-graph Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 98 KB

Dijkstra algorithm solution in GameMaker (Studio 2) to find shortest path in graph between two points.

Game Maker Language 100.00%
ai freeware gamemaker graph mesh navigation pathfinding tree

dijkstra-graph's Introduction

Screenshot

Dijsktra pathfinding in weighted graph for GameMaker

This is example of pathfinding in weighted graph, using Dijsktra alghoritm. It uses priority queques for searching rather than matrices, which would require NxN array, where N is number of nodes.

Also contains an example of creating/updating/displaying graph, which isn't required to work.

Check Wiki for more info.

Znajdywanie drogi w grafie z wagami używając alorytmu Dijsktry dla GameMaker

Przykład znajdywania drogi w grafie z wagami używając alorytmu Dijsktry. Korzysta z kolejek priorytetowych zamiast z macierzy, co wymagałoby tablicy o rozmiarze NxN, gdzie N to licza wierzchołków.

Zawiera te przykład dodawania/edytowania/wyświetlania grafu, który nie jest wymagany do działania.

Dokumentacja znajduje się w Wiki.


Created by Piotr Gnys (@gnysek).

Managed by GameMaker's Clan - gmclan.org.

You can freely use, modify, and re-distribute code. Of course it would be nice if you mention author in game credits, but this is not required.

*GameMaker was previously known as GameMaker Studio 2.

dijkstra-graph's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

dijkstra-graph's Issues

Cleaning node variables

if (mode == editor_mode.connecting) {
if (node1 == -1) {
node1 = instance_nearest(mouse_x, mouse_y, obj_node);
} else {
node2 = instance_nearest(mouse_x, mouse_y, obj_node);
connect_points(global.my_graph, node1.name, node2.name);
connect_points(global.my_graph, node2.name, node1.name);
node1 = -1;
node2 = -2;
}
}

Line 54: Why reseting to -2 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.