Developers diaries #22

City Car Driving 2.0

City Car Driving 2.0 is a driving simulator designed to help novice drivers master driving in a setting as close to reality as possible.

After the New Year, our schedule got disrupted, and we began to publish the logs in the middle of our work on the game. So we had to write the logs before we finished what we were talking about. Therefore, this log comes out, breaking the usual pace. We don’t want to leave you without logs, but, as they say, we need to “optimize our processes” :) After this log, we will return to our usual schedule – a log once every two weeks. Today, we’ll talk about how the development of very important aspects of the game is going: the first iterations of traffic behavior and tuning the car’s suspension. [previewyoutube=6mKKc4F-ZRk;full][/previewyoutube] The video shows the first iterations of traffic. The first task facing our team in this direction was to merge our traffic system with UE. For this purpose, we created the simplest test model of a car – a “box,” reminiscent of a car in its shape We faced many challenges: from differences in units of measurement and coordinate system to limitations in the simulation of solid state physics. Therefore, the first “cars” performed various stunts, at times driving with their wheels upside down and accelerating to incredible speeds. [previewyoutube=i4P8uzL0V9Y;full][/previewyoutube] Now a pressing problem for us is the friction of car tires with the surface. UE’s physics engine, called “Chaos,” lacks flexibility and developer friendliness In Log #21, you may have noticed that friction problems still persist. In the game, this is reflected in the periodic “slipping” of cars on any surface in the game. Also, in the video above, in addition to a vivid demonstration of problems with friction, we check “ragdoll” – physics (this will not happen in the game, these videos are old recordings). [previewyoutube=DBfA6vp92nk;full][/previewyoutube]Here we look at the performance of the suspension: whether it is similar to the reference one or not, the key determination is the suspension travel. Then, the suspension is adjusted according to the data from the reference. Let’s take a closer look at how this happens. [olist] [*] We take a car in reality and create a similar car in the game without violating licensing rights. After that, we find information about the travel distance of the front and rear shock absorbers of the car. This will be the length of the shock absorber strut suspension. [*] We set the coordinates for mounting the shock absorber strut based on the model. From the point of view of our physics, the mount is the point at which the center of the wheel will be when the suspension is fully compressed. If the lengths of the front and rear suspensions differ (as a rule, this is the case), then the mounting height of the longer suspension should be higher than that of the shorter one by the amount of the difference. [*]We are looking for information about the stiffness of the front and rear springs (leaf springs) of the car. We set this stiffness in the car configuration file. If there is no data available, we calculate it: given the spring stiffness, we calculate its load. Stiffness in kg is multiplied by the acceleration of gravity and we get the value in Newtons. With this force, the car presses on the spring with its weight. For example, 337 kg (the stiffness of the front spring of the given car) * 9.8 = 3302 N. With this force, the car will press on the spring. Given the load, we calculate the stiffness coefficient. [*]The stiffness coefficient is calculated using the formula: the spring load is divided by the suspension travel multiplied by 33 % of its compression. For example, 3302 / (0.155 * 0.33) = 64,555. [*] Next, we set the damping coefficient as the stiffness coefficient divided by 10. [*] We add a progression curve. [*] We adjust the preload so that the compression of all suspensions at rest on a flat surface is 33 % +/- 5 %, since in reality manufacturers adjust the suspension 2/3 for compression and 1/3 for rebound. Increasing pretension reduces compression, decreasing it does the opposite. [*] At the end, we check the height and evenness of the car, focusing on how the car behaves in reality (mainly from photographs and videos). An approximate correct result is when the bottom is parallel to the ground, and the ground clearance corresponds to the image of the car. As a rule, with the correct data and actions from the previous paragraphs, the car’s suspension is configured by this point. If it still doesn’t match a little, we adjust the damping and the mounting point of the strut “by eye.” [/olist] [img]{STEAM_CLAN_IMAGE}/44086444/e2e55676e9160fbc224806ff854de92987ebad7a.png[/img] [list] [*] [b]When is the full gameplay video coming?[/b] [*] Work is still underway, and we cannot say exact dates. First of all, we must create the game. We try to share the development progress with you in as much detail as possible. Marketing the game is not an issue for us, so before we start actively advertising and showing the game, we want to make sure that we have made a great car simulator. [*] [b]Will trucks and buses be playable? [/b] [*] No, they won’t be in Early Access for sure. Perhaps in the future, we will expand our fleet. [*][b] Will there be a career as a taxi driver? Passenger carrier? [/b] [*] Not in the first Early Access version. As we noted in the New Year’s Roadmap, we put this issue aside to deepen other mechanics of the game. We plan to add a taxi driver career approximately in the second major patch for the game in Early Access. [*] [b]Will there be cockpit support like for sim racing? [/b] [*] No, we are not a sim racing company and for us adding such support is an unjustified expense. [*] [b]Will there be an initial test to obtain a driver’s license? [/b] [*] Yes, sure. As we mentioned in previous logs, without obtaining a work license, you will not be able to engage in some of the gaming activities. [*] [b]What about a full range of fines?[/b] [*] Of course, there will be fines that you will need to pay because there will be an economy in the game. We couldn’t leave CCD 2.0 without fines: this is a key feature of the game. [*] [b]Thanks to changes in physics, will drifting be possible in the game? [/b] [*] We do not encourage unsafe driving in any way, and we do not advise you to do so. (Yes, it will be possible, but how could it be otherwise, in a game about cars? :) There are no plans for rear-wheel drive player cars in the first version of Early Access, but we will add them in our first major patch. [*] [b]Will there be police implementation? [/b] [*] Maybe. We didn’t look that far. If we decide to do this, it will definitely be before the game’s full release, but not in the first major patches. [*] [b]What input device is the game being developed for first? In the previous videos, it appears that the recording is being done from the keyboard.[/b] [*] First of all, we focus on steering wheels. We actually recorded most of the videos in the logs from the keyboard because it’s just more convenient for us, and we don’t position the logs as marketing materials. [/list] [img]{STEAM_CLAN_IMAGE}/44086444/e1587d01f1caf24e0bcc3396dce0d9b36a70038a.png[/img] This log is a bit mixed in the topics, but today, we decided to simply share the features in the development of CCD 2.0. So at the end of the log, we attach a video of one of the first traffic launches. [previewyoutube=DPgrYLj2Ut8;full][/previewyoutube]Developer logs are published every two weeks. Don’t miss them!