The Daily Click ::. Forums ::. Klik Coding Help ::. Exact Landing on Platforms
 

Post Reply  Post Oekaki 
 

Posted By Message

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
30th July, 2003 at 15:10:29 -

I am in the process of making my very own platform movement and I can't get my dude to land exactly on the platform. He always goes through it a bit. I've tried saying that if the bottom detector is over the backdrop object, it sets my 'y' counter to 0, but that doesn't work, and I tried if the dude is over the backdrop object then set my 'y' counter to 0, but guess what, it doesn't work.

I am using TGF and am doing the platform movement where the player y coordinate is set to itself plus the y counter.

I need help!

 
http://soundcloud.com/normbo - Listen to my music.

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
30th July, 2003 at 15:19:20 -

if hes set to a bouncing ball, then add the "Player hits background: stop" command. else, use fastloop to quickly reposition him above the platform. im not sure how exactly, but i remember it was mentioned either here or in the articles section a short while ago.

 
www.thenatflap.co.uk

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
30th July, 2003 at 15:20:14 -

have a small non-colision object
right above the REAL colisionable
object... its not exact but it is
one way to fix the problem.


---------------------(0)------------
-----noncolision-----/|\------------
IIIIIcolisionIIIIIIII/_\IIIIIIIIIIII
IIIIIcolisionIIIIIIIIIIIIIIIIIIIIIII

of course there are better ways, but
this way is just so cool cause i got
to draw a picture...

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
30th July, 2003 at 15:20:58 -

bah' crappy universial fonts

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Kramy



Registered
  08/06/2002
Points
  1888
30th July, 2003 at 15:38:52 -

Have your "player" as an invisible DOT.
Now "always" position your collision detectors, and the ACTUAL PLAYER ANIMATION(new object) from the dot.
Because you're not positioning objects from the player you shouldn't get the mix-up of 1 pixel...just remember to have the bottom collision detector 1 pixel below the animation of the player or you'll still get that slight overlap.


 
Kramy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
31st July, 2003 at 01:38:17 -

You should use a fast loop to correct the player. I think i have seen a few examples of it. Tig's has one on his custom movement engine example. (The one with the pig)

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
31st July, 2003 at 11:52:39 -

I've never had this slight overlap problem...maybe it's because my idea works.

Fastloop is another way to fix it without people noticing.

 
Kramy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
1st August, 2003 at 02:21:29 -

Kramy - Do your custom movement engines have realistic gravity? Or non changing (No speed up/slowdown).

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Rhys D

Please enter a custom rating

Registered
  02/01/2002
Points
  162

Has Donated, Thank You!VIP MemberIt's-a me, Mario!Wii OwnerMushroomStrawberrySweetieCardboard BoxOrangeAttention Getter
I am an April Fool
1st August, 2003 at 02:44:34 -

set your "y" counter to "-1" without the quotes of course.

 
http://www.rhysd.com

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
1st August, 2003 at 07:26:34 -

if the character is overlapping a background the set y position -1

this should push the character up.

but it will look like they are sinking into the ground so you could look into fastloop to make it quicker or copy that event a couple of times.

 
.

Kramy



Registered
  08/06/2002
Points
  1888
1st August, 2003 at 14:31:11 -

Mine usually don't have realistic gravity,(because of the game type...stickman quest, etc. ) but it's quite possible to add it.
I usually make my custom movement engines with static movement, controlling everything from events using positioning.(may not be the easiest way, but I enjoy coding, and it takes longer, so it's fun )
If you want I could explain how to add gravity, but it's kind of confusing using my system.
It is highly adjustible however, so it's easy to change gravity from "normal" to "lots" or to "moon" (then again, not as easy as just adjusting some bars on a standard platform movement)

 
Kramy

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
1st August, 2003 at 14:34:43 -

I think it's because I do:
'Every 0;05 seconds:
and floor detector isn't over backdrop object': subtract 1 from 'y' counter.

Now my 'y' maximum is 10, so it could go through the platform by 9 pixels without it noticing and then it will minus 1 to the counter and will still be in the platform.

I have the Algames engine, but I can't figure out why your mouse guy doesn't go through the platform and my fatman dude does.

P.S - I tried the 'set y to -1' method, with little to no success.

 
http://soundcloud.com/normbo - Listen to my music.

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
1st August, 2003 at 14:36:31 -

P.S - Gravity is easy!

 
http://soundcloud.com/normbo - Listen to my music.

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
8th August, 2003 at 14:22:46 -

just simulate a while loop and in the loop move it up 1 pixel until the object is on top of the background like this

-loop0
+if ground detector is over an obstacle
then
char.y =char.y-1
loop0 for 1 loop

ps. the last action makes the loop continue until the expression is false just like a while loop

 
Beware of life ...so far noone have survived it.......

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
8th August, 2003 at 18:19:16 -

The best way is to use fastloop for the movement. Instead of + 10 pixels, use +1 pixel looping (value) times, then say onloop+bottom detector colliding -> stop loop+set value to 0.
This way the player will stop on the loop, and the player will go down 1 pixel at a time, but it will seem like skipping pixels. Then he wont go through the platform

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
8th August, 2003 at 20:20:36 -

i meant set the y relative to its own y coordinate -1 which will push it up a little
but if its set to +1 whenever the character is not overlapping then it may continously move up and down

 
.
   

Post Reply



 



Advertisement

Worth A Click