Posted By
|
Message
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
8th December, 2003 at 08:50:39 -
Here's a question to get the old grey cells wirring...
..I'm planning a sidescrolling space shoot-em-up, with a custom game engine (including custom level engine, etc, very fly and nice). What's more, you should hopefully be able to customise your vehicle, and buy more parts with money you get from your missions.
Basically, you'll hopefully have an option of many basic chassis, each with its own various mounting plates. You then buy peripherals to add to these plates, such as guns, engines, spatial stabilisers, etc, and they affect your physics.
That's the easy part, I can do that no problem.
The difficult part comes next. I want the weights of the various peripherals, as well as the weight of your own chassis, and the locations of the engines, to affect the actual handling of the machine.
Eg: If you have boosters on the underside and back, and a massive heavy cannon on the top, then when you slow down the excess weight on the top rear will slowly pull the back upwards. Concordantly, if you have lots of weight on the back and you switch off your underside boosters, the back should slam down much faster than the front.
Then there's updating the location of the hotspot to make sure it rotates around the correct point depending on where the peripherals and engines are.
Anyone fancy giving me some tips? The images are all going to be in APOs, so actually changing hotspot, etc, are no problem at all. The movement is a custom 360 dgree one, of course.
Hopefully when it's done, inactive guns will swing as you move, and rotating a ship with the engine in the front and a load of weight at the back will cause it to completely swing and drag backwards a while with the engines trying to battle against the inertia. In short, it wants to be very realistic.
I'm still racking my brains over how this could be done accurately -- I'm interested mostly in the formulas I could use. Anyone know much about weight distribution in vehicles?
191 / 9999 * 7 + 191 * 7
|
Lazernaut
Registered 08/09/2002
Points 1103
|
8th December, 2003 at 09:15:10 -
I'm think that maybe you could have 2 counters for back and frontside of the car, some counters for the guns (one counter per gun ?). Then if the counter for the gun, booster and whatever are equal to 1 (= they're on the car), add the weight of the appropriate gun to the back/front side counters... hope it's not too confusing, and i'm sorry i don't have a definitive answer..
n/a
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
8th December, 2003 at 10:35:27 -
Alas, there's more to it than that. Depending on where the boosters are, the point of rotation will be different sometimes too.
I may well stick to the idea of grouping weights into middle, top, left, right, bottom, etc.
Ps: It's a spaceship, not a car. It's kind of like one of those amiga-style sidescrollers, but a bit more physics-heavy, heh.
191 / 9999 * 7 + 191 * 7
|
cake
Registered 13/12/2002
Points 1173
|
9th December, 2003 at 03:38:01 -
Active Picture Object allows you to change the hotspot at runtime, maybe give that a go?
n/a
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
9th December, 2003 at 06:01:15 -
Yeah, I'm using that method already. The real problem is knowing where to move it to, heh. I did a bit of thinking, and it seems that depending on which engines are firing/how much weight there is on each corner, the hotspot should change:S
191 / 9999 * 7 + 191 * 7
|
|
|