Trace Movement

Post your own tutorials, guides and demos.

Post » Mon Jul 13, 2009 5:51 pm

Candescence directed me to this:
http://www.sonicfangameshq.com/view.php?sec=6&id=1
a 360 degree trace movement engine made in the games factory, it included the *.gam file so I was able to look at how it was done.

Although it used 22 events, I had a go at remaking it in Construct and managed to do it in 6 :)

The principle is simple. Two 'detectors' come out the left and right of your character and shoot off downwards. The angle of your character is then determined by the angle of one 'detector' to the other. Finally, you move your character up or down so they are standing on top of the ground. However 'down' and 'up' are in relation to the angle the player is at.

Quite a simple and eligant system really.

With these new method in mind, I'll make some additions to the 'custom movement' so such functionality can be available in a much easier way.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Mon Jul 13, 2009 6:00 pm

Very nice.

There is a bug: keep on moving right and you'll see, I don't know how to explain.
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Mon Jul 13, 2009 6:12 pm

Very cool :D

But yeah, I see the bug that Gen is talking about. It looks like if it drops frame the markers can leave the track. Still, that should be fixable with events. Anyway, this is a pretty sweet example :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jul 13, 2009 6:12 pm

Looks good. One point, the markers get buggy when you get to the shark fin, that little hill at the bottom that's close to 90 degrees. If you stay there too long they loose contact and you can hover off.
Making the pixel distance smaller seems to help, but there's still a point where it looses contact

Edit oops yeah wut he said
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Mon Jul 13, 2009 6:13 pm

ah yeah that corner is a bit too sharp for the trace to handle. If the distance wasn't 32 and more like 16 it would probably handle it fine. Also the faster it moves, the more likely it is to 'come off the rails'. A better system would perform the angle evaluation while moving in sub steps...so if you move 10 pixels to the right it actually only moves say 2 pixels at a time.

*edit* lol when i clicked submit it said 'u might want to review the new post'...then i clicked submit again and it said the same thing...2 people posting within seconds of each other haha :D
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Mon Jul 13, 2009 9:12 pm

works the same way as a raster gfx normal finder i had made a while ago
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Mon Jul 13, 2009 10:40 pm

[quote="QuaziGNRLnose":3m8oog98]works the same way as a raster gfx normal finder i had made a while ago[/quote:3m8oog98]
And Soldjahboy Tonks have similair thing.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Mon Jul 13, 2009 11:32 pm

Hmm.

Doesn't want to run for me for some reason.
"Temp.exe has...etc" error message.

Looks good though.

Sponge.
B
2
S
1
G
3
Posts: 105
Reputation: 1,310

Post » Tue Jul 14, 2009 12:58 am

Holy hell, that's awesome. If anyone can do Sonic-style jumping and acceleration as well, we can more or less make Sonic fan games out the wazoo! Wait, would this thing be compatible with jumping and stuff?

Also, with these custom movement additions, maybe you can also make the movement more accurate as well, considering that shark fin bug?
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Wed Jul 15, 2009 6:33 am

[quote="SpongeBrain":2ydgmibc]Hmm.

Doesn't want to run for me for some reason.
"Temp.exe has...etc" error message.

Looks good though.

Sponge.[/quote:2ydgmibc]
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests