Running Along Slopes

For questions about using Classic.

Post » Fri Apr 25, 2008 2:16 am

This is more of a lack of creativity on my part than a valid technical problem, but I'll ask it anyway. I'm an artist, not a programmer. :D

My platform "engine" runs on one box using the physics movement on a box, with a horizontal line one pixel beneath checking to see if there's a platform below it or not, with a sprite on top. The rest is your typical velocity-adjusting according to position, state, and keyboard entries.

I'd like my character to "stick" to sloped surfaces, and not "detach" and fly around when he hits sudden peaks or dips. (Unless he's using a certain attack- launching yourself off terrain like this is the basis of my game.)

I can't seem to create a system for having this happen. I had some invisible boxes that the platform detector hit, which would then mess with his velocity, but they always send him flying in awkward directions and don't really resemble natural movement. Does anyone have any suggestions?

I'll post the .cap if it proves necessary to figuring this out.
B
2
G
4
Posts: 13
Reputation: 1,076

Post » Fri Apr 25, 2008 7:25 am

Not to dodge the original question, but the Platform Behavior is far faster and complete than most engines end users can put together. It handles slopes automatically, and should be able to take care of anything else you need to do.

If you need something adding to it, Ashley should be able to handle it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Apr 26, 2008 3:47 pm

I'll give it a shot.

The thing is is that the character's main attack involves turning into a physics-object and kind of bouncing around, and I'd like his movement to feel as consistent as possible.
B
2
G
4
Posts: 13
Reputation: 1,076

Post » Sat Apr 26, 2008 11:20 pm

Add both behaviors, and turn them on/off as needed.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Sun Apr 27, 2008 2:43 am

[quote:3247vkkz]Add both behaviors, and turn them on/off as needed.[/quote:3247vkkz]

That would be the obvious answer, wouldn't it?

But, the problem is the character switches between various states on the fly, and it's nigh-impossible to get it to switch in a smooth, consistent fashion. The sense of momentum is always disrupted and makes the whole thing incredibly awkward.

With that said, didn't Ashley say he had it planned so you could set friction and bounciness on physics objects anyhow? It could be the solution is waiting in the next release...
B
2
G
4
Posts: 13
Reputation: 1,076


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests