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?
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?
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.
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?