달력

10

« 2024/10 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
http://www.cocos2d-iphone.org/forum/topic/7817

I've been playing around with path finding and tilemaps along with the latest release of cocos2d-iPhone - and I posted a sample app in hopes that it saves someone else some time - or if anyone has comments to optimize/improve this code (I'm sure that won't be difficult as I wasn't shooting for optimization, just trying to learn).

I started with two great tutorials:

Ray Wenderlich's cocos2d-iphone tile map tutorial:
http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d

and BravoBug's A-Star sample program:
http://bravobug.com/news/?p=118

My sample app loads a tile map that contains a start point, an end point, and walls, and detects (and graphically displays) a path between the start and end points. You can select whether or not you want to allow diagonal movements. Anyway, here's the link. I hope someone finds it useful:

http://dl.dropbox.com/u/3729313/PathFinder.zip

Cheers,
Kevin


:
Posted by netkorea