Game Maker Spaceship Engine Names
I'm trying to make a top-down spaceship game and I want the movement to somewhat realistic. 360 degrees with inertia, gravity, etc. My problem is I can make the ship move 360° with inertia with no problem, but what I need to do is impose a limit for how fast the engines can go while not limiting other forces pushing/pulling the ship. So, if the engines speed is a maximum of 500 and the ship is going 1000 from a gravity well, the ship is not going to go 1500 when it's engines are on, but if is pointing away from the angle is going then it could slow down. For what it's worth, I'm using, and all I need is the math of it. Thanks for any help, I'm going bald from trying to figure this out. Well, lets consider the realistic problem first and see why this doesn't work and how we have to differ from it.
The Best of the Spaceship Generator. You can generate your own, or here are some good combinations that came up when I used the spaceship generator myself: Spaceship Name: CCS Cholimon Type: Slonish-class Automated cruiser Weapons: Side-mounted Light Turrets Defence: Mk III Regenerative energy shield Condition: Battle-damaged, but sturdy. Game engine recreation is a type of video game engine remastering process wherein a new game engine is written from scratch as a clone of the original with the full ability to read the original game's data files. The new engine reads the old engine's files and, in theory, loads and understands its assets in a way that is indistinguishable from the original.
In space as long as your engines are firing, you will be accelerating. Your speed is only limited by your fuel (and in fact you can accelerate faster once you've spent some fuel because your moving less mass). To give this model an effective maximum speed, you can consider particles in space slowing you down and causing friction. The faster you go, the more particles you're hitting and the faster you're hitting them, so eventually at some fast enough speed, you will be hitting enough particles the amount of decelerating they do exactly cancels out the amount of accelerating your engine is doing. This realistic model does NOT sound like what you want. The reason being: You have to introduce friction. This means if you cut your engines, you will automatically start to slow down.
You can probably count this as one of the unintended forces you do not want. This leaves us with reducing the effective force of your engine to 0 upon reaching a certain speed. Now keep in mind if your going max speed in the north direction, you still want force to be able to push you in the east direction, so your engines shouldn't be cut out by raw velocity alone, but instead based on the velocity your going in the direction your engines are pointing. So, for the math: You want to do a cross dot product between your engine pointing vector and your velocity vector to get the effective velocity in the direction your engines are pointing. Once you have this velocity, say, 125 mph (with a max speed of 150) you can then scale back the force of your engines is exerting to (150-125)/150*(Force of Engines).
This will drastically change the velocity graph of how long it will take you to accelerate to full speed. As you approach the full speed your engines become less and less powerful. Test this out and see if it is what you want.
Another approach is to just say Force of Engines = 0 if the dot product is >=150, otherwise it is full force. This will allow you to accelerate linearly to your max speed, but no further. Now that I think about it, this model isn't perfect, because you could accelerate to 150 mph in the north direction, and then turn east and accelerate to 150 mph going in that direction for a total of 212 mph in the north east direction, so not a perfect solution.
Friction forces are probably the easiest way to deal with this. Make them proportional to the magnitude of the velocity and tune their strength to cap the speed that the ship can reach. And don't worry about realism; you've already said you're not trying for it and there is (very tenuous) gas in space to provide the friction force. Of course, if this were a truly realistic model then you'd have to take into account the fact that the gas flows and is really a fast-moving plasma (solar wind) within star systems.:-) – May 23 '10 at 7:44 •.
You need to have three variables for your ship, which you update at each physics time step based on the forces that are acting on it. These will be mass, position, and velocity. Fire emblem radiant dawn pal iso download torrent.
(note that position and velocity are single numbers but vectors). At each physics time step you update the position based on the velocity, and the velocity based on the acceleration. You calculate the acceleration based on the forces acting on the ship (gravity, friction, engines) Newton's equation for force is F = M*A We can rearrange that to A = F/M to get Acceleration. Basically you need to figure out how much the ship should accelerate, and in which direction (vector), then add that acceleration to the ship's velocity, and add the ship's velocity to its position. Here is the code you should execute each physics time step (I hope you can fill in the blanks) please ask if this is not enough detail gravity = //calculate force of gravity acting on ship from Newton's law of universal gravitation friction = //ten percent of the ship's velocity vector, in the opposite direction engines = 0 if (engines_are_firing) engines = 500 forces = gravity + friction + engines acceleration = forces / ship.mass ship.velocity += acceleration ship.position += velocity redraw(). @Thomas If you assume engines blasting at maximum force and assume the weight of the ship to be constant and some coefficient of friction, you eventually stop accelerating at some Max Velocity (in this model you can't speed past it with the power of the engines alone. But could with a black hole or something to sling shot around, which is what the OP wanted).