Tag Info

Hot answers tagged

17

There's an excellent article out there that explains the 3D rendering of these games in detail. And you'll also find a complete implementation in JavaScript here. The basic idea is as follows: You divide your screen into a number of strips and use perspective-projection to calculate the texture-coordinates (scaling and y position inside the road-texture) ...


10

In cinema, photography and game design, it's fairly common-held knowledge that certain type of perspective and movement can cause objects to seem out of scale with each other, or simply to receive less attention from the viewer. The solution to such a problem is to play with scale empirically until things "look right". I've not heard of an exact formula or ...


10

It depends on the level of detail you go into and how you generate your data. From Will's post, deriving your layout from OSM does seem to be a way of doing this to an extent, however if you derive anything from any other source you'll need to carefully check their licences very carefully. There may be certain buildings or objects in real cities or ...


10

The "slow-down from the collision" has always been enough to discourage me from driving carelessly in racing games. If you hit a wall head-on, you're immediately at a dead stop. You'll be passed by any cars that were within 10-20 sec of you, depending how many seconds it takes your car to get back up to speed once you're positioned back onto the track. ...


9

Shawn Hargreaves describes how MotoGP used a special track-relative position system. Ignoring the vertical y position, the x/z Cartesian coordinates are translated to a track-relative system. This had many benefits for calculations involving the relative positions of participants in a racing game (for example for the AI): A common simplification is to ...


8

You can use OpenStreetMap.org - their license is clear and suitable: You are free to copy, distribute, transmit and adapt our maps and data, as long as you credit OpenStreetMap and its contributors. osm2xp is for example using this data for the X-Plane game:


8

This blog has four links (the third is broken), the first of which seems like an amazing resource, the others seem pretty great too. I'm probably going to read over this just for funsies, should be a good read. You could take a look at the Rigs of Rods engine, it's an open source soft-body vehicule simulator, it may give you some insight into how it's done, ...


7

1) Assumes that both objects are moving on the same line - (this is explained in the wikipedia page you linked) your conclusion is correct, in this situation, with constant velocities, the frequency shift is constant. For the frequency shift to change, the relative velocities need to change, hence formula 2), for the situation where Vs is constant but not ...


7

Build a mock up and run through your environment just to see what it feels like. Build several tests, try them all. You can't blindly use rules from someone else when it comes to making YOUR game feel good, there is only testing with players and iteration. You could use someone else's rule of thumb to build one of your tests, of course. Maybe later, ...


6

One solution would be to cheat a bit and guess what the player wants to do. When the player is on a straight section and presses left, you can assume that he wants to switch lanes. When he is close to a curve or intersection, he certainly wants to turn. The player is unable to control it's exact steering angle in a curve, so you could decide to give the ...


6

Vector : Vectors describe the magnitude and direction. If you just want the direction you simply normalize it. This causes the vector to shrink to fit into the unit circle. Meaning that it has magnitude/length of 1. From rotation angles: To get the x and y components for your direction: //(pi/180) - > degrees to radians. (180/pi) - > radians to ...


5

Personally I don't think there's that much special about racing games that makes them that specific to choose engines for. I would think that things like cost, language, platforms, art pipeline, etc. are more relevant to the topic at hand. Since there are at least a dozen "what engine should I use for game type X" questions out there I'm not going to ...


5

Your own proposed answer is spot on; to determine the finish time for a car, you take its position on the frame before finishing and its position on the frame after finishing, and determine at what point during that frame it actually crossed the finish line. If (for example) it crossed the finish line at 40% of the way from its previous position to its ...


5

It really depends on what you want your game to "feel" like. You could go with the Micro Machines method of using a tilemap to generate the track. However, if I were you I'd go with the "cool" solution: a spline. First, you should realize that a spline is nothing but a set of points. It has a beginning and an end. A straight line is a form of spline. ...


5

I'm not sure what language you are working in but there is a procedural mesh extrusion example for Unity3D located here: http://unity3d.com/support/resources/example-projects/procedural-examples I'm sure you could look at the code and rework it for your situation. EDIT: I'm working on a game that uses a procedural extruded rail system like the one you ...


