The Daily Click ::. Forums ::. Klik Coding Help ::. Slopes in Custom Platform Movement
 

Post Reply  Post Oekaki 
 

Posted By Message

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
16th July, 2009 at 07:47:00 -

Hope everyone sees this again because it's an update with a new upload

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

http://files.getdropbox.com/u/1511825/DR-Engine-2-downwardslopesplz.mfa

Addition of two detectors for left and right wall collisions, they sit one pixel higher to allow for 1 pixel gradient slopes. Works fine.
Addition of two 1x1 pixel detectors for left and right slopes.

What's wrong? The going upward slopes I figured out easily thanks to all of your help. My problem now is downward slopes. I know all I need to do is catch the player in the right position and just move him down 1 pixel so it never thinks it's falling on a slope.. but it's still jumpy I am guessing because of detector sizes/positions. I checked Jess Bowers CPM and I see that yes I am correct in that all I have to do action-wise is move the player 1 pixel down. My bane is detecting it correctly.

Will I really need to add another 2 or 4 detectors to be able to conquer moving down a slope?

Thanks again for all your excellent help and input.

 
n/a

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
18th July, 2009 at 02:37:37 -

... help!

Sorry to triple post.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14450

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
18th July, 2009 at 05:08:11 -

you do need something that checks the ground below the player for downward slopes. Your two current slope detectors are above the ground so they wont work.
You don't need to create more detectors though.
You can just make a new animation or direction that has the two current detectors a pixel lower and only then check for downward slopes.

 
.

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
18th July, 2009 at 20:59:59 -

Hey MBK, is it ok if I use your engine in a game of mine? I'll give you credit.

 
n/a

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
18th July, 2009 at 23:57:40 -


Originally Posted by AndyUK
you do need something that checks the ground below the player for downward slopes. Your two current slope detectors are above the ground so they wont work.
You don't need to create more detectors though.
You can just make a new animation or direction that has the two current detectors a pixel lower and only then check for downward slopes.



Does this mean that the slope detectors would be constantly looping an animation where the pixel moves up and down to "feel" for either the upwards or downwards slope?
I'll have to check this out when I go home today.

I might try changing the animation to check for upward or downwards slopes on loop indexes being even (check up slope) or uneven (check down slope), this is probably fast enough to cycle so that I can check both without missing detection of either..

 
n/a

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
19th July, 2009 at 05:15:05 -

Nevermind, I think I fixed this whole issue.
Thanks again everyone.

 
n/a

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
19th July, 2009 at 06:11:49 -


Originally Posted by Jon C-B
Hey MBK, is it ok if I use your engine in a game of mine? I'll give you credit.



Yes, you can use anything of mine freely unless I state otherwise in the event editor (all my projects are opensource so far). It would be kind of you to give me a credit and I'll thank you kindly for doing so.
BUT if you are speaking of this slopes thing, this is mostly jthongbai's work and you'll need to ask him, as I only added to it.

If you are speaking of my 2.5d platform engine, however, well I would like very much for all klikers to feel free to use that to make games with, as I want to see more 2.5d beat-em-up styled games and new/interesting styles of games on TDC, and while it is not technically needed, a credit does go a long way when it comes to making one feel appreciated.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
19th July, 2009 at 06:41:01 -

I am fine with allowing people to use code I've posted here, just not any graphics.
Though, the code is not too functional anyway so I assume he means your work MBK

I've run into a bug ... again.
This is really strange, I have downward slope movement working perfect now, viewing animation shows me that the fastloop detection is working perfect and it never thinks it is falling now. But now upwards won't work correctly, and I have no idea why as the events should not be clashing at all. I have my original events and yet, I cannot begin an ascent up a slope. But sometimes I can move up again while mid-slope if I am currently moving down.

Also, viewing animation of the sprite shows me that he thinks he's falling as he goes up (if you can manage to make him move upwards a slope).

http://files.getdropbox.com/u/1511825/DR-Engine-2-upwardsbug.mfa

You can probably imagine my frustration now, since at first there was no sloping, then it was working somewhat, then no downwards slope, now descending slopes is perfect and going up doesn't work properly at all
I've made several attempts to detect the upwards slopes at the right point and move him up 1 pixel but it seems he's never in the right spot to jump. I repeat, downwards slope movement works perfect and you can jump while doing so. But upwards has just gone haywire.

(Side note on graphics: a) don't use them and b) I know it's strange but when I get this sloping working perfectly the character will rest lower on the tiles because it's a slight perspective, not dead on side view)

 
n/a
   

Post Reply



 



Advertisement

Worth A Click