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

Post your Construct-made creations!

Post » Fri Dec 04, 2009 4:48 am

[u:136w2biz]Welcome to the "IT'S EASY!" Challenge, part 1 of 6.[/u:136w2biz]

Inspired from the "Oh it's easy, Construct can do anything that's in 2D" reply that I've seen a lot. I decided to create a few challenges, see just how 'easy' some things really are. I dunno, call it the virtual equivilant to Myth Busters, only with a much better looking host. :P



Challenge #1 - The Maze

This is a maze. There is a mouse in the maze and it wants to get to its cheese but it doesn't know how. Can you help it? You must find a way to move the mouse from its starting point, through the maze until it finds the cheese.

Download: here

Rules:

1) You cannot directly control the mouse or guide it manually. It must be entirely event, behavior or script driven, with no human intervention required.

2) You may use any method (that does not break Rule #1) available within Construct to navigate the mouse to the cheese.

3) You must use this maze and cap provided, and build upon that, however your chosen method of navigating the mouse through the maze should work on any randomly generated maze of this style and not be tied just to this single layout (so no set waypoints).

4) You must post your cap and any files required but not an executable. This is so the results can benefit other users.

5) Replying with "Oh it's easy" is not allowed, unless you also follow rule #4 as given proof.

6) You cannot move the cheese from it's initial position in the maze, and the mouse must also start in it's initial position.

7) You cannot go through the walls, or teleport, or jump over, or remove the maze. In other words, no cheating!


The winning entry will be whoever comes up with the best or most elegant working solution to the problem. Challenge is open to everyone.

End Date
Midnight December 10th 2009 (Eastern Time, US)



Good luck!
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 04, 2009 5:30 am

this is actually a really cool idea that'll be good to see the vast amount of ways to do things which aren't done all the time nice idea man, good job improving on the idea of that thread :P
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Dec 04, 2009 5:42 am

[quote="QuaziGNRLnose":3aleowmk]this is actually a really cool idea that'll be good to see the vast amount of ways to do things which aren't done all the time nice idea man, good job improving on the idea of that thread :P[/quote:3aleowmk]

Hahaha, thanks ;)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 04, 2009 6:43 am

Its easy.



Okay, my entry is just stupid. But you'll love it.
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Fri Dec 04, 2009 6:48 am

PMSL! Brilliant haha, and dammit I thought I'd covered every eventuality with those rules too, curse you, another mouse! :P
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 04, 2009 7:55 am

Dude, your map is imperfect. I can't really use exact grid stuff with it! :(
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Dec 04, 2009 11:24 am

Aw, that's easy! :lol:

Actually, it wasn't all that easy... it took me a lot longer than I thought it would. I thought I'd have it nailed in under an hour, but it took me closer to two. Then again, I'm not very clever :P

[quote="Mipey":3vvezfwr]Dude, your map is imperfect. I can't really use exact grid stuff with it! :([/quote:3vvezfwr]

Yep, I ran into the same problem, though I didn't use any grid stuff. Because of the way it's drawn, I had some trouble with occasionally getting stuck because if my computer hiccuped then Mr. Mouse would drop frames and time-delta inside a wall. With a better designed maze this could be avoided pretty easily.


Anyway, I think I have it all sorted out now. At least, the last three times I ran the maze Mr. Mouse got the cheese just fine.

Download: http://www.box.net/shared/8p4iv3i27e

I used 8 Direction (with the controls shut off, of course). The rules for the mouse are as follows:

1. If there is an open path to the right, he turns right.
2. If he hits a wall, he will attempt to turn right.
3. If he can't turn right, he will turn left.
4. If he can't turn right or left, he will turn around and go back the way he came (this is a last resort).

It takes him a while to get the cheese, but he gets there eventually. My method is kind of crude, but hey... it works. I'm sure someone else could come up with a much more elegant and streamlined solution.

Like I said he might still get stuck occasionally. If so, just restart the game.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Dec 04, 2009 11:35 am

Smart work. I'm happy with my memetic entry. :Dc
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Fri Dec 04, 2009 12:40 pm

http://dl.dropbox.com/u/629300/mipey_mouse.cap
http://dl.dropbox.com/u/629300/mipey_mouse.exe

Easy. 8)

What is your score (in steps and seconds)? It can take as long as five minutes, if you are unlucky. ;)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Dec 04, 2009 4:53 pm

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.

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 ;)

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests