lolpaca's Recent Forum Activity

  • I agree that something like this would help to raise the profile of C2 - there's a lot of talent on these here boards and it'd be nice to see what we're capable of doing in a month. I don't see a problem with it being a community-run thing rather than 'official', I'm sure Ashley & co are busy enough as it is!

    Anyway I'd definitely be up for joining in with one of these, let me know if it goes ahead.

  • Here you go:

    dl.dropboxusercontent.com/u/106247621/LinearPathfinding.capx

    Also works fine with diagonals turned off.

  • Thanks Ashley, yeah turns out I was just being lazy <img src="smileys/smiley4.gif" border="0" align="middle" />... think I've got it worked out now.

  • Try this - just uses the built-in pathfinding behaviour set to a grid. Someone with better skills than me might be able to improve it :)

    dl.dropboxusercontent.com/u/106247621/LinearPathfinding.capx

  • This seems to work OK and was quite simple to do - give it a try!

    dl.dropboxusercontent.com/u/106247621/LinearPathfinding.capx

    I thought it would have trouble handling non-45-degree diagonals, but the way I've done the player's movement seems to have taken care of that for me.

  • I'll give that a try now and report back...

  • Seems to be a lot of people asking this lately <img src="smileys/smiley4.gif" border="0" align="middle" /> What was your issue with the Rez's Astar one? I'm about to start a project that uses it, I've heard some people have problems with terrain costs, but that doesn't affect my project - is there anything else I should be aware of?

  • This is what i was originally using for a game i was making a while ago but i found a bug in the way it finds paths, you can check my thread here scirra.com/forum/turn-based-strategy-like-advance-wars-devlog_topic74453_page1.html

    I PM'd the author but didn't get a response.

    I think rexrainbox does another pathfinding object though.

    Sorry to hear you had to stop working on your game, that sucks :( Was the issue only with adding different terrain costs to the pathfinding? Because I don't plan to use terrain costs for my project, I just want grid-based pathfinding.

    Have had a bit of a play with the Rez one and it seems to be working well for what I need, and I'd rather use a plugin if possible (I downloaded yours and Rojohound's example but I'd have no idea where to start tinkering with it!) Did you have any other issues with Astar Pathfinding apart from terrain costs?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks everyone - after a bit of looking around I found an Astar plugin which appears to be what I'm looking for. I'll have a play around with it and see how it goes. You can find it here:

    scirra.com/forum/plugins-behaviors-rez-repo_topic51087.html

  • In case that wasn't too clear, here's an example of how that movement would go:

    <img src="https://dl.dropboxusercontent.com/u/106247621/pathfindexample.jpg" border="0" />

    If I'm being stupid and there's already a simple way to do this, please let me know because I'd love to know!

  • Hey hey,

    I'd love to see a pathfinding behaviour that moves on a set 4-directional tiled grid. The current pathfinding behaviour doesn't work too well for that: even when turning off diagonal movement, rotate object and setting the cell side to the grid size etc, the sprite still 'drifts' around a few pixels as it moves. It also doesn't always end up on the exact tiled space it's going to - it'll often stop on the edge of a tile or a couple of tiles before it.

    In other words, a system like the pathfinding behaviour we have now, where it'll find the shortest path from point to point avoiding obstacles, but the sprite only ever moves on either the X or Y axis as it travels, never both at once. The movement nodes should all be set at evenly-spaced points on a grid defined by the user (eg, a 100x100 grid of 16x16-pixel tiles, etc) and the sprite travels precisely between each point.

    Hope I've explained well enough <img src="smileys/smiley4.gif" border="0" align="middle" /> Is something like that possible? This would be a great feature to have for tile-based games like turn-based strategy, roguelikes and other RPGs, as it'd take a lot of the headaches out of moving sprites around automatically.

  • I'm not sure you can with the pathfinding behaviour as it is - as you said, even with diagonals and rotations switched off and the cell size set to the grid size, it still seems to 'drift' quite a bit which just seems to be the way the behaviour's coded.

    You might need to make your own pathfinding behaviour, which is quite easy to do if you don't need any obstacles on your map, and quite complicated if you do :P

    EDIT - If anyone at Scirra's reading, a 4- or 8-direction-only pathfinding system would be ace for grid-based game <img src="smileys/smiley4.gif" border="0" align="middle" />

lolpaca's avatar

lolpaca

Member since 28 Feb, 2013

Twitter
lolpaca has 1 followers

Trophy Case

  • 11-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

13/44
How to earn trophies