The "IT'S EASY!" challenge #1 - The Maze

This forum is currently in read-only mode.
  • About always turning right in mazes - that wouldn't work in part of the maze where you'd keep cycling if you stuck to your right

    Yep, if there was a floating wall in the maze then my mouse might be defeated. Luckily they're all connected

  • lol, lucky I didn't enter my own challenge then! That would have been embarrassing

  • <img src="http://www.scirra.com/images/mouseevent.png">

    Whoa. I believe this just proves how useful RTS behavior is right now.

    Also, great formulation of the thread. Had I read this earlier I would have given it a shot too.

  • Well, RTS (with the A* algorithm) is more of a brute force solution - it checks all possible solutions to the problem, then picks the shortest path.

    Not quite - A* is a bit more clever than that. There are infinite unique journeys to travel between any points - just think of all the times you could go half way, go in a circle, then carry on, then the same with two loops round the circle, then the same with three loops round the circle...

    So it's actually impossible to generate all possible solutions then pick the best. It's a surprisingly efficient algorithm, but as a tradeoff it is not perfect in all situations. But I think it picks the optimal path in 99.9% of situations or so. Worth it to get an answer before the end of the universe!

    - the RTS behavior generates a complete path in the 'Move to' action, stores it, then just starts moving the object along the already calculated path. So it's not actually running any pathfinding logic as the mouse moves around, so you'll see negligable CPU usage. The biggest problem with that system is if the path is really big and complicated, or you're moving hundreds of objects in one go, it could hang for a second or two while it calculates all the paths.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • - the RTS behavior generates a complete path in the 'Move to' action, stores it, then just starts moving the object along the already calculated path. So it's not actually running any pathfinding logic as the mouse moves around, so you'll see negligable CPU usage. The biggest problem with that system is if the path is really big and complicated, or you're moving hundreds of objects in one go, it could hang for a second or two while it calculates all the paths.

    Ahh that explains it then. Still impressed it managed to do it at all hehe. Now I want to make an RTS based on the Aliens movies, smart movement like that would be perfect for the Alien side

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)