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

Post your Construct-made creations!

Post » Fri Dec 04, 2009 4:56 pm

I'll just leave this here....
[url:33beue9b]http://dl.dropbox.com/u/666516/mousecow.cap[/url:33beue9b]

Note you need the perlin plug
Warning it eats up ram from the array..., I'll change it to loops later.

Any way this really isn't a challenge, given the rts, and line of site plugs.

[quote:33beue9b]In this case, though, Construct does effectively solve the problem for you ;)[/quote:33beue9b]

Edit yeah what he said
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Dec 04, 2009 5:08 pm

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.

My project has the mouse actually looking for the cheese rather than telepathically know the location and path thereof. It is fun to watch it get lost near the goal and wander back, looking for another path :P
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Dec 04, 2009 5:56 pm

[quote="Ashley":3bg4n4l2][/quote:3bg4n4l2]

Well then.

Honestly I didn't even consider trying the RTS behavior because I didn't think it would work with a single complex object like that. I assumed it went "around" obstacles, but not necessarily "through" them. I've hardly ever used RTS behavior before though so I'm not really familiar with it.


[quote="Mipey":3bg4n4l2]http://dl.dropbox.com/u/629300/mipey_mouse.cap
http://dl.dropbox.com/u/629300/mipey_mouse.exe

Easy. 8)[/quote:3bg4n4l2]

Ahaha, he hates dead ends so much he poops on them. I love it.

Really nice movement, too.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Dec 04, 2009 6:29 pm

Wow, these are ALL awesome entries! The best part is how creative people are being! Though Mipey had the best use of poop I've ever seen haha. Thats a similar method (minus the poop) to how the robotic mice work isn't it? With the sensors around it detecting a blockage and then turning to try another route. When I came up with the challenge, that was the method I had in mind, and using the turn right rule that I heard works well in mazes (supposedly if you only take right turns you can solve it.. never tried that though, not many mazes round here hehe).

I dunno about you guys but it is really interesting seeing everyones different approaches, working from scratch with nothing but a maze and a mouse to start with. Kinda like those experiments you could do in some physics classes at school, only far more interesting and fun! :D

[quote="Ashley":2405opg2]Interesting idea for a challenge :) I'm not sure about how useful it is to prove whether or not Construct can do anything - difficult logic problems are difficult logic problems, no matter what tool you use - unless the tool solves that specific problem for you, which general-purpose tools usually do not. By "Construct can do anything 2D", I think we mean limitations in Construct shouldn't get in your way and prevent you from making the game you want.[/quote:2405opg2]

I think it's fun, besides you guys should be flattered. Sooo often these days you read about some piece of software that can do this and that, but when you install it, it falls way short, or you discover you need a PHD in advanced programming languages or something, to do all but the basics. Which pushes out a large number of people. Yet so far I've not seen something construct can't do (within reason obviously), and for something requiring zero coding, that's a first, you gotta admit. Then the fact it's completely free. I mean, that's bloody impressive if you think about it :P

Even the crowd simulator Massive needs a lot of effort put into it to create an agent to be able to do this, and that thing is built for this sort of problem!.. that and thousands of Orcs.. :) Oooh there's an idea for a seventh challenge. Use Construct to re-enact the battle of Helms Deep *grins* ;)

[quote:2405opg2]In this case, though, Construct does effectively solve the problem for you ;)

If that's not a perfect example of events being a quick and readable way to do something, then I don't know what is ;)[/quote:2405opg2]

Dammit! I thought I'd made the maze unnavigatable for that behavior! :P First thing I did was try and stop it working, guess I failed and was beaten by the mouse.. Now I know how Tom feels when Jerry bests him. :D

[quote:2405opg2]I've attached a copy where I just added the RTS behavior to the mouse, carefully adjusted the settings, and added an event to move the mouse to the cheese. The RTS movement has a very decent A* pathfinding algorithm built in to it which will basically immediately work out the optimal path to the destination, then move the object along that path. The A* bit is great, but it seems the RTS behavior's code to move the object along the path is a bit ropey. It wasn't designed for small, enclosed layouts like a maze - it's aimed at wide open spaces with occasional obstacles. So I had to tweak the settings a lot, but now the mouse basically walks directly through the maze to the cheese.

It's pretty surprising to see how bad the RTS behavior fared with the default settings, it gets stuck pretty quickly. I guess it needs a redesign if I ever get round to it. The mouse also has to be very small and use the smallest cell size available in the RTS behavior, since the walls of the maze mark entire cells as solid, and the entire map would be marked solid with a large cell size.[/quote:2405opg2]

Have all the commercial RTS games do the same task, and honestly I don't think they'd fair much better, in many cases they'd probably be much worse (granted, they'd probably need to lower the quality of the pathfinding to handle hundreds of units, but still, with cpu power and memory these days that's not much of an excuse for many of them). I've never seen an RTS capable of navigating something as complex as a proper maze, not without some intervention from the user to "help it along" as it goes. So I'm with deadeye on this, didn't think the RTS behavior would have a chance getting around this maze. I'm beyond impressed at it even reaching the cheese. Not only that, but I watched my cpu usage while it was running a few times, figuring it would be really chewing it up on something like this. Didn't barely twitch. :)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 04, 2009 6:39 pm

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 ;)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Dec 04, 2009 7:06 pm

[quote="Mipey":30wxu64v]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 ;)[/quote:30wxu64v]

Yep, if there was a floating wall in the maze then my mouse might be defeated. Luckily they're all connected :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Dec 04, 2009 8:25 pm

lol, lucky I didn't enter my own challenge then! That would have been embarrassing :D
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 04, 2009 11:58 pm

[quote="Ashley":3jmcyhk5][/quote:3jmcyhk5]
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.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Dec 05, 2009 1:23 am

[quote="Mipey":pabz2s3u]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.[/quote:pabz2s3u]
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!

@Lostmykeys - 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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sat Dec 05, 2009 4:35 am

[quote="Ashley":650d23qf]
@Lostmykeys - 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.[/quote:650d23qf]

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 :D
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

PreviousNext

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 0 guests