5

First of all, i'm sorry for any gramar erros. English is not my first language. feel free to edit my answer if you find it necessary. In my oppinion, you have to consider the type of game you are trying to create. If you are making a game more similar to reality, slowing the speed of the car and and screw it up a bit would make the gameplay more fun and ...


4

http://www.gametrailers.com/video/expanding-horizons-dark-sector/29795 I remerber hearing about this before. Check minute 1:50 (Things next to you need to be 1:1 scale and as things become further away the need to be scaled up).The guy also mentions that the developers of max payne also talked about this issue maybe you could look that up. Of course they ...


4

I would suggest something you haven't listed. Don't "create" your track at all. Rather, define it indirectly by placing a bunch of collide-able objects around where you want your track to be. Walls, old cars, wrecked buildings, semi-transparent-laser-beams... whatever you want. Heck, they don't even have to be visible. Then you can do your collision ...


4

I will take part in your survey :) What is the way it is done in your favorite racing game? I prefer when the car is slowed down or stopped and damage is applied to the car. After enough damage, the car's handling or top speed is reduced. How is it done in other successful racing games? I don't play a lot of racing games, but the ones I'm ...


4

Fundamentally, braking assist works comparing the player's car's speed against the speed of the nearest point on the track's optimal racing line, and automatically applying the brakes as needed to bring the player's car's velocity down to match the speed specified on the optimal racing line. It's exactly like writing racing car AI, but only applying the ...


3

This started as a comment, but got too long. :) If by "realistic", you mean including weight transfer back/front or left/right when accelerating/braking/turning, you need a 3d-model for the car it self (since there will be forces & rotation around three axis), even if it runs on a flat 2d surface. Thus using a 3d-model might be the only way to get what ...


3

I can you change speed in some non-linear algorithm like : if(userinput == move_faster) if(maxSpeed/2 - oldSpeed/2 <= maximum_acceleration) newspeed = (oldspeed + maxSpeed) / 2; else newspeed = oldSpeed + maximum_acceleration; else if (userinput == stop_move) newspeed = oldspeed - someValue; else newspeed = ...


3

What I'd try would be: Multiply the car's velocity by some constant Δt and add it to its location. (That is, calculate what the car's location would be Δt time steps in the future if its velocity remained constant.) Call this the target point. Have the camera chase the target point in some natural manner. A simple way to do this would be to ...


3

Although Bezier curves are the usual thing people go for, I'd recommend considering circular arcs (and maybe elliptical arcs) unless you really need Bezier curves or splines: It's nice to be able to evenly space things along the curve. For example you might want to draw lane markers or you might want to calculate a path in curve coordinates. A ...


3

If you want to just get something reasonable going, I can't more heartily recommend the talk http://video.google.com/videoplay?docid=4776766805683353325 by the physics programmer on rallycross. (a shipped game on the PS1 back in 1997, so it's very quick on modern hardware and arguably implementable in higher level languages that aren't as efficient at math ...


2

For 3D games, usually you implement two tracks : one with very basic level of detail (just a floor and 2 walls) that you use to compute the collisions and physics. Then you add another data, probably with different LODs for rendering, that you can load as the player advances. Also if your game stays basic, meaning you keep the same width along the whole ...


2

I know this is an old question, but if I stumbled upon it so might others. While it is a walkthrough for getting a car setup in the Unity3D engine, this tutorial goes through a lot of what is necessary and the concepts should be transferable enough. http://unity3d.com/support/resources/tutorials/car-tutorial.html


2

You've more or less answered your own question, I think. Divide the track up into segments, track which segment each car is in, and project the cars onto a line through the middle of the appropriate segment (mathematically it's a simple dot-product, so not complicated at all). Very simple to give each car a "distance" which you can sort for position. The ...


2

I guess I would use the fact that the road is generally built up by using splines, therefore every edge of the road has a corresponding spline position, and using that you could determine (approximately, or fine grained if you subdivide further) what the current spline position of each car is, and thus who is in the lead. So more or less the way you suggest, ...



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