Otherwise, if no drivers are generated by GfDrivers::ensure_min(), the
driver type (e.g.: dandroid) would not be available from the driver
selection menu because its parameter file (e.g.: dandroid.xml) would not
be available.
The following commit provides a fix:
commit 06aadb301f081ce837a11a6bdcc89d77fa258c5d
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Thu Jan 30 23:00:35 2025 +0100
simplix: Remove obsolete simplix.xml
This was a leftover from the dynamic driver generation feature. Now that
drivers are generated from GfLocalDir(), simplix.xml is not consumed
from GfDataDir() any more.
As opposed to POSIX, Windows lacks a rpath mechanism, which means that
shared libraries (aka dlls) must reside next to the executable. [1]
Since freesolid is no longer built by the 3rdParty build system (i.e.,
it is now a submodule), CMake must copy its libraries to the bin/
directory so simuv5 and friends can find them.
Note that no modifications were required for the install step, since
libraries would be already installed by the submodule.
Fixes speed-dreams/speed-dreams-code#42
[1]: https://stackoverflow.com/questions/3272383/linking-with-r-and-rpath-switches-on-windows
The qualification mode relies on running the race loop as fast as
possible, in order to reproduce the race results in a much shorter time.
However, the maximum frame rate limitations introduced by the commit
below caused a regression to the qualification mode, because now the
game would GfSleep most of the time and only run the race loop once
every frame (e.g.: every 1/60 seconds):
commit 9914e9d24c
Author: xavi92 <xavi92@30fe4595-0a0c-4342-8851-515496e4dcbd>
Date: Mon Jul 15 02:52:31 2024 +0000
Implement maximum frame rate limit
Therefore, since it is required to run the physics loop as many times as
possible, the recompute callback variant with `unsigned ms` is used so
that it is run in a loop until the time available to the callback
expires.
Fixes#37 [1].
[1]: speed-dreams/speed-dreams-code#37
Because of this commit:
commit aa2d7c17c135a6abb00dff9bde7bc896bd573e12
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Mon Jan 27 22:09:22 2025 +0100
menu: Remove OnlineButton and NetworkButton
Networked multiplayer is considered too immature for production, so this
commit suggests to remove it from the menus in order to avoid confusion
and frustration from players, at least until a proper implementation is
in place.
These physics engines were removed by previous commits:
commit 999eeed320
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Sat Jan 25 01:37:16 2025 +0100
Remove simuv2
commit 022b19a141
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Sun Jan 26 23:33:49 2025 +0100
Remove simuv2.1, add FreeSOLID as a submodule
Also, make simuv5 the default value.
As opposed to simu >= 3.0, simu 2.1 did not consider air or wheel
temperatures. This would have several consequences:
- Some drivers such as shadow rely on these parameters to calculate tire
grip. If temperature air is zero (i.e., 0K), no grip is assumed
and therefore speeds are also assigned to zero, making the driver not to
move at all.
- Invalid temperature values (i.e., 0K) would be shown on the UI, both
in ssg and OSG.
Unfortunately, simuv2.1 bundled the SOLID-2.0 library (aka FreeSOLID)
because the library is not available from most GNU/Linux distributions
yet.
In order to solve this situation, the FreeSOLID library was migrated
from CVS to Git [1] so it could be used as a submodule, and therefore
let the build system decide whether to optionally use the in-tree copy.
That said, packaging/3rdParty-devel has dropped FreeSOLID in favour of
the submodule, since it must always be built from source anyway.
[1]: https://forge.a-lec.org/speed-dreams/freesolid
${{ env.GITHUB_HEAD_REF }} is not available to workflow_dispatch [1],
so the branch name must be manually extracted from
${{ env.GITHUB_EVENT_PATH }}.
[1]: https://forgejo.org/docs/latest/user/actions/#env-1
This commit should reduce the minimum system requirements:
graph.xml: Reduce graphics quality by default
- ssggraph provides better performance when the sky dome is disabled and
visibility is below 100%. 50% seems to provide a good visibility/fps
ratio.
- Particles such as skids, and specially smoke, are resource-intensive,
so they are now disabled by default.
Commit 41ed56d1 allowed default values for usr drivers. However,
mRearWingAngle was incorrectly expressed as deg, when in fact
MyCar::initCa() expects it as rad. This would cause the implementation
to calculate invalid maximum speeds.
Fixes speed-dreams/speed-dreams-code#6
The use of statically allocated variables in Driver is incorrect since
they would be shared among all Driver instances, when in fact these
variables must be defined per instance.
- Some search paths had GfDataDir() twice.
- As part of the dynamic driver generation feature, "drivers/" was
moved from GfDataDir() to GfLocalDir().
- Steering wheel 3D models were looked up from the wrong path. This
included high-resolution models.
- Driver entities were looked up from the wrong path:
GfLocalDir() + filename
instead of:
GfLocalDir() + "cars/models/<car-name>/" + filename
- Wheel 3D models were missing a search path with GfLocalDir().
So far, tracks were always assumed to reside on GfDataDir, and often
included references to other XML files via relative paths, such as
"../../../data/tracks/surfaces.xml".
Because now tracks can also be stored into GfLocalDir, the relative
paths were now broken.
Therefore, as a workaround any "../" is skipped from the relative path,
so that entities can still be accessed from GfDataDir, even if the track
resides on GfLocalDir, thus avoiding the breaking change.
Cars are downloaded to cars/models/<carname>, and tracks to
tracks/<category>/<trackname>. Therefore, downloadsmenu.cpp must ensure
cars/models/ and tracks/<category>/ exist before extracting the package.
Now that tracks and cars can also be loaded from GfLocalDir(), the
in-game download manager must only use this directory since write
permissions are not guaranteed on GfDataDir().
It provides no benefit to do so, since the object would be destroyed
anyway and therefore it would be impossible to reuse these pointers.
Doing so can only mask potential memory errors.
SDTrack was taking the ownership for track, a pointer to tTrack
allocated many layers above SDScenery::LoadScene. More specifically, it
is allocated by either TrackBuildEx or TrackBuildv1, and both would
allocate the tTrack instance via calloc(3) instead of C++'s new.
Attempting to `delete` a pointer *not* allocated by a previous call to
`new` is undefined behaviour according to the C++ standard. [1]
In fact, SDScenery::LoadScene did not even attempt to modify the
tTrack instance, so there was no need to take its ownership in the first
place.
[1]: https://en.cppreference.com/w/cpp/language/delete
This new function attempts to read a parameter file from GfLocalDir()
first, and from GfDataDir() if not successful.
This function will be useful to extract car and track data from both
directories. Having car and track data available from GfLocalDir() is
required to allow users downloading new cars and tracks without
administrator/root privileges.
Opening a file only to check whether it exists is resource-consuming for
no reason, since GfFileExists can achieve the same effect without
requiring to open a file.