Page 1 of 1

A* pathfinding and pseudo 3d sprites

Posted: Sat Jul 25, 2009 7:54 am
by paclito
I'm working for some months on a little project for make a pseudo-clone of the wii tanks....... uf! it's a very difficult thing to program a game.... well, when thinking and programming this, i get into some problems

1. how the enemy tanks move?
2. how the sprites of the tanks are done
3. how to develop maps on my screen (0's 1's and squares..... not beautiful maps)
3. how to move the sprites in a realistic way

and my solution in this moment is this, someone can think there are interesting parts or correct me if I'm in trouble this is'nt?

I've of course, some problems without solution by the moment and one of them that is doing some headaches for me is this:

In box2d, it's very easy to setup a ...ball.. car... tank... boy... apply a impulse and wait to collide with another object of the screeen.... a walll.....another boy...
but, on my project or in a car game, I like than a tank walk a path (from one point to another) and there is no form to tell the object

Hey tank! when you are at x=110 y=700 stop you! ok?

.... and tank is always thinking.... i've to stop at... i've to stop at ..... i've to...... yeaaaaaaah! the point isn't here!!! eoeooooooo!! where is my point?

Someone know how this can be done in box2d?


PD the A* algorithm is't mine of course, i've downloaded a example from the internet...... there are some PSP Player where we can see this.

I expect all this can help someone.....

Saludos for all !

Re: A* pathfinding and pseudo 3d sprites

Posted: Sat Jul 25, 2009 5:50 pm
by mike
I remember building the A* algorithm for LÖVE back in its pre-release days when we thought that having such things (A*, GUI, etc) built-in would be a good idea. Could I ask why your A* algorithm doesn't like diagonals?

Re: A* pathfinding and pseudo 3d sprites

Posted: Sat Jul 25, 2009 8:18 pm
by Robin
mike wrote:Could I ask why your A* algorithm doesn't like diagonals?
It's not paclito's algoritm:
paclito wrote:PD the A* algorithm is't mine of course, i've downloaded a example from the internet
So I guess a more appropriate question would be "Could I ask where you found this algorithm?"

That or "Robin, for christ's sake, why aren't you minding your own business?"

Re: A* pathfinding and pseudo 3d sprites

Posted: Sat Jul 25, 2009 10:14 pm
by paclito
Sorry is not mine, when searching how to automatically move a character, I've se other algorithms but none in Lua, there is some code for the luaplayer for psp, here is the url

http://www.psp-programming.com/forums/i ... ic=1142.15

and searching for this, I've find a zip file where it's a example for psp ...... and from this i've get the 'howto' get it working.

the diagonals are not for this program sorry

there is a way to get the micropather working on love? calls to a external dll?

Re: A* pathfinding and pseudo 3d sprites

Posted: Sun Jul 26, 2009 7:47 am
by Pliskin09
looks very nice mate. well done :)

Re: A* pathfinding and pseudo 3d sprites

Posted: Sat Dec 19, 2009 12:27 am
by philnelson
Holy shit, man. This just saved my brain.