A* pathfinding and pseudo 3d sprites

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

A* pathfinding and pseudo 3d sprites

Post 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 !
Attachments
moves5.love
(173.41 KiB) Downloaded 404 times
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: A* pathfinding and pseudo 3d sprites

Post 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?
Now posting IN STEREO (where available)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: A* pathfinding and pseudo 3d sprites

Post 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?"
Help us help you: attach a .love.
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: A* pathfinding and pseudo 3d sprites

Post 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?
User avatar
Pliskin09
Citizen
Posts: 89
Joined: Fri Jul 24, 2009 8:30 am

Re: A* pathfinding and pseudo 3d sprites

Post by Pliskin09 »

looks very nice mate. well done :)
philnelson
Prole
Posts: 48
Joined: Sun Feb 01, 2009 3:32 am

Re: A* pathfinding and pseudo 3d sprites

Post by philnelson »

Holy shit, man. This just saved my brain.
Post Reply

Who is online

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