Tag Info

Hot answers tagged

22

On one driving game I worked on, we had multiple samples per car - the engine held at certain rev intervals, and a sample each of the car ascending and descending the rev scale IIRC. All of these were recorded from the exhaust, the sides, the front, and inside the real-life car so the sound could change as you moved the camera. Then we blended between ...


13

Sounds like a similar problem to that of inputs: you have 100+ keys on the keyboard but don't want to check each individual key on every frame, so what do you do? Two answers: polling or system messages. Polling = at any point when it would actually matter in the game, query the state of the keyboard keys (or the objects, in your case). The rest of the ...


13

There is an excellent SIGGRAPH presentation on PixelJunk Shooter 2's lighting and physics simulation, including fluid mechanics, available on youtube.


13

I tried it. Brown is generated hair. The red circle is the hairbrush. The hairstyles were achieved by brushing the hair with the hairbrush. Here's how that works: The Hair Hairs are like this: Bendy. Like a bezier curve. Quadratic ones are pretty simple. Finite. They start and end somewhere. They also have some fixed length. Coloured. They've got ...


13

To understand how to simulate aerodynamic flight, one first has to understand which forces affect the movement of an aircraft. The actual trajectory of an aircraft is the sum of all of these physical effects: Newton's first and second law of motion An object moves at a constant velocity, unless acted upon by a force. The acceleration of a body is directly ...


13

The elements you can use to present emotions I can think of are: Visual character animations (walking upright, bowed or hobbling, arms near the body when cold) especially facial expressions textures or decals (injury, blood, scratches) particles (sweat, blood) Gameplay player abilities (movement speed, jumps, reaction time, attack strength) body ...


12

A lot of physics engines operate at a scale of 1 unit = 1 meter. Unity isn't any different, as you can see in the manual. The size of the your GameObject's mesh is much more important than the mass of the Rigidbody. If you find that your Rigidbody is not behaving exactly how you expect - it moves slowly, floats, or doesn't collide correctly - consider ...


11

every time I tried to simulate water I just ended up applying a lowpass filter on a texture representing water level. It's very simple to implement but it fails whenever you get massive changes in water level which may generate large waves. In this method there are some places where water always have some constant level, like river ends. in those cases you ...


11

Script one (or two or three) bouncing paths for the ball to follow. Adjust the rotation of your wheel model to cause the correct slot to land underneath the ball's final destination. A bouncing path: construct complex animations made from many small movements of the ball over time, such that it appears to be natural physical motion around the structure of ...


11

Your question inspired me to play around with the RUBE editor to find a nice solution. Here's what I came up with: Setup 1 Let's start with the simpler one on the left. It has the following setup (from the bottom up): A wheel body that can roll back and forth A small box (chassis) attached to the wheel via a revolute joint. The chassis body is not ...


10

If you had searched for "easing formulas" it would've been the first result. http://www.gizma.com/easing/


10

You can either copy an existing battle system, or create a new one. Copy. This is obvious, use Google to find information about some RPG mechanics (e.g. AD&D or Fallout) or play your favorite game and this will be inspiring enough. Problem with this solution is the fact that better systems are more popular and players are more bored with them. Create. ...


10

You can calculate this based on the properties of the vehicle. Using Ackermann steering geometry you can calculate the center of the turning circle. This will take into account the length and width of the car and simulate accurately the maximum steering radius you can take. The reason you're unable to find a definitive answer is because it varies from car ...


9

See "Capturing Engine Sounds for Games" for ideas about how the pros do it. The article references this SDK, which I worked on. Unfortunately, it is no longer supported. It was free, so there may be copies floating around somewhere.


9

So I'm going to take a step back from implementation and review the question from a design perspective. Do you have a solid plan for displaying all the detail you want to include in this simulation? For example: Can the player tell the difference between an animal with an empty stomach and an animal with a full one? Does this information matter to them in ...


9

Just brainstorming here... Interestingly enough, network lag is your friend in this case. As in you WANT a delay to occur for some data packets, at least if it's about drawing. But instead of a base lag each player would normally have for all data packets impacted by just their network speed, you need to apply specific lag for each event to each player ...


9

One easy-ish approach is to keep old loading functions around. You need only a single save function that writes out only the latest version. The load function detects the correct versioned load function to invoke (usually by writing out a version number somewhere in the beginning of your save file format). Something like: class GameState: ...


8

This is exactly the way we solved this problem in Stendhal. In our case there are lots of things that happen periodically, but not every turn: Healing spells, plants growing a little further, corpse degenerating, items on the ground expiring. We have a turn number that is increased in every turn. And we maintain a map of future turn numbers pointing to a ...


8

PixelJunk shooter from Q-Games has nice set of fluids. There is a GDC paper they have published here: http://fumufumu.q-games.com/gdc2010/shooterGDC.pdf (PDF!) Jos Stam from Alias Maya fame (now Autodesk) wrote paper on real time fluids in games here: http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf (PDF!) And he wrote a simple FFT ...


8

Several solutions. For Box2D, set b2_velocityThreshold in b2Settings.h file. In my case, I set it to 0.0f and it worked! Mass, friction, damping were NOT problem. Check this discussion thread for more details. http://www.box2d.org/forum/viewtopic.php?f=3&t=6906&p=30782#p30782 Using other physics engine. Newton Game Dynamics configured performing ...


7

I had a similar problem on a game I worked on a few years back - the simulation of objects was complex and couldn't really be performed in detail on every object in the world. The solution was to use the LOD concept to the simulation. Objects within the view of the player would run the full simulation. Objects far away from the player ran a highly ...


7

Here is one, with source Fluid simulation for video games series : Part 1 - 9


7

You have an opposing force called "friction", which is proportional to speed. This is how objects falling in an atmosphere are modelled, for example. If your impulse force is F, a constant, and you have a mass m, your acceleration is the constant a = F/m Let's call the friction force Q, and the acceleration caused by that q. We have that Q = k*v ...


7

Car manufacturers generally list the turning circle radius, as well as the wheelbase of the car. From there following the diagram above with some simple maths you can calculate back to the approximate steering angle of the inner wheel. atan(wheelbase / (turning circle - car width)) = angle. For the outer wheel don't subtract the width. Picking a random car ...


6

Small university project of mine, calculates 4 given engine sound sample-sets to represent realistic engine sound. Have fun!


6

The keywords you're looking for are "support points" and "manifold". Erin Catto has written an excellent 2D physics engine. He regularly presents at GDC. You should be able to find some of his slides where he explains collision manifolds. The first version of his physics engine only supported box shapes to simply calculating the support points. Which is ...


6

The large gear has circumference 2πR1 and the small one has circumference 2πR2, so when the small gear has made a full circle, it has turned R1/R2 times around itself, minus one time because it turned inside the large gear (it would be plus one if the gear was outside). So when the centre of the inner gear is rotated by angle t, the gear itself needs to be ...


6

If you're looking to have not a lot of water move over a terrain, then your best bet will likely be some form of Smoothed Particle Hydrodynamics (or SPH). In this formulation, you simulate a set of particles as they adhere to the laws of hydrodynamics (namely, the Navier-Stokes equations). There is a great series of articles written about this from Intel: ...



Only top voted, non community-wiki answers of a minimum length are eligible