Slopes and iregular terrain question.

For questions about using Classic.

Post » Mon Dec 14, 2009 5:11 am

Done a search but found nothing conclusive.

The problem, well, slopes and irregular terrain basically. For example, imagine the following image is part of some game (it's not, it's just an example):



As you can see, the terrain is uneven and goes up a slope, the player would be expected to be able to follow the terrain as they move along.

The thing is, how? Now I know of the trick with using invisible platforms for the actual collision, and keeping those as simple bounding boxes while using the actual terrain as nothing but background art, and that works as expected.. for walls and flat platforms.

So I thought, well just rotate one of them a little, build up sloped invisible platforms like that. Doesn't work though, firstly if using bounding box, it remains a bounding box and doesn't rotate with the object in question, so you've not got an invisible block in the way (not good) regardless of the objects rotation.

So I tried pixel collision with the invisible collision boxes, but that's a little too accurate and the player would get stuck on individual pixels.

So how do you handle slopes and irregular terrain then? I did somehow get it partially working, but the player ended up having to take a slope at speed or they'd stop half way up the slope. If they intentionally stopped while on the slope, they couldn't move onward/up the slope, only back down again to the bottom of it, and often even when they could do it once, a second attempt would fail, so I guess it didn't work at all, heh.

I really want to avoid having to have the player bunny hop up slopes and over hills, or end up just using flat platforms and ladders to reach higher area's.

What would probably be perfect, would be a custom bounding shape, like the kind found in the physics behavior. The control of per pixel collision, but without the tripping up of errant pixels. But as we don't have that, what other ways can it be done?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 14, 2009 6:11 am

So you still haven't taken my Platform School tutorial? Sheesh. :roll:

No, really... it covers this :). Yeah, it only shows 45 degree angles, but you can alter it easily to include in-between angles.

Also there have been some other examples around the forum that use different methods (even in the Platform School thread, I believe), you may be able to find something with a search.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Dec 14, 2009 6:22 am

[quote="deadeye":6ikx9c7u]So you still haven't taken my Platform School tutorial? Sheesh. :roll:

No, really... it covers this :). Yeah, it only shows 45 degree angles, but you can alter it easily to include in-between angles.

Also there have been some other examples around the forum that use different methods (even in the Platform School thread, I believe), you may be able to find something with a search.[/quote:6ikx9c7u]

Oh I've checked your tutorials out, I think they were one of the earliest things I looked at once construct was installed, originally learnt quite a bit from them, but as per your warning on the thread, they do tend to break after the basics. Then I found a post by you that said you weren't planning on covering slopes, so didn't think the rest that weren't working would have them. So I did search, just didn't find much pertaining to this problem (found a lot of posts on how to make Sonic rotate, and how to make most characters change angle on slopes) but that wasn't what I'm looking for either.

I'll give your tutorials another look, they might work in the latest version now, hope so!
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 14, 2009 6:28 am

Hmm ok so it's not me doing it wrong then, sloped platforms aren't working in your tutorial either, you can get part of the way up one then you stop in your tracks (you can go down them easily enough) just can't go up.

:(
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 14, 2009 6:28 am

It says under lesson four how to do slopes.

There's a friggin' slope right there in the picture in the first post for crying out loud.

Edit:
Use v0.98.9
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Dec 14, 2009 6:36 am

[quote="deadeye":mnyhwh6t]It says under lesson four how to do slopes.

There's a friggin' slope right there in the picture in the first post for crying out loud.

Edit:
Use v0.98.9[/quote:mnyhwh6t]

Yeah, you did your slopes just like I've been doing them. So I have been doing them right all along, they just wont work until whatever bug broke them is fixed (I can't downgrade, that breaks other things).

Hmm, I wonder, would taking the platform behavior files out of 98.9 and overwriting the latest version with them work..

And yes there is a pic of the slope in the forum, but not from the (apparently broken) links on the wiki which is where I went first (and selecting the environment one as that seemed the obvious choice) before coming back to the forum to grab it from the thread instead.


The important thing is I was getting it right, it does work, it's just bugged right now. But by the time I need it to work, it'll be fixed. Which is a good thing! :)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 14, 2009 6:54 am

Platform:
a raised flooring or other horizontal surface, such as, in a hall or meeting place, a stage for use by public speakers, performers, etc.
a horizontal surface or structure with a horizontal surface raised above the level of the surrounding area.
a flat, elevated piece of ground.

Hmmm, perhaps something like a custom movement behavior for this would work.
[url:1l9dz6tg]http://dl.dropbox.com/u/666516/cmslide.cap[/url:1l9dz6tg]
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Mon Dec 14, 2009 7:34 am

[quote="newt":3prq2wex]Platform:
a raised flooring or other horizontal surface, such as, in a hall or meeting place, a stage for use by public speakers, performers, etc.
a horizontal surface or structure with a horizontal surface raised above the level of the surrounding area.
a flat, elevated piece of ground.

Hmmm, perhaps something like a custom movement behavior for this would work.
[url:3prq2wex]http://dl.dropbox.com/u/666516/cmslide.cap[/url:3prq2wex][/quote:3prq2wex]

Thats $%& AWESOME!!!! I didn't even know that was possible. That's what I'm looking for with the platform controls (because there are still platforms, but also lots of more natural shapes, hills and so on, which this method would be perfect for!).
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 14, 2009 10:08 am

newt,
I can't open your cap :(
Construct 0.99.62 crashes with message "An unknown error occured while accessing an unnamed file".
Is it known issue? It's strange. How did Lost my Keys open it? : ()
B
3
G
3
Posts: 29
Reputation: 933

Post » Mon Dec 14, 2009 10:28 am

[quote="Russ":2mgzmmuc]newt,
I can't open your cap :(
Construct 0.99.62 crashes with message "An unknown error occured while accessing an unnamed file".
Is it known issue? It's strange. How did Lost my Keys open it? : ()[/quote:2mgzmmuc]

I'm guessing both me and newt have the latest version. Update (if you want to) and it should work fine.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests