Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411431 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 20, 2024, 02:52:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)I think I got it, I think I programmed A*
Pages: [1] 2
Print
Author Topic: I think I got it, I think I programmed A*  (Read 3119 times)
Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« on: May 03, 2015, 11:11:20 PM »

Here are a few snippets of my orthogonal A* implementation...


I am pretty new to path finding implementations but I think after some wrestling  Mock Anger around I think I got it!  Durr...?



   Hand Point Left

    Hand Point Left


Probably not perfect but I am going to have a  Toast Right anyways!

Hambone
Logged

Wannabe indie game developer
oahda
Level 10
*****



View Profile
« Reply #1 on: May 04, 2015, 12:29:40 AM »

i was gonna congratulate u but then u mentioned beer so no congrats 4 u!!!!!!
Logged

lithander
Level 3
***


View Profile WWW
« Reply #2 on: May 04, 2015, 04:23:33 AM »

What's the problem with beer?  Who, Me?


Getting pathfinding to work is always a nice milestone. I'm not sure why everyone seems to start with A* though. Why not start with something heuristic-less like Dijkstra? It doesn't scale so well but it's easier to get working, more flexible and faster for small grids.
Logged

Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #3 on: May 04, 2015, 08:44:29 AM »

Quote
i was gonna congratulate u but then u mentioned beer so no congrats 4 u!!!!!!
people who drink beer cant get a congrats Huh?  Concerned


Quote
I'm not sure why everyone seems to start with A* though.
I had to thanks to my professor..  Cry

He dropped us in to the deep.


Hambone
Logged

Wannabe indie game developer
oahda
Level 10
*****



View Profile
« Reply #4 on: May 04, 2015, 09:43:26 AM »

cuz im not 15 y o !!
Logged

Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #5 on: May 04, 2015, 01:04:30 PM »

You aren't 15 or you are 15?
Logged

Wannabe indie game developer
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #6 on: May 04, 2015, 01:29:53 PM »

 Well, hello there!
Logged

oahda
Level 10
*****



View Profile
« Reply #7 on: May 05, 2015, 01:03:26 AM »

i wish i was
Logged

vinheim3
Level 5
*****



View Profile
« Reply #8 on: May 05, 2015, 05:14:13 AM »

Yeah beer is awful. Spirits are where it's at

That being said, congrats. A* was one of my favourite algorithms years ago because something about pathfinding in different genres was nifty. Simple grid-based like the one you have is still immensely satisfying, it was moreso when I did it in an SRPG involving heights and unit's jump heights. See if you can do it in a platformer or even a flat 3D game, that would be even tighter
Logged
Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #9 on: May 05, 2015, 12:51:34 PM »

Here is a small update to what I have been working on...




Hambone
Logged

Wannabe indie game developer
vinheim3
Level 5
*****



View Profile
« Reply #10 on: May 05, 2015, 01:04:42 PM »

Optimally, the rat should start by going up, and near the end it shouldn't be dipping into that 3-tile length of boxes
Logged
Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #11 on: May 05, 2015, 01:33:28 PM »

yeah, you are right, she's not perfect yet  Mock Anger

Hambone
Logged

Wannabe indie game developer
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #12 on: May 05, 2015, 01:37:29 PM »

There is corner bias no? Manhattan distance?
Logged

Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #13 on: May 05, 2015, 02:12:46 PM »

Yeah, I used manhatten, is this issue normal with manhatten?

Hambone
Logged

Wannabe indie game developer
lithander
Level 3
***


View Profile WWW
« Reply #14 on: May 05, 2015, 02:29:31 PM »

Nope, not normal. If it's not finding the optimal path there's a bug!
Logged

Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #15 on: May 05, 2015, 02:44:25 PM »

I don't like bugs, real or fake. Ill fix it.

Hambone
Logged

Wannabe indie game developer
RandyGaul
Level 1
*

~~~


View Profile WWW
« Reply #16 on: May 05, 2015, 02:49:38 PM »

But it is optimal! Mice IRL hug walls to help hide and avoid predators.
Logged
Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #17 on: May 05, 2015, 02:52:47 PM »

Oh never thought about that, maybe if I put that in my write-up my professor will grade me a little easier??? 
 Well, hello there!




Hambone
Logged

Wannabe indie game developer
Hambone
Level 1
*


follow on the twitter @The_Hambone1988


View Profile WWW
« Reply #18 on: May 05, 2015, 03:17:03 PM »

So it is still a little broke, but it looks cool right?Huh?





BTW, that is me controlling the mouse, not the computer  Gentleman


Hambone
Logged

Wannabe indie game developer
Sgt. Pepper
Level 1
*


View Profile
« Reply #19 on: May 05, 2015, 03:19:53 PM »

For my ' A* ' (I'm using that term very broadly here, maybe I should call it Z*), I just compare the current x and y and the target x and y and move the object accordingly.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic