User Tag List

Results 1 to 4 of 4

Thread: better crashing/inertia for racecar-type objects?

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    better crashing/inertia for racecar-type objects?

    I would be thankful if anyone can help me with this. I have the player controlling an object that uses racecar movement, and you go at high speeds, whatever, but it seems ridiculous that when you crash into an obstacle backdrop the car just instantly loses all its speed and there is no other movement, and the player then has to accelerate to full speed again from 0.

    I'm not sure how to proceed. It seems like maybe a crash into a wall/building/whatever would cause some sort of uncontrolled movement that wouldn't necessarily just stop the car in its tracks. I just don't know how to simulate this (I know it's 2D, it doesn't have to be perfect) in MMF2.

    Likewise, is there a better type of movement I should be using for the player-controlled car? One that allows more realistic-seeming control than the klik-and-play-style "race car" movement?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: better crashing/inertia for racecar-type objects?

    The default player movements are only really suitable for quick demonstrations or tests - usually it's best to write your own from scratch and control objects using events.

    Unfortunately, I don't really have a clue how to do this reliably with a top-down racecar type movement - I tried a couple of times before and the results were pretty disastrous. Has anyone actually done this?

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: better crashing/inertia for racecar-type objec

    Are you aiming for a system where say if you hit a wall, it would bounce the car off the wall (with the angle change) and keep most of it's speed? To do that, you need to find a way to find the angle of the wall you hit, and the angle of the car. Finding the normal line of the wall is the toughest part because there is no way to detect where the collision point is.

  4. #4
    No Products Registered

    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: better crashing/inertia for racecar-type objec

    Thanks for your responses. Controlling the movements with events seems like a really good idea, maybe I'll figure something out in the process. I've already been augmenting the racecar movement with events (to improve acceleration/deceleration), but it's probably best to just do it entirely from scratch. The scale/angle tools in MMF2 look amazing, anyway, at least compared to the old 32 directions.

    Hmmm... I figure in a 2D top-down environment that bouncing the car off the wall at a different angle is probably the best I can do. Better than it just stopping, anyway. The important thing is as you said "keeping most of its speed." I could use invisible active objects for this, I would think, to test for collisions with "vertical" and "horizontal" wall lines, except that would probably end up using too much memory as this is already a HUGE frame.


    EDIT: Okay, I wrote a new set of events that controls the movement of the player's car and I am blown away by how much better the game seems already. However, I'm having a problem detecting collisions with the background when I'm just moving the X and Y of the car. I figured out I could test for "overlap" with the backdrop and then make the the car unable to move until it's off the backdrop, but that's the best I've come up with so far. The car gets stuck every time it hits anything.

    EDIT 2
    I've tried many ideas I had for solving the "car getting stuck in the side of obstacles" problem (including the platform-intended "Move Safely" extension), and none really work. I just want to simulate the default MMF2 behavior which is usually "stop when you hit the object, and whatever you do, DON'T GO THROUGH IT." It seems every possible solution I've come up with makes the car perform some weird movements that ultimately result in it sliding slowly through adjacent backdrop objects.


    Any tips?

Similar Threads

  1. Road type objects.
    By legocacher in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 16th January 2011, 02:32 AM
  2. Racecar movement = close application?
    By Threeleggedyoyo in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th November 2008, 04:30 PM
  3. Smooth 8 direction movement with inertia
    By Random in forum File Archive
    Replies: 3
    Last Post: 5th May 2008, 04:58 PM
  4. Inertia - 360° enemies
    By Random in forum File Archive
    Replies: 22
    Last Post: 28th January 2008, 10:17 AM
  5. Spacey/Gravity Physics, Inertia, etc
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 17th February 2007, 02:48 AM

Posting Permissions

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