Points moving on graph

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
darkfrei
Party member
Posts: 1260
Joined: Sat Feb 08, 2020 11:09 pm

Points moving on graph

Post by darkfrei »

Small concept how to make the points that moving on the graph.
Animation (118).gif
Animation (118).gif (577 KiB) Viewed 1457 times
Attachments
points-on-graph-2-02.love
(5.88 KiB) Downloaded 46 times
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
dusoft
Party member
Posts: 783
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Points moving on graph

Post by dusoft »

What are we looking at? Is it based on pathfinding between two points?
User avatar
darkfrei
Party member
Posts: 1260
Joined: Sat Feb 08, 2020 11:09 pm

Re: Points moving on graph

Post by darkfrei »

dusoft wrote: Sun Apr 06, 2025 9:20 pm What are we looking at? Is it based on pathfinding between two points?
Yes.
1. There is the graph - the diagram with nodes and edges. Each edge can have multiple points, so the edge can be curved and total length. Also the edges have just only one direction.
2. From nodes to nodes can be find the shortest path.
3. Points are moving along the paths.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
dusoft
Party member
Posts: 783
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Points moving on graph

Post by dusoft »

Nice. Did you use some common algorithm such as A*? Sorry, I didn't go through your code, just checked the demo.
User avatar
darkfrei
Party member
Posts: 1260
Joined: Sat Feb 08, 2020 11:09 pm

Re: Points moving on graph

Post by darkfrei »

dusoft wrote: Mon Apr 07, 2025 5:19 pm Nice. Did you use some common algorithm such as A*? Sorry, I didn't go through your code, just checked the demo.
No, it's the Dijkstra's algorithm, but id can be changed to A*, if we add the distance to the end point as extra weight.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
knorke
Party member
Posts: 276
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

Re: Points moving on graph

Post by knorke »

your demos are super neat.
are you also working on some bigger project to use them?
User avatar
darkfrei
Party member
Posts: 1260
Joined: Sat Feb 08, 2020 11:09 pm

Re: Points moving on graph

Post by darkfrei »

knorke wrote: Mon Apr 14, 2025 2:10 pm your demos are super neat.
are you also working on some bigger project to use them?
Yes, I am makin the game, that needs alot of mechanics, one of them is path following along the graph structure.

https://www.youtube.com/watch?v=GbTO3S_-klM
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
dusoft
Party member
Posts: 783
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Points moving on graph

Post by dusoft »

darkfrei wrote: Fri Apr 18, 2025 4:53 pm
knorke wrote: Mon Apr 14, 2025 2:10 pm your demos are super neat.
are you also working on some bigger project to use them?
Yes, I am makin the game, that needs alot of mechanics, one of them is path following along the graph structure.

https://www.youtube.com/watch?v=GbTO3S_-klM
Nice, is that a transport-related game?
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 0 guests