Jump to content

  • Log In with Google      Sign In   
  • Create Account


Pathfinding, and pixelmovement


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Scalytank   Members   -  Reputation: 116

Like
0Likes
Like

Posted 27 September 2012 - 01:48 PM

Hello everyone!

I am Scalytank, a Hungarian developer from Serbia. English is not my native language, but i will try my best ^^
I currently develop a game with ika (uses python as script language) I have a working tile based engine, and a pathfinder. However, i want to switch my game, to pixel based movement, And pathfinding.

Now i have this issue.. My game will utilize an action battle, with usually 3-4 enemies at once. I need some theory about useing A* node based pathfinding, with pixelmovement.

My game will consist of 40*40 pixel tiles. Enemies will have 32*32 size, as boundary boxes ,and no bigger. (at least there will be a 100*100 big object, but that wont utilize pathfinding.)

I dont know really where to start. I have this logic, that the enemy will check for the tile where the player is, and that tile will be the middle of the players boundary box. Then he will follow a route to the player, and when he hits a wall, or something, he moves to the center of his tile, and continue his route. (So for example, he is off centered from his tile, because the movement is not gridlocked, and this way ,he can reach other tiles obstruction) And the pathfinder will mark every tile as obstructed, if any of the objects 4 boundary points are on that tile.

If there are someone who made this before, I would appreciate any help given. Thanks for your time ^^

Sponsor:

#2 kd7tck   Members   -  Reputation: 715

Like
2Likes
Like

Posted 27 September 2012 - 08:05 PM

Pixel pathfinding is slow, just break everything up into blocks. 4X4 sounds good, then use a grid pathfinding algorithm. The movements can be smothed using a curve fitting algorithm.
Link to translated tutorial

Edited by kd7tck, 27 September 2012 - 10:36 PM.


#3 Goran Milovanovic   Members   -  Reputation: 1103

Like
0Likes
Like

Posted 27 September 2012 - 10:28 PM

@kd7tck

He's not Russian. Posted Image

+---------------------------------------------------------------------+

| Need a programmer?        ->   http://www.nilunder.com/protoblend   |

| Want to become one?       ->   http://www.nilunder.com/tutoring     |
| Game Dev video tutorials  ->   http://www.youtube.com/goranmilovano |
+---------------------------------------------------------------------+

#4 slicer4ever   Crossbones+   -  Reputation: 3225

Like
0Likes
Like

Posted 28 September 2012 - 12:34 AM

Pixel pathfinding is slow, just break everything up into blocks. 4X4 sounds good, then use a grid pathfinding algorithm. The movements can be smothed using a curve fitting algorithm.
Link to translated tutorial

I'd also like to toss in my 0.02, I also agree that using a 1x1 grid for A* is going to be slow(although depending on the size of the level, it might be possible to do it without much performance impact).
Considering your agent's are most likely going to be larger than a single grid unit, i'd recommend giving this a read, after you've given kd7tck's link a read over.

Edited by slicer4ever, 28 September 2012 - 12:34 AM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#5 Scalytank   Members   -  Reputation: 116

Like
0Likes
Like

Posted 28 September 2012 - 04:15 AM

Thanks for the tutorials ^^




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS