Mikey's Adventure for Construct 2?

Discussion and feedback on Construct 2

Post » Mon Mar 12, 2012 4:01 pm

Has anyone ported this fabulous tutorial from CC to C2? This is exactly what I need to get going on my maze game.

Here is the info about this game in the Construct Classic forum:
http://www.scirra.com/forum/tutorial-mikeys-adventure_topic38104.html

And a link to the previous forum posts:
http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=4421

Bob Thulfram2012-03-12 16:07:25
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Thu Mar 15, 2012 8:22 pm

I've got it partially done--through lesson 1, and started lesson 2. I didn't follow it exactly, in part because Construct and Construct 2 are so different, but in part because I wanted somethings a little different, such as making a tile sprite object with different frames instead of using tile background objects. This approach means I just have to lay out the grid once, and then just swap frames to switch between dirt, grass, water, etc. for different levels. I was working on how to manage the layering of the trees and rocks when I got sidetracked. I'll see what is needed to finish it up and let you know.

Edit: Question. Do you think this would have to be done for the free version, with its limited layers, or can I go for the paid version?

scidave, I hope you don't mind. If you want to take over once I get it running, I'll give you a list of what I did differently. Or if you'd rather do it yourself, let me know!

Pretty picture for encouragement...


Edit #2: I got the z-order sorting working except for where the tall door and tall wall adjoin, and Mikey can overlap both objects. Cheat solution is to just block that little spot. Real solution is to look at neighboring terrain objects and move them forward or back, too. Hmmm. That doesn't seem right. They should be moving with Mikey overlaps them, too. A collision mask problem?

Edit #3: It was an origin problem. The wall and the door had different origins. I shouldn't have messed with them!kittiewan2012-03-15 21:41:11
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Fri Mar 16, 2012 6:57 am

[QUOTE=kittiewan] I've got it partially done--through lesson 1, and started lesson 2. I didn't follow it exactly, in part because Construct and Construct 2 are so different, but in part because I wanted somethings a little different, such as making a tile sprite object with different frames instead of using tile background objects. This approach means I just have to lay out the grid once, and then just swap frames to switch between dirt, grass, water, etc. for different levels. I was working on how to manage the layering of the trees and rocks when I got sidetracked. I'll see what is needed to finish it up and let you know.

Edit: Question. Do you think this would have to be done for the free version, with its limited layers, or can I go for the paid version?

scidave, I hope you don't mind. If you want to take over once I get it running, I'll give you a list of what I did differently. Or if you'd rather do it yourself, let me know!

Pretty picture for encouragement...


Edit #2: I got the z-order sorting working except for where the tall door and tall wall adjoin, and Mikey can overlap both objects. Cheat solution is to just block that little spot. Real solution is to look at neighboring terrain objects and move them forward or back, too. Hmmm. That doesn't seem right. They should be moving with Mikey overlaps them, too. A collision mask problem?

Edit #3: It was an origin problem. The wall and the door had different origins. I shouldn't have messed with them![/QUOTE]

I'm very, very excited to see you doing this. Maybe once you are done with Lesson 1, you'd let us test it out. I am so eager to see this.

My own answer would be to go for the paid version. My guess is that most of the people who would care about an adventure/RPG would be on the paying customer side of the fence.

Again, this is super cool!!!

THANKS!
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Mon Mar 19, 2012 2:15 am

I managed to finish up part 2. It looks very similar, although there are some significant differences in implementation.

Here is a link to the demo:

Mikey's Adventure Part 2 for C2
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Mon Mar 19, 2012 4:52 am

[QUOTE=kittiewan] I managed to finish up part 2. It looks very similar, although there are some significant differences in implementation.

Here is a link to the demo:

Mikey's Adventure Part 2 for C2[/QUOTE]

Looks like it works. How about Part 1?

Very cool. Keep at it!!!
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Mon Mar 19, 2012 12:07 pm

Part 1 is done of course, but I'm not posting it now, since it isn't very interesting as a demo. In part 1 since Mikey can't do anything except walk around in the first area. Take away the conversation with Jill and the Key Guard and the ability to get through the castle doors, and you have part 1! Oh, and of course there isn't any depth sorting in part 1. For your needs in creating a maze game, the depth sorting is quite important.
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Mon Mar 19, 2012 12:11 pm

[QUOTE=kittiewan] Part 1 is done of course, but I'm not posting it now, since it isn't very interesting as a demo. In part 1 since Mikey can't do anything except walk around in the first area. Take away the conversation with Jill and the Key Guard and the ability to get through the castle doors, and you have part 1! Oh, and of course there isn't any depth sorting in part 1. For your needs in creating a maze game, the depth sorting is quite important.[/QUOTE]

I'm hoping you'll publish all 5 parts when you are done. I'd be thrilled to read each part as you do it, just to follow along. I'm really a newb and I don't even know why depth sorting is or why I need it.
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Mon Mar 19, 2012 12:15 pm

I'm waiting to hear from scidave about how he wants the port posted, since Mikey is his baby. Of course I will post all parts if it is okay with him.

I forgot to mention that so far I'm only using 4 layers and about 25 events (more or less, depending on how they are counted) so it should work with the free version, at least through part 2.
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Mon Mar 19, 2012 12:36 pm

[QUOTE=kittiewan] I'm waiting to hear from scidave about how he wants the port posted, since Mikey is his baby. Of course I will post all parts if it is okay with him.

I forgot to mention that so far I'm only using 4 layers and about 25 events (more or less, depending on how they are counted) so it should work with the free version, at least through part 2.[/QUOTE]

Hey, scidave, please approve!

4 layers and 25 events are just fine. Simpler is better.Bob Thulfram2012-03-19 12:37:49
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Mon Mar 19, 2012 12:48 pm

Didn't see your question about depth sorting.

In 2D games, depth sorting is a way of faking a third dimension by examining the relative Y positions of two objects to decide which one is supposed to be in front of the other. It is accomplished by moving one object to a layer above or below the first object's layer, or using z-order to move one object to the front or back of the layer.

Although it isn't called depth sorting, it is discussed in Part 2 of the tutorial on page 5 (starting with Families)

The problem:

[Quote]When you ran the game did you notice that Mikey always appears in front of the trees, rocks, and walls? This doesnt look right at all! [/Quote]

And the solution:

[Quote]This event says that if Mikey is overlapping the Terrain family from the north (offset 0,100) then put him behind any objects in the family. Else is a special system condition when applied here it means in any other circumstance send Mikey to the front. Try out the new and improved game! [/Quote]

Of course there is no Else in C2, so that isn't the exact logic I used to accomplish it.

Anyway, you can see the depth sorting happen in the demo if you try to walk behind and in front of the trees. When Mikey's "feet" are higher than the tree's "feet", Mikey is considered to be behind the tree, he needs to be moved to the back of the z-order. If Mikey's feet are in front of the trees feet, Mikey is considered to be in front of the tree, he needs to be moved to the front of the z-order. Notice as you pass beside the tree the moment when the switch is made. In the case of a tree it looks pretty good - sort of like Mikey is brushing aside the branches in his way. (If the object is solid, like a wall, it doesn't look quite so good, so you have to use solids cleverly to keep the player from getting too close.)

For a maze game, as the player moves through the maze the depth sorting is really important to make the character appear in front of or behind the maze walls (like the castle walls and the house in the demo.)

Don't worry. It is much simpler than it seems when you first learn you have to do it! Took me awhile to grasp what was going on.

EDIT: One of the reasons I wondered about making this work for the free version of C2 is that it is really easy to deal with depth sorting if you have LOTS of layers to work with. But I managed to do all that is needed with 4 layers.kittiewan2012-03-19 12:56:17
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Next

Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, Yahoo [Bot] and 14 guests