A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: drift like physics

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    40

    drift like physics

    how can i make drifting or sliding like physics for a racing game?

  2. #2

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    40
    that drag not drift

    drift is when the car slides a bit when you brake when going fast

  4. #4
    x2i GingaNinja's Avatar
    Join Date
    Feb 2004
    Location
    England
    Posts
    217
    oh yeah, like in nfs underground. I get it, sorry got mixed up.

    Ill look into it but i cant promise anything

  5. #5
    Junior Member
    Join Date
    Jun 2004
    Posts
    28
    i did a search and one guy did a game. but the link was broken so i dont know how it was. ive been trying to experiment with it a bit myself but im not really getting anywhere.
    does anyone know how to code for an ebrake? like if turning and i press space i turn faster? thatd be great. thanks

  6. #6
    Flash n00b
    Join Date
    Jun 2005
    Location
    Somewhere Witty
    Posts
    81
    just an idea but

    pt1
    slightly limit the ability to turn depending on how fast you are going
    when people turn to fast put them in drift but slow them down

    pt 2
    when people hit the ebrake it sets a boolean to false to disable that so you maintain your inertia but you are much more free to turn the car and you still add to the inertia based on the direction its facing.

    pt 3
    Then set the boolean back to true when they start to go straight again

    i think it should work you may have to edit the maintaining of inertia in pt 2 so that insted of just adding to the inertia in the new direction it moves some of the inertia to the new direction from the curent direction but i think the first way should work well
    Everything tastes better with rabies!

  7. #7

  8. #8
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    Hey!
    Here it goes!
    [F8]
    Last edited by Eager Beaver; 11-06-2007 at 01:23 PM.
    <signature removed by admin>

  9. #9
    Banned
    Join Date
    Oct 2007
    Location
    Estonia
    Posts
    16
    Quote Originally Posted by Eager Beaver
    Hey!
    Here it goes!
    [F8]
    I can't open it, it says " Unexpected file format " i am useing MX.

  10. #10
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    Quote Originally Posted by lamaman
    I can't open it, it says " Unexpected file format " i am useing MX.
    Unable to upload as MX2004 due to file size problem.
    Last edited by Eager Beaver; 10-25-2007 at 02:19 PM.
    <signature removed by admin>

  11. #11
    Banned
    Join Date
    Oct 2007
    Location
    Estonia
    Posts
    16
    i can't open it in MX?

  12. #12
    Working On An Online RPG grimm 88's Avatar
    Join Date
    Sep 2007
    Location
    Nowhere
    Posts
    280
    no... flash does this thing where if the file is made in a higher version than the version you have, it won't let you open it...

  13. #13
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    OK!
    I am able to upload the file in MX2004 without the sound loops.
    Last edited by Eager Beaver; 12-22-2007 at 09:32 AM.
    <signature removed by admin>

  14. #14
    Working On An Online RPG grimm 88's Avatar
    Join Date
    Sep 2007
    Location
    Nowhere
    Posts
    280
    eager beaver... it seems to me that your example just moves about manically when you hit break, and it moves in random directions and positions untill it hits the sides and breaks into little pieces...

    is this what it is meant to do or is the file broken???

    just wondering because it seems a strange and long winded way to go about creating a silly effect...

  15. #15
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    Quote Originally Posted by grimm 88
    eager beaver... it seems to me that your example just moves about manically when you hit break, and it moves in random directions and positions untill it hits the sides and breaks into little pieces...

    is this what it is meant to do or is the file broken???

    just wondering because it seems a strange and long winded way to go about creating a silly effect...
    This is the best I could do!
    Last edited by Eager Beaver; 10-27-2007 at 01:40 PM.
    <signature removed by admin>

  16. #16
    Working On An Online RPG grimm 88's Avatar
    Join Date
    Sep 2007
    Location
    Nowhere
    Posts
    280
    alright... but to me that doesn't seem like drift physics at all... just a random jumping movieclip that crashes and breaks into little pieces...

  17. #17
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    I really don't understand what is drift physics. I thought I have to simulate what happens when you suddenly apply brakes to a speeding car. The car moves in random directions, and when it hits some obstruction it gets smashed up.
    <signature removed by admin>

  18. #18
    Working On An Online RPG grimm 88's Avatar
    Join Date
    Sep 2007
    Location
    Nowhere
    Posts
    280
    well... drift physics ARE when you put the break on, or if you are going fast and turn a corner sharply...

    the way the car is affected is not jumping about randomly, istead it retains some of it's origional directional momentum, but also loses that as it accelerates in the new direction the car is facing and gains momentum in that direction... overall creating a kind of skidding effect and making the car swerve in a semi-circular shape around a corner...

    hope i explained it so that you can understand...

  19. #19
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    I think what you have explained can be named as skidding, rather than drifting. If anybody wants in flash an actual representation of what you have explained it may be possible to do it. I will study your theory of drift (skid) physics, and try to develop a movie in flash. When I can do that I cannot say now.
    Anyhow thank you for your interest on this subject, and for your observations/comments on my movie.
    Last edited by Eager Beaver; 10-29-2007 at 04:37 AM.
    <signature removed by admin>

  20. #20
    Working On An Online RPG grimm 88's Avatar
    Join Date
    Sep 2007
    Location
    Nowhere
    Posts
    280
    no problem... and i think that drifting is like skidding anyway...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center