From 0542e6b27912f87e00e0916ea0a99fb512cbc6bc Mon Sep 17 00:00:00 2001 From: CodingJellyfish Date: Fri, 10 May 2024 18:35:30 +0800 Subject: [PATCH 1/7] Fix #3671 and fix #4254 --- src/challenges/story_mode_status.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/challenges/story_mode_status.cpp b/src/challenges/story_mode_status.cpp index 11ecac8c773..4fd321b70f6 100644 --- a/src/challenges/story_mode_status.cpp +++ b/src/challenges/story_mode_status.cpp @@ -334,6 +334,8 @@ void StoryModeStatus::grandPrixFinished() unlockFeature(const_cast(m_current_challenge), difficulty); } // if isActive && challenge solved + // Calculate m_points again to count the current GP. + computeActive(); RaceManager::get()->setCoinTarget(0); } // grandPrixFinished From 185772ca4ab24720797732b4ddcdba44e07978cf Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Fri, 10 May 2024 15:48:37 +0200 Subject: [PATCH 2/7] Fix a strict-aliasing violation See #5035, based on a commit by @miller-alex --- .../src/BulletCollision/Gimpact/gim_math.h | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/lib/bullet/src/BulletCollision/Gimpact/gim_math.h b/lib/bullet/src/BulletCollision/Gimpact/gim_math.h index 939079e1040..f4e49ef1757 100644 --- a/lib/bullet/src/BulletCollision/Gimpact/gim_math.h +++ b/lib/bullet/src/BulletCollision/Gimpact/gim_math.h @@ -32,6 +32,7 @@ email: projectileman@yahoo.com ----------------------------------------------------------------------------- */ +#include #include "LinearMath/btScalar.h" @@ -56,21 +57,21 @@ email: projectileman@yahoo.com #define G_ROOT2 1.41421f #define G_UINT_INFINITY 0xffffffff //!< A very very high value #define G_REAL_INFINITY FLT_MAX -#define G_SIGN_BITMASK 0x80000000 +#define G_SIGN_BITMASK 0x80000000 #define G_EPSILON SIMD_EPSILON enum GIM_SCALAR_TYPES { - G_STYPE_REAL =0, - G_STYPE_REAL2, - G_STYPE_SHORT, - G_STYPE_USHORT, - G_STYPE_INT, - G_STYPE_UINT, - G_STYPE_INT64, - G_STYPE_UINT64 + G_STYPE_REAL =0, + G_STYPE_REAL2, + G_STYPE_SHORT, + G_STYPE_USHORT, + G_STYPE_INT, + G_STYPE_UINT, + G_STYPE_INT64, + G_STYPE_UINT64 }; @@ -78,17 +79,31 @@ enum GIM_SCALAR_TYPES #define G_DEGTORAD(X) ((X)*3.1415926f/180.0f) #define G_RADTODEG(X) ((X)*180.0f/3.1415926f) +static GUINT gim_ir__(float r) +{ + GUINT i; + memcpy(&i, &r, sizeof(i)); + return i; +} + +static GREAL gim_fr__(GUINT i) +{ + float r; + memcpy(&r, &i, sizeof(r)); + return r; +} + //! Integer representation of a floating-point value. -#define GIM_IR(x) ((GUINT&)(x)) +#define GIM_IR(x) (gim_ir__(x)) //! Signed integer representation of a floating-point value. -#define GIM_SIR(x) ((GINT&)(x)) +#define GIM_SIR(x) ((GINT)gim_ir__(x)) //! Absolute integer representation of a floating-point value -#define GIM_AIR(x) (GIM_IR(x)&0x7fffffff) +#define GIM_AIR(x) (gim_ir__(x) & 0x7fffffff) //! Floating-point representation of an integer value. -#define GIM_FR(x) ((GREAL&)(x)) +#define GIM_FR(x) (gim_fr__(x)) #define GIM_MAX(a,b) (ab?b:a) @@ -107,7 +122,7 @@ enum GIM_SCALAR_TYPES ///returns a clamped number #define GIM_CLAMP(number,minval,maxval) (numbermaxval?maxval:number)) -#define GIM_GREATER(x, y) btFabs(x) > (y) +#define GIM_GREATER(x, y) btFabs(x) > (y) ///Swap numbers #define GIM_SWAP_NUMBERS(a,b){ \ From 5883a27dfce92ec43103f0e2577730aaac42ec26 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Fri, 10 May 2024 17:35:08 +0200 Subject: [PATCH 3/7] Update credits - Change the order top contributors are presented in - Credit several noticeable contributors that were missing --- data/CREDITS | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/data/CREDITS b/data/CREDITS index 5ac49789115..1844d141a3b 100644 --- a/data/CREDITS +++ b/data/CREDITS @@ -14,15 +14,6 @@ Former project leader - A lot of bugfixes and enhancements - Windows packaging -= Marianne Gagnon (Auria) = - -Developer -- Former lead programmer -- Mac OS X Packager -- Among too many things to list: -- GUI engine and user interface -- A lot of bugfixes and enhancements - = Benau = Lead developer, modeller & animator @@ -31,11 +22,14 @@ Lead developer, modeller & animator - A lot of networking code - Other graphical improvements to karts and tracks -= Dawid Gan (deveee) = += Marianne Gagnon (Auria) = Developer -- Android port -- General improvements and many many bugfixes +- Former lead programmer +- Mac OS X Packager +- Among too many things to list: +- GUI engine and user interface +- A lot of bugfixes and enhancements = Jean-Manuel Clémençon (Samuncle) = @@ -54,24 +48,37 @@ Lead developer - AI improvements - General improvements and bugfixes += Dawid Gan (deveee) = + +Developer +- Android port +- General improvements and many many bugfixes + = Online = Add-ons website - Daniel Butum (leyyin) - Stephen Just - = Additional Programming = Significant bug fixes & misc. contributions for 1.0 and 1.1 - Ben Krajancic - QwertyChouskie -- Dumaosen -- Luffah +- CodingJellyfish - Mrxx99 - Pelya - Riso +Significant bug fixes & misc. contributions for 1.2 to 1.5 +- QwertyChouskie +- CodingJellyfish +- Mary +- Luffah +- CodedOre +- Riso +- mrkubax10 + = Visual art = Tracks @@ -105,6 +112,9 @@ Karts Objects - GeekPenguinBR, TuxKartDriver : Models from Las Dunas Stadium +Miscellaneous +- Semphris : Item respawn animations + Jymis - Karts and icons @@ -200,7 +210,7 @@ Packaging - hiker: Windows - Dawid Gan: Linux and Android packages -Testing for 1.0 and 1.1 +Testing for 1.0 to 1.5 - Alayan - deveee - Wuzzy From 27ae4554606ccc7aefba6c885b890f8d0ad0fa26 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Fri, 10 May 2024 19:05:06 +0200 Subject: [PATCH 4/7] Update the changelog Add all significant changes since the release of 1.4 that will be included for the 1.5 release. The changelog for 1.4 remains incomplete and will be updated later. --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d345e02b5..79fc90fddf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,48 @@ It should be kept in mind that some versions have a less complete changelog than For similar reasons, and because some features are vastly more complex than others, attributions of main changes should not be taken as a shortcut for overall contribution. +## SuperTuxKart 1.5 (TBD, still unfinished) + +### Networking +* Improve track-voting logic when no majority is achieved, by kimden + +### General +* Make the game's window resizable in all the screens, by CodingJellyfish (previously, most UI screens did not support resizing) +* New benchmark mode, by Alayan: +- Can be run with a few clicks, allowing to easily test the performance of various settings or to compare different systems +- Robust performance metrics that better reflect the impact of varying frametimes than Average FPS and 1% Lows. +* Fix incorrect unlock information in Story Mode after a Grand Prix, by CodingJellyfish +* Make the progression of audio levels geometrical and increase default steps, allowing to set lower audio levels and better accuracy for low audio levels (especially useful for headphone users), by Alayan +* Fix drive-on sound from materials being played when the game is paused, by Alayan +* Fix a crash trying to read replays when the random starting position setting is enabled, by Alayan +* Handle track names with spaces in the replay reader, by Alayan +* Various tweaks, bugfixes and code-quality improvements + +### Graphics +* Improve the accuracy of the framerate limiter, by Benau +* Add more maximum framerate options to the built-in framerate limiter, by Benau (this does not affect physics, which run at 120FPs independetly of graphical FPS) +* Add some graphical effects for legacy video drivers, by Benau +* Ensure fragment shaders use high precision, to avoid rendering issues with some drivers, by zmike +* Fix a related precision issue causing black artifacts with GL_ES, by CodingJellyfish +* Fix other shader issues that could produce black artifacts in specific situations, by CodingJellyfish +* Various improvements to the automatic computations of Level of Detail (LoD) distances, by Alayan +* Improve draw call performance in some situations, by CodingJellyfish +* Enable new higher LoD and shadows settings, by Alayan +* Integrate LoD (Geometry Detail) settings in the graphics presets, by Alayan +* Prefer displaying a lower quality LoD model over switching to a higher quality one when too close, by Alayan + +### User Interface +* Add a new Display tab in the Settings, by Alayan +* Allow to rate addons with a keyboard or a controller, and notify when trying to rate an addon while not logged in, by CodingJellyfish +* Fix an issue that prevented to go up with a scrollbar using a trackpad, by CodingJellyfish +* Improve the typing bars, especially for the coal theme, by Alayan +* Greatly improve UI layout for 'tall' resolutions (greater height than width), by CodingJellyfish +* Improve font scaling, by CodingJellyfish +* Various enhancements, by Qwertychouskie and others + +### Mobile +* Don't keep the rescue button active after it stops being touched, when the finger keeps touching the screen (e. g. to handle the steering wheel), by S0nter + ## SuperTuxKart 1.4 (31. October 2022) ### General * Lap trial mode, by mrkubax10 @@ -209,24 +251,24 @@ For similar reasons, and because some features are vastly more complex than othe * Several changes or fixes to ensure proper behavior (input, screen-scaling, and more) ### User Interface -* Show tips for players when loading and after race ends, by dumaosen -* Better scaling of many many UI elements to large resolutions, by dumaosen and others +* Show tips for players when loading and after race ends, by CodingJellyfish +* Better scaling of many many UI elements to large resolutions, by CodingJellyfish and others * Show country flags for servers and players in online multiplayer, by Benau * Add a new option to change font size on the fly, by Benau and deveee -* Add icons for the available options in the race result screens, by dumaosen +* Add icons for the available options in the race result screens, by CodingJellyfish * Make the highscore list scrollable, by deveee * Display all the relevant info in the challenge dialog in Story Mode, by Alayan -* New challenge selection interface, by dumaosen +* New challenge selection interface, by CodingJellyfish * Show the number of ranking points won or lost after a ranked race, by Benau * Separate blurring visual effects from the main graphics presets, by Alayan * Fix incorrect text resizing in the help menu, by Benau -* Make the custom random GP option more prominent in the track selection screen, by dumaosen +* Make the custom random GP option more prominent in the track selection screen, by CodingJellyfish * Improvements to the scrollbars, by QwertyChouskie * Allow sorting lists with the keyboard, by Benau * Allow tooltip drawing outside of menus, by deveee * Prevent some font scaling blur caused by non-integer offsets, by Benau * Add a (configurable) limit to chat message frequency, by GuillaumeBft and Benau -* Allow to explicitly set the flip direction of tabs, by dumaosen +* Allow to explicitly set the flip direction of tabs, by CodingJellyfish * Allow to download addons from the server lobby interface, by Benau * Allow to filter installed and non-installed addons in the addons screen, by Alayan * Many minor tweaks and bugfixes From f2b61826c9506d4cf71b252baf4a062e09a414f2 Mon Sep 17 00:00:00 2001 From: Benau Date: Sat, 11 May 2024 17:31:33 +0000 Subject: [PATCH 5/7] Allow changing splitscreen layout in race --- src/states_screens/options/options_screen_display.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/states_screens/options/options_screen_display.cpp b/src/states_screens/options/options_screen_display.cpp index b0f11888a67..cf8a34b23f1 100644 --- a/src/states_screens/options/options_screen_display.cpp +++ b/src/states_screens/options/options_screen_display.cpp @@ -19,7 +19,9 @@ // Manages includes common to all or most options screens #include "states_screens/options/options_common.hpp" +#include "graphics/camera.hpp" #include "graphics/irr_driver.hpp" +#include "modes/world.hpp" #ifndef SERVER_ONLY #include @@ -126,9 +128,7 @@ void OptionsScreenDisplay::init() // ---- splitscreen mode GUIEngine::SpinnerWidget* splitscreen_method = getWidget("splitscreen_method"); assert( splitscreen_method != NULL ); - if (UserConfigParams::split_screen_horizontally) splitscreen_method->setValue(1); - else splitscreen_method->setValue(0); - splitscreen_method->setActive(!in_game); + splitscreen_method->setValue(UserConfigParams::split_screen_horizontally ? 1 : 0); } // init // -------------------------------------------------------------------------------------------- @@ -407,6 +407,11 @@ void OptionsScreenDisplay::eventCallback(Widget* widget, const std::string& name GUIEngine::SpinnerWidget* splitscreen_method = getWidget("splitscreen_method"); assert( splitscreen_method != NULL ); UserConfigParams::split_screen_horizontally = (splitscreen_method->getValue() == 1); + if (World::getWorld()) + { + for (unsigned i = 0; i < Camera::getNumCameras(); i++) + Camera::getCamera(i)->setupCamera(); + } } } // eventCallback From 1c58f0154fcbbe20a503568dd20ab960a1702128 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Sat, 11 May 2024 20:33:03 +0200 Subject: [PATCH 6/7] Add graphics settings to the perf report --- src/utils/profiler.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/utils/profiler.cpp b/src/utils/profiler.cpp index f6dcd2cbed4..c1538e85e27 100644 --- a/src/utils/profiler.cpp +++ b/src/utils/profiler.cpp @@ -671,6 +671,10 @@ void Profiler::writeToFile() std::ofstream f(FileUtils::getPortableWritingPath(base_name + ".perf-report-" + (Track::getCurrentTrack() != NULL ? Track::getCurrentTrack()->getIdent() : "menu") + ".csv")); + int effective_LoD_level = (UserConfigParams::m_geometry_level == 0 ? 2 : + UserConfigParams::m_geometry_level == 2 ? 0 : + UserConfigParams::m_geometry_level); + f << "Total frame count, Total profiling time (ms),"; f << std::endl; f << m_total_frames << ", " << int(m_total_frametime / 1000) << ","; @@ -681,6 +685,37 @@ void Profiler::writeToFile() f << m_fps_metrics_low << ", " << m_fps_metrics_mid << ", " << m_fps_metrics_high << ","; f << std::endl; f << std::endl; + // Anisotropic Filtering is one of the settings affected by the Image Quality spinner + f << "Graphics parameters, Resolution width, Resolution height, Render resolution," + << "Dynamic lighting, Particle effects, Animated characters, Geometry Detail, " + << "Bloom, Glow, Light Shaft, Anti-Aliasing (MLAA), SSAO," + << "Anisotropic Filtering, Shadow Resolution, Light scattering, Degraded IBL," + << "Motion Blur, Depth of Field, Texture compression, HD Textures, HQ Mipmap,"; + f << std::endl; + f << "Values, " + << UserConfigParams::m_real_width << ", " + << UserConfigParams::m_real_height << ", " + << (UserConfigParams::m_dynamic_lights ? UserConfigParams::m_scale_rtts_factor : 1.0f) << ", " + << UserConfigParams::m_dynamic_lights << ", " + << UserConfigParams::m_particles_effects << ", " + << UserConfigParams::m_animated_characters << ", " + << effective_LoD_level << ", " + << UserConfigParams::m_bloom << ", " + << UserConfigParams::m_glow << ", " + << UserConfigParams::m_light_shaft << ", " + << UserConfigParams::m_mlaa << ", " + << UserConfigParams::m_ssao << ", " + << UserConfigParams::m_anisotropic << ", " + << UserConfigParams::m_shadows_resolution << ", " + << UserConfigParams::m_light_scatter << ", " + << UserConfigParams::m_degraded_IBL << ", " + << UserConfigParams::m_motionblur << ", " + << UserConfigParams::m_dof << ", " + << UserConfigParams::m_texture_compression << ", " + << UserConfigParams::m_high_definition_textures << ", " + << UserConfigParams::m_hq_mipmap << ","; + f << std::endl; + f << std::endl; f << "Target FPS, Slow frames count, Duration of slow frames (ratio), Excess duration of slow frames (ratio),"; f << std::endl; From 3ec2b9a54d3d8e866956c89ed60fd92e02125c22 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Sat, 11 May 2024 20:39:36 +0200 Subject: [PATCH 7/7] Fix #4166 Based on the alerts for timed challenges: - Change the timer color when an elimination is coming shortly - Play a sound when an elimination is coming shortly --- src/modes/world.cpp | 22 +++++++++++++++------- src/states_screens/race_gui.cpp | 9 ++++++++- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/modes/world.cpp b/src/modes/world.cpp index e3e124a11a1..9416af16f2b 100644 --- a/src/modes/world.cpp +++ b/src/modes/world.cpp @@ -949,19 +949,27 @@ void World::moveKartTo(AbstractKart* kart, const btTransform &transform) // ---------------------------------------------------------------------------- void World::updateTimeTargetSound() { - if (RaceManager::get()->hasTimeTarget() && !RewindManager::get()->isRewinding()) + if (RewindManager::get()->isRewinding()) + return; + + float time_left = getTime();; + if (RaceManager::get()->hasTimeTarget()) { - float time_left = getTime(); float time_target = RaceManager::get()->getTimeTarget(); // In linear mode, the internal time still counts up even when displayed down. if (RaceManager::get()->isLinearRaceMode()) time_left = time_target - time_left; + } + else if (!RaceManager::get()->isFollowMode()) + { + return; // No Time Target and no FTL + } - if (time_left <= 5 && getTimeTicks() % stk_config->time2Ticks(1.0f) == 0 && - !World::getWorld()->isRaceOver() && time_left > 0) - { - SFXManager::get()->quickSound("pre_start_race"); - } + if (time_left <= (RaceManager::get()->isFollowMode() ? 3 : 5) && + getTimeTicks() % stk_config->time2Ticks(1.0f) == 0 && + !World::getWorld()->isRaceOver() && time_left > 0) + { + SFXManager::get()->quickSound("pre_start_race"); } } // updateTimeTargetSound diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index 18c2574e10b..8130bebccea 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -438,6 +438,7 @@ void RaceGUI::drawGlobalTimer() sw = core::stringw (StringUtils::timeToString(elapsed_time).c_str() ); + // Use colors to draw player attention to countdowns in challenges and FTL if (RaceManager::get()->hasTimeTarget()) { // This assumes only challenges have a time target @@ -455,6 +456,13 @@ void RaceGUI::drawGlobalTimer() else if (elapsed_time <= 15) time_color = video::SColor(255,255,255,0); } + else if(RaceManager::get()->isFollowMode()) + { + if (elapsed_time <= 3) + time_color = video::SColor(255,255,160,0); + else if (elapsed_time <= 8) + time_color = video::SColor(255,255,255,0); + } core::rect pos(irr_driver->getActualScreenSize().Width - dist_from_right, irr_driver->getActualScreenSize().Height*2/100, @@ -1385,4 +1393,3 @@ void RaceGUI::drawLap(const AbstractKart* kart, font->setScale(1.0f); #endif } // drawLap -