# Tag Info

### How can bays and straits be determined in a procedurally generated map?

Here's a rough idea using image processing transformations to isolate the features of interest: Apply a flood fill from an ocean cell to make a mask of all ocean cells. Depending on how your rivers ...
• 112k
Accepted

### How can bays and straits be determined in a procedurally generated map?

The way Dragons Abound identifies bays is to walk along the coastline and find two spots on the coastline where the straight-line distance between the spots is less than the distance along the ...
• 416

### Transmission implementation in a car game

this is because there is no inertia in your speed computation. you just compute it as an absolute consequence of engine rpm and gear. but when you compute the new rpm after gear shift up, you ...
• 2,343
Accepted

### Transmission implementation in a car game

Calculate the new RPM based on the new gear and current speed of the car. speed = (int) ((float)rpm / (float)maxRPM) * (float)maxSpeedsPerGear[gear - 1]); so: ...
• 814
Accepted

### How can I simulate a floating character in Box2D?

UPDATE: over the years I've become a bit more knowledgeable, and I realized Setup 2 can be modeled in a simpler way. I've added Setup 3, which I believe is the best solution. Your question inspired ...
• 1,685
Accepted

### Non linear scaling to show a sol system

Use a logarithmic scale where drawnRadius = log(actualRadius). You then end up with a spacing like this which shows all the planets quite neatly separated: (this ...
• 111k

### How can I simulate relatively realistic weather?

Fake it. At least to some extent. There is a field of programming that is concerned with simulating weather, as you're probably aware. It has come a long way, and we have very accurate weather ...
• 91
Accepted

### physics engine without time steps

The problem is this only works if movement is linear and there is no possibility of other moving objects hitting one another. As soon as you have multiple forces changing the direction in non-linear ...
• 11.7k

### How can bays and straits be determined in a procedurally generated map?

Basically, you need to think about what you mean, precisely, by a bay or strait, and why you want to differentiate them (is it for AI calculations, or to label landmarks, or something else?). Play ...
• 161
Accepted

### What technique can I use to animate interaction between tiny objects in a sim game?

More often than not: it's all for show. In Stone Librande's GDC 2013 talk "Simulating a City, One Page at a Time" he illustrates this with the original SimCity, where even on those primitive ...
• 112k

### How do I calculate legal moves in a travelling board game?

One solution is to use a recursive function (Video explaining recursion). So for example the player is on the red square and he can do 5 moves : The function should see that the square on the right ...
• 1,718

### Transmission implementation in a car game

Gears are used as a reduction mechanism. Using a simplified transmission with just two ratios in the gearbox, one input gear (the engine) and one output gear (one of the ratios of the gearbox) we ...

### How is structural analysis done in games (e.g.: bridge building, Dig or Die, and 3D)?

I am the dev of Dig or Die, so I can give a little more details about the game physics Indeed the most crucial point was the performances, as in the game you can build thousands of physical blocks, ...
• 151
Accepted

### Simulation of ball movement in a 3d landscape. The easiest way?

The first step in implementing a physics engine is to model the movement of each object in form of a 3d velocity vector. Each object has current velocities in x, y and z direction. Each logic tick of ...
• 111k

### Height field/Shallow water eqation water simulation with ground height

In a nutshell, what makes a shallow water equation a shallow water equation is that the water height is not zero and it assumes no variation in the seafloor. Note: No fluid dynamics equation will ...
• 1,740

### Transmission implementation in a car game

Keep in mind that an engaged manual transmission is a two-way device. The engine can accelerate the vehicle, just as the vehicle (more specifically its momentum) can accelerate the engine. This was a ...
• 141

### How is structural analysis done in games (e.g.: bridge building, Dig or Die, and 3D)?

I've personally had good success with Iterative Relaxation. I think it follows the laws of physics quite nicely when dealing with objects made of aggregates of blocs. I believe the BridgeBuilder ...
• 421

### Simulating Smartphones on PC with Unity

Unity Remote exists for this purpose. Quoting their description: Unity Remote is an application that allows you to use your target device as a remote control for your project in Unity editor. ...
• 15.6k

### How do I run a physics simulation in the background, to determine possible future outcomes?

In most game engines, physics objects live in their own world, and are connected to game objects through some special logic, responsible, for instance, for copying transformations and notifying about ...
• 1,251

### Simple Water surface simulation problems (GDC2008 Matthias Muller- Hello World)

The error is in the slide, the correct implementation is: ...
• 2,826

### How can I simulate a floating character in Box2D?

NauticalMile's answer is great (and bonus points for the killer animated diagrams). To give an alternate suggestion that doesn't suffer from the same problems (the wheel collision stopping you from ...
• 6,008
Accepted

### How should I efficiently store faction relationships?

You could keep the factions in a dictionary inside your scenario/map/level instance, using ("groupA", "groupB") tuples as keys to store the relations between groups....
Accepted

### What are the practical differences between discrete and continuous simulations?

(I apologise for the length hereof, but I'd like to clarify a few things to give you solid footing.) All digital computer simulations are actually discrete in nature. This includes everything from a ...
• 29.1k
Accepted

### How to make a noise gradient?

Here are two different ways I might approach this problem, showing how they change as the effect intensity is cranked up & down. The outermost column on each side is just my gradient, computed as ...
• 112k
Accepted

### Applying friction force not working correctly

When velocity is 0, friction becomes a zero vector and you can't normalize it, that's why it becomes NaN
• 14.5k
Accepted

### Effective & Efficient Way to Simulate a Desert

Notes: I know this is about Egypt, but I will not make this specific to Egypt... because people coming here may find this question and its answers useful for other desert simulations. I am trying to ...
• 17.9k

### gravity simulation implementation

@Bramm has the right answer. To be more specific, if you want a circular orbit, the planet starts at distance $r$ from the black hole and the acceleration is $a$ you want to give the planet an ...
• 308
Accepted

### Throwing a ball and estimating its path using a Physics engine

Well I think it's possible to solve parabola/shape intersection equations. But first the problem is; I think it would be tricky to solve for more complicated shape and the intersection algorithm ...
• 12.5k