Slopes and iregular terrain question.

This forum is currently in read-only mode.
From the Asset Store
Build your map with these isometric objects and terrains
  • 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):

    <img src="http://steamgauge.com/misc/construct/Untitled-4.png">

    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?

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

    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.

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

    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.

    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!

  • 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.

  • 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

  • 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

    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!

  • 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.

    http://dl.dropbox.com/u/666516/cmslide.cap

  • 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.

    http://dl.dropbox.com/u/666516/cmslide.cap

    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!).

  • 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? : ()

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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? : ()

    I'm guessing both me and newt have the latest version. Update (if you want to) and it should work fine.

  • > newt,

    > I'm guessing both me and newt have the latest version. Update (if you want to) and it should work fine.

    >

    You mean 0.99.7? Well, don't know, it's unstable. I'll rather wait

  • + Sprite: On step

    -> Sprite: Push out of Sprite2 : Normal (use for slide)

    -> Sprite: Apply friction of 0.5 to speed

    + MouseKeyboard: Key Right arrow is down

    -> Sprite: Accelerate horizontal speed : 100

    (orientation 45 degrees)

    + MouseKeyboard: Key Left arrow is down

    -> Sprite: Accelerate horizontal speed : 100

    (orientation 140 degrees)

    Where Sprite is the player, and Sprite2 is the terrain.

    Note:

    You could make a Sonic type of game out of this by figuring out a way to adjust the orientation.

  • newt,

    thank you very much! It works nicely.

    I should learn more about custom movement behavour - it's so powerful stuff

  • What is the latest version? Both the website and my client say version 0.99.62 is the latest. I'd like to check out this sweet cap file, but I'm also getting an error when I load it:

    Microsoft Visual C++ Runtime Library

    ------------------------------------

    Runtime Error!

    Program: C:\Program Files\Scirra\Construct\Construct.exe

    abnormal program termination

  • You need to hit up the Construct Discussion forum to find the latest releases. Currently it's 0.99.7. They're always marked as "unstable" at first, so the devs can get community feedback on whether it's working okay or not. They usually get a stable release on the front-page a couple weeks after, depending on how they perform.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)