I have played many three.js racing games and nothing come close to trigger rally, the new three.js racing games have better graphics, high quality yet trigger rally is more engaging? if i could just take trigger rally characteristics and bring it to our three.js racing project we are currently developing. which lacks the feeling of speed. something about trigger rally the makes me want to crash the keyboard and i dont feel it in our new three.js racing project. the feeling of pressure.
Example this new three.js driving game feels not as live as the trigger rally, it almost feels like its not moving at all.
Solid physics/collision detection that doesn’t feel mushy. Car sims like trigger rally aren’t simulating each wheel as a rigid body and using the spinning wheels to drive the car.. they are creating an internal model describing the torque/simulation of the engine, and driving a raycast vehicle with it. the vehicle is a single rigid body floating on 4 raycasters, and forces are directly manipulated in the simulation loop to prevent sliding, and apply inputs.
Here’s the trigger rally vehicle sim: https://codeartemis.github.io/TriggerRally/server/public/scripts/game/vehicle.js
Another absolutely vital component is a fluid and tight camera controller with a little movement but not enough to become distracting.
Finally all this is designed with no allocations in the main loop to prevent garbage collection from causing spikes that would cause the physics or camera to stutter.
I’m just scratching the surface, but trigger rally is an arcade driving sim from the ground up.
i check the vehicle.js entire code its nothing special, what i mean is how do we build trigger rally like racing game as immersive as trigger rally with the new three.js version r186, we should not look back to the trigger rally, we should look forward. nothing is more exciting than racing, the rush the pressure and excitement.
The Trigger Rally demo includes, at least, a couple of features that you would want to include in your sim to enhance the sensation of speed:
Nearby objects, such as canyon walls or trees.
Textured road (you could also add center stripes)
The Trigger Rally camera looks twitchy. There are other camera tricks you can use. For example, in my flight demo, manthrax had suggested adding a lag to the external view, so that the camera was not locked on the airplane.
If you are creating a rally race, you would want to do something to convey the sensation of bouncing up and down on a dirt road. You could move the car up and down and have the camera mimic that. If on dirt, add a smoke trail.
Most of these tricks are old tricks - things we had to do when we had limited memory.(e.g. 48k). Modern graphics cards and three.js merely allow you to improve on these original ideas.
I couldn’t find any screenshots of this online, so I drew this - which is an example of a driving “sim” that you might have seen in the 1980s on an Apple ][+ with 48k of ram:
The car shape (not shown) was something like a 16x16 hardware “sprite” located in the center of the bottom line. The horizontal lines would move towards you and could bend to the left or right in the “distance”. The vertical posts were optional - to add to the feeling of speed, although the horizontal lines were pretty good at doing that. The idea was to keep the car in the middle of the road.
As simple as it was, this gave a pretty good illusion of speed. These days, you achieve the same effect by giving the driving surface a somewhat realistic texture.
you’re right, the lack of references like road markings and nearby vertical objects such as traffic signs, foliage, and some vertical structures is what makes racing games nowadays feel oblivious to speed. now most game devs rely on the engine’s features rather than developing tricks to optimize and enhance the game experience.
i mean, look at the old need for speed games. you could play for hours just being chased by cops. we didn’t even care about the graphics, it was the experience and the excitement, especially when the cops gang up on you, you get away, and then you come out again just to get chased again.
Heh! Personally, I thought the police chases were the worst part about the NFS franchise - especially when they happened in the middle of a race. As I recall, they reduced their graphics requirements by setting the whole thing at night.
But I think you can see a progression. The sims that followed the Apple ][+ version had the ability to replace the horizontal lines with gray road surfaces and the area outside the lines with grass. You could add sky and clouds that scrolled horizontally as you turned. But the racetracks were still flat. Over time, it became possible to add more features, including 3D terrain.
I was working on flight simulations. We had our own challenges and tricks there. The initial challenges involved creating a reasonable simulation of an airplane. But, once you got in the air, you realized that creating the sensation of speed is difficult because there are no nearby objects flashing past. I think that is why driving sims are more popular.
the police chase is what i enjoy most, getting away then coming out again to get chased, the speed the excitement, here is an update, we didn’t add some vertical units, we simply lowered the camera close to the ground, not too close and it gives a sense of speed, the far camera isn’t working.
That looks about the right height. As I’m sure you’re aware, GT7 has several camera positions, including a bumper cam (really low), cockpit cam and trailing cam (similar to above, but a bit higher). Most people seem to prefer the camera view that puts you slightly above the top of the car since that provides better steering control and better visibility.
whenever my cell phone heats up this happens, and i just lost control of the vehicle, can’t apply brake or stir, it leaves me no other choice but reload, is there anyway to prevent this from happening, i couldnt guess the issue becoz no errors is showing on the console?