The Daily Click ::. Forums ::. Klik Coding Help ::. I'm making a custom platform movement for the first time ever, but I have a slight problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
24th February, 2007 at 08:04:39 -

Hi!

Okay, I've figured out most of what to do, but the one thing that happens on occasion is that one of the invisible detectors will get slilghtly caught up on an obstacled backdrop. It doesn't hinder anything really, it just looks like crap. I've heard that there is a way to use fastloops (of which this doesn't have any so far) to "push" your character out of the floors when this happens so you won't notice it. Unfortunatley, every time I try to do this my guy just gets all jumpy and stuff.

I already have the left and right, sword attack, working gravity, and a jump with a variable ceiling and leap strength and they all work fine. It's just that damn little stuck thing that happens which I can't figure out yet.

Any pointers?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

steve



Registered
  13/09/2002
Points
  200

VIP Member
24th February, 2007 at 08:36:49 -

hey, great to hear you are experimenting with custom movements!

Problems like this occur depending on how much gravity you have (if any) you need to look at your code that pushes your character down when he is in the air, if for example it was only +1 pixel at a time (IF bottom marker not overlapping obstacle) then it wouldnt cause any problems, right? So you need to think about how this works in relation to how fast your character moves down.

For my custom movements I don't usually need any "fast loops" just one or two duplicate lines does not cause any slow down in the big scheme of things. Example: "bottom marker is overlapping obstacle then -1 pixel up on character" copied a few times and you wont see any jumping. It's all trial and error though, whatever works best for your specific game.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
24th February, 2007 at 08:46:56 -

Hey I never thought of having duplicate lines for that!

Yeah, for now my gravity is set at +3 per cycle, and the vertical leap is set at -2 per cycle. When the player jumps, I set a jump ceiling value equal to (player Y position - 40), and when the player gets to that height, the flag goes off and gravity resumes. Of course, if the top detector near the top of his head hits an obstacle (like a ceiling), I then make the value jump ceiling equal to the player's current Y position and he starts to fall from there.

I think that sounds about right?

Image Edited by the Author.

Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
24th February, 2007 at 08:48:33 -

Rather than using a "push" event, handle your movement with fastloops (so where your engine might move the dude 4px, instead run a loop that moves him 1px four times) and put 'detector NOT overlapping' triggers in the event with the fastloop trigger. That way it's simply impossible to ever wind up inside the floor, as long as everything else is built solidly.

If you do use a "push" event, just make sure it comes AFTER whatever events could possibly be forcing the guy into the ground.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
24th February, 2007 at 09:35:30 -

Ah! So set the fastloop "JUMP" index to my vertical leap per cycle value, which would now be 2? Fastloop only 2 times? I could make the value more but I don't want the guy skyrocketing all around. Of course, even if it's only for 2 passes it'd make sure the guy couldn't get stuck like you said.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
24th February, 2007 at 10:58:19 -

how fast does your character walk?

also if they have a fixed speed it's usually easier to make collisions for, in my experience anyway.

 
.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
24th February, 2007 at 11:39:35 -

I have him walking so far at a set value of 1 pixel per cycle. It doesn't seem all that slow because each frame is only 320 x 200 in size.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
24th February, 2007 at 11:54:54 -

Seems like the walking speed wouldn't match the animation very well.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
26th February, 2007 at 19:27:14 -

I just emerged from my spider hole after 48 hours and believe it or not, I've somehow managed to make a GREAT platform engine!! This is just unreal, but I can't find any bugs and it's going to make Hasslevania just a whole lot better. An engine worth of all you pros, my gameplay score will be higher than a 2 this time!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click