Commit Graph

17346 Commits

Author SHA1 Message Date
CodingJellyfish
7d02e57a19 Avoid resetting FOV which caused issue after resizing cutscene 2024-05-05 13:08:35 +08:00
Alayan
0969a173c7
Fix #5069 2024-05-04 20:26:24 +02:00
Alayan
8fd0a0a09d
Split the displaySoccerResults function
Use a 'drawTeamScorers' function to reduce code duplication and make it easier to understand what's going on. Some minor clean-up has also been done, but more could be done, especially regarding variables that had to be recreated in the new separate function.
2024-05-04 20:19:54 +02:00
Alayan
7a75f9e541
Clean up the Race Result GUI code
- Remove excessive indentations in race_result_gui.cpp
- Move the bulk of the displayPostRaceInfo function into new functions: displayHighscores, displayLapDifficulty and displayChallengeInfo
- Add comments for the closing braces of functions, for the closing braces of some large code blocks, and explaining some functions
2024-05-04 19:14:48 +02:00
CodingJellyfish
3a0a2eaf97 Add resizing code for kart selection 2024-05-04 16:54:09 +08:00
CodingJellyfish
0266b03809 Add minimum resizing code for race result screen 2024-05-04 15:38:18 +08:00
CodingJellyfish
26aa328994 Add resizing code for credits 2024-05-03 20:20:03 +08:00
CodingJellyfish
e52b2fafdc Add resizing code for soccer setup screen 2024-05-03 18:02:46 +08:00
CodingJellyfish
31239615ef Add resizing code for add device dialog 2024-05-03 17:54:13 +08:00
CodingJellyfish
f73e56c204 Add resizing code for dialog and screen keyboard 2024-05-02 15:34:08 +08:00
CodingJellyfish
f8a43b86ea Fix server only build 2024-05-01 16:04:39 +08:00
CodingJellyfish
ff186339e1 Use proper method to shrink text in bubble widget to fix #3432 2024-05-01 13:00:54 +08:00
CodingJellyfish
c9d44736ed Add resizing code for bubble widget 2024-04-30 10:45:01 +08:00
Alayan
0716965df7
Improve Auto-LoD
- Increase the Auto-LoD distance on tracks with a low scene complexity (fix #5065)
- Increase the Auto-LoD distance when the old formula gives a too low base distance (small objects). This helps with some of the worst popping issues for comparatively little performance cost.
- Make the LoD distance auto-compute code clearer by moving the settings-related multiplier after the squaring step
- Also fix a couple of unrelated warnings about comparison between signed and unsigned integers
2024-04-29 21:47:17 +02:00
Alayan
ec4f4065f5
Enable a higher maximum shadow resolution in the video settings 2024-04-29 12:01:54 +02:00
Alayan
95c8f452de
Update the LoD distance factors
With the existing engine and tracks, when the framerate is rather GPU-limited, the performance cost of increasing LoD distance is minor. It becomes more significant at higher framerates when the CPU can be more of a limiting factor, but it also noticeably enhances the player experience by removing the distracting 'popping' when an object visibly changes shape or appears because of LoD.

- Lowest is changed from 0.75 to 0.8
- Low is reduced to 0.8, just like Lowest. The difference is now only the display of optional geometry objects, but it's a big difference.
- Medium is changed from 1.25 to 1.3
- High is changed from 1.3 to 1.8
- Very high is changed from 1.8 to 2.4
- Ultra is changed from 3.0 to 3.2
2024-04-29 11:12:25 +02:00
Alayan
32a53827a8
Fix #5063
- Ensure that optional geometry objects are properly removed. This provides a massive performance boost, at the cost of visuals. Benchmark on graphics 2 with lowest geometry level: bugged has 202 steady FPS, 230 mostly stable FPS, fixed has 427 steady FPS, 495 mostly stable FPS.
- Restrict the removal of objects based on geometry detail to the lowest geometry level. This ignore the different levels of geometry removal that track authors can set for objects, and which was mostly unused: all objects marked for removal at any level are either all removed or all kept.
2024-04-29 10:55:55 +02:00
CodingJellyfish
3f8b78dc41 Add resizing code for CGUIEditBox 2024-04-29 10:18:51 +08:00
CodingJellyfish
5ff449d6c9 Remove an unneeded method 2024-04-29 10:06:47 +08:00
Alayan
e64e2d8cd5
Fix #4931
The assert could be triggered when a new sign-in request was sent before the first one was resolved, usually when using the enter key to request the sign in. Since it can happen in normal operations to have the player profile status different from signing out or signed out, an assert is incorrect.

Also fix server-only compilation for the previous commit.
2024-04-28 21:43:42 +02:00
Alayan
01d62be5de
Fix crashing when turning the modern renderer on or off before benchmarking 2024-04-28 18:32:51 +02:00
CodingJellyfish
9206b923f7 Use xmlDecode for news 2024-04-28 15:57:42 +08:00
CodingJellyfish
18094c505a Add resizing code for networking lobby 2024-04-28 13:25:20 +08:00
CodingJellyfish
f6949972b3 Add resizing code for label widget 2024-04-28 11:15:41 +08:00
CodingJellyfish
97ca195e20 Fix dynamic ribbon widget being shown above a dialog after resized 2024-04-27 15:05:52 +08:00
CodingJellyfish
10b6c4b1e1 Fix focus bug when multiplayer handling is not needed 2024-04-26 23:24:51 +08:00
Alayan
543ee92e00
Confirm the performance report saving to the user
Also fix a compilation issue with compilers not recognizing uint
2024-04-26 16:50:50 +02:00
Alayan
792c1e0926
Compute new performance metrics and improve saving of profiler data
* Format the standard CPU and GPU profiler data as CSV, to simplify its analysis
* Include the internal identifier name of the track in the report name, or 'menu' if there is no active track. This uses the current track at the time of report saving. It is possible to keep the profiler on through multiple tracks and menus, but it's on people enabling the artist debug mode and the profiler to use it sensibly
* Stop the profiler when saving data, if it's not already stopped
* Compute, when profiling is stopped, for all integer FPS values up to 1000, three key metrics:
 - The number of frames too slow to reach this FPS value
 - The proportion of total time spent in frames slower than this FPS value
 - The proportion of total time spent in frames beyond the maximum duration associated with this FPS value
* Compute three key indicator values:
 - Steady FPS (highest FPS with no more than 1% time spent in slower frames and no more than 0.1% time spent beyond the maximum duration)
 - Mostly stable FPS (highest FPS with no more than 12% time spent in slower frames and no more than 2% time spent beyond the maximum duration)
 - Typical FPS (highest FPS with no more than 50% time spent in slower frames and no more than 10% time spent beyond the maximum duration)
* Save an additional 'perf-report' containing this new data

 Traditional performance measurements, such as average FPS and 1% lows (which are typically based on the 1% slowest frames, not on the 1% slowest gameplay time), are flawed because they unduly reward outputting more fast frames. Increasing the number of fast frames without speeding up the slow frames is useless when it comes to making the game feel smooth, which is especially critical in a racing game.

 Missing features:
 - Displaying a summary of the performance test instead of the normal end screen
 - Confirm to the user that the report has been successfully saved
 - And more advanced options.
2024-04-26 16:11:55 +02:00
Alayan
62d0281a18
Adapt the end screen in benchmark mode (part 1)
- Customize the race result screen to offer three options : leave to main menu, save test data, and return to video settings
- Ensure all three options do as they say
- Ensure that the benchmark mode and the profiler are always turned off when leaving through the end screen
2024-04-26 13:39:39 +02:00
CodingJellyfish
e68acaa02a Add resizing code for dynamic ribbon widget 2024-04-26 13:05:36 +08:00
CodingJellyfish
26b24a63ea Add onResize for options screen video 2024-04-26 11:34:08 +08:00
CodingJellyfish
8e5304d4a9 Fix icon button widget crash 2024-04-26 10:38:41 +08:00
CodingJellyfish
5adbb3f16b Add resizing code for spinner widget 2024-04-25 10:13:24 +08:00
CodingJellyfish
0dffd116a9 Remove unneeded hacks 2024-04-24 23:32:34 +08:00
CodingJellyfish
e0be4cfc4f Reset coordinates before they are updated by layout manager 2024-04-24 22:51:51 +08:00
Alayan
893c5a7b5d
Move help and option files in subfolders 2024-04-24 13:46:49 +02:00
Alayan
171ac3c0b0
Adapt the pause menu in benchmark mode
* Use explicit activation and desactivation functions for the profiler to improve code clarity and robustness
* In the pause dialog, only display the 'back to race' and 'exit' buttons in benchmark mode
* Relabel the buttons in the pause menu in benchmark mode
* Use 'Performance test' in user-facing texts to ensure better translations
* Fix parts of the UI disappearing when leaving the pause menu in benchmark mode

Additional known issue introduced in the previous benchmark commit:
* With big text sizes, the performance test button overflows in the graphics settings.
2024-04-24 13:29:05 +02:00
CodingJellyfish
db2cc69d89 Refactor sprite scaling in STKModifiedSpriteBank
Make it proportional to font height so that it can be auto-resized
2024-04-23 15:30:35 +08:00
CodingJellyfish
1319c9845b Remove list header properly 2024-04-23 10:18:19 +08:00
CodingJellyfish
85e52de194 Add more resizing code to CGUISTKListBox 2024-04-22 11:35:19 +08:00
CodingJellyfish
f6836998f0 Use a better setOverrideFont in ribbon widget 2024-04-22 10:56:01 +08:00
CodingJellyfish
34119e1c5f Remove unneeded if in Widget::resize 2024-04-21 14:40:10 +08:00
CodingJellyfish
0d2fd6f628 Recalculate glyph layouts when list box resized 2024-04-21 14:08:39 +08:00
CodingJellyfish
af1238d688 Backport irrlicht changes to CGUISTKListBox 2024-04-21 14:05:34 +08:00
CodingJellyfish
2a60d6508b Add resizing code for list widget 2024-04-21 13:24:07 +08:00
CodingJellyfish
3641183121 Add resizing code for ribbon widget 2024-04-20 18:55:31 +08:00
CodingJellyfish
0cea06d935 Add resizing code for icon button widget 2024-04-19 20:21:54 +08:00
CodingJellyfish
52edb8507e Remove the remaining unneeded header file includes 2024-04-19 17:28:11 +08:00
CodingJellyfish
f70c2abe54 Remove unneeded header file includes in online screens 2024-04-19 15:55:56 +08:00
CodingJellyfish
913a082528 Keep multiplayer in kart selection screen after reloading 2024-04-19 13:35:37 +08:00
CodingJellyfish
2f87966ff6 Add basic code for widget and screen resize 2024-04-19 13:18:31 +08:00
Deve
78c6f16d79 Fixed a crash when entering story mode 2024-04-18 19:27:18 +02:00
Deve
754a11030e Update gradle and android build script 2024-04-18 17:20:09 +02:00
CodingJellyfish
6be521fc96
Fix #5054 (#5055) 2024-04-17 14:09:18 +02:00
Alayan
a6cecd2279
First steps for a benchmark mode
* Add a button in the graphics options to start a benchmark
* Added logic to play a custom replay for benchmarking
* Added logic to automatically start and end the profiling as the race starts and ends, when in benchmark mode
* Disable the profiler drawings in benchmark mode, they take additional resources and are useless
* Keep the race going when the pause menu is opened, as it would otherwise distort the results
* Added logic to clean up the profiler data each time profiling is switched back from off to on. This avoids multiple profiling sessions piling up in one report, for example when benchmarking tw
* Added a sped up Black Forest replay for use during the benchmark

Missing features and known issues:
* The end screen should display a benchmark result summary instead of a normal end screen
* Entering and leaving the pause menu in benchmark mode makes some parts of the race UI disappear
* The end screen should send the player back to the graphics settings, not the main menu
* Pausing and quitting can leave the profiler enabled when it should not be
* The options in the pause menu should be customized in benchmark mode
* The replay used for benchmarking should be configurable in a data file
* Automatically testing multiple graphics settings and providing an overall summary
* And more advanced options.
2024-04-16 05:46:30 +02:00
CodingJellyfish
8577408cec
LOD improvements (#5038)
* Quick cull invisible LOD nodes
* Reduce dynamic cast
* Fix for Vulkan

Maintainer's comment: Helps only in select tracks and more in already fast frames than in the more problematic slow frames, but an improvement nonetheless.
2024-04-15 16:30:08 +02:00
Alayan
6cf094ab78
Add new setting values for increased view distances
Add 3 new setting values, increasing the distance at which a lower level of detail is used by factors of 1.6, 2.0 and 3.0 (default is 1.25). This allows players for which getting enough FPS is not an issue to reduce pop-in and improve the looks of tracks.

In local testing with a strong CPU and a weak GPU, the performance impact of increasing the view distances is small and well worth it, but this may vary from system to system. More testing is needed on different systems, but this suggests room to increase minimum, default and maximum values in future releases.

This patch also slightly changes the auto-computation of LoD distance, making the transition around a distance of 250 smoother.
2024-04-15 01:48:58 +02:00
kimden
31bdb52bfd Make sure handleAllVotes returns true at least once 2024-04-02 01:00:32 +04:00
kimden
c520c441d3 Don't pick first vote if vote majority is achieved but no vote coincides completely 2024-04-02 00:43:58 +04:00
kimden
4ee7c51131 Fix random choice of several equal votes in handleAllVotes 2024-04-02 00:42:33 +04:00
Benau
1a8dbbdc74 Fix #5024 2024-02-23 22:30:43 +08:00
jacekpoz
a254c7afc2
make loopback checking more readable (#5016)
* make loopback checking more readable

* follow coding style

---------

Co-authored-by: jacekpoz <jacekpoz@cock.li>
2024-02-07 23:18:25 +08:00
Benau
e1454a007e Fix memory corruption when vector being resized 2024-01-25 10:51:10 +08:00
Sonter
6573ebe09e
Fix #4960 (#5003)
Adjust linked buttons.

Enum MultitouchButtonType is here: https://github.com/supertuxkart/stk-code/blob/master/src/input/multitouch_device.hpp
2024-01-18 01:12:55 +08:00
Xiangquan Xiao
fab7915011 Minor fix on coding styles. 2024-01-07 14:08:59 -05:00
CodingJellyfish
2e89eeed1a
Fix #3471 v2 (#4989)
Add factor to fonts for scaling to higher size
2024-01-08 01:13:13 +08:00
CodingJellyfish
3928a49d5e
Fix #4923 (#4981) 2024-01-06 12:17:57 +08:00
Benau
42d4eaae96 Fix switch build 2023-12-18 10:39:21 +08:00
Benau
caf6a1b504 Revert "Drop support for the DirectX9 renderer"
This reverts commit c11a7236c7.
2023-12-18 10:35:58 +08:00
Alayan
c11a7236c7
Drop support for the DirectX9 renderer 2023-12-16 15:24:35 +01:00
CodingJellyfish
65ee612110
Fix #3754 (#4966)
* Fix portrait

* Fix vertical tabs

* Fix server selection

* Update race_setup.stkgui
2023-12-14 19:08:41 +01:00
Alayan
bba568d9b8
Use theme color for textbox cursor and fix #4947
- Change the colors of the background and borders of the textbox to ensure they always contrast with each other
- Make the color of the textbox cursor the same as the skin's text color - this ensure it always has good contrast
- Offset the display of text slightly in the textbox. This avoids the cursor 'blending in' with the textbox border
2023-12-14 18:24:37 +01:00
Alayan
f8db600d09
Fix #4965 2023-12-14 16:58:36 +01:00
Alayan
6d38bfec8c
Fix 'Replay with UID of lu' error
- Correctly format the log to display the actual UID
- Fix getReplaydIdByUid being called with an UID of 0, when no replay to compare has been selected
2023-12-06 20:00:52 +01:00
Alayan
4ca872f23d
Make the unsupported replay version warning more compact 2023-11-29 22:35:52 +01:00
Alayan
5bb5f5e86e
Fix #4951 2023-11-29 22:29:34 +01:00
Alayan
a57ac415bb
Fix #3578
- If there is 2 or 3 karts in the GP, karts in 2nd and (if any) 3rd place display a sad animation
- If there is 4 karts in the GP, the kart in 3rd displays a sad animation
- If there is 5 karts or more in the GP, all karts on the podium display a happy animation

The first kart in the GP always displays a happy animation even if alone.
2023-11-24 17:59:39 +01:00
Alayan
bf88954e31
Fix #4944 2023-11-24 16:29:18 +01:00
Alayan
2a903271aa
Fix #4844 2023-11-24 16:13:12 +01:00
Alayan
e744fd3033
More audio improvements
- Fix a bug that made the last lap SFX played only if music was on.
- Fix the behavior of the music volume adjustment when the last lap SFX is played. Previously, the music volume was only adjusted when the music volume was above a certain threshold, but when it was above that threshold, the adjustment was too strong.
2023-11-17 19:11:25 +01:00
Alayan
40511b218c
Fix #4938
- Set the minimum sound volume to 0.025f instead of effectively 0.1f. This is particularly helpful for headphone users.
- Make the step between each volume setting exponential.
- Add parameters to remember the parameters of the audio spinners.
- Increase the default number of values the audio spinners can take from 10 to 15. Old config files will keep using 10.
- Set the default values to 10 (spinners), which translates to 0.2678 (volume fraction) instead of 0.6 (previous default)
2023-11-17 18:49:25 +01:00
Alayan
858ed6bb3e
Fix #4926
Also add more explicit error logging for this case.
2023-11-12 23:02:27 +01:00
CodingJellyfish
bd245e17bf
Fix #4895 (#4896) 2023-11-12 11:32:04 +08:00
Benau
1ba1e7e59f Use high precision for time2Ticks 2023-11-12 11:29:41 +08:00
Alayan
0eb64d0ad5
Fix #4922 by enforcing the bounds
Testing with high reduce-turn-max, skidding looks fine with steer values that would have previously gone out of boundaries. No further fix is needed.
2023-11-11 01:40:04 +01:00
Alayan
f4fd914858
Mostly revert #4632 and properly fix #4609
Not displaying a win message when there is only one kart was intended behaviour. A win requires the possibility of a loss. However, displaying the finishing rank with only one kart is ugly.
2023-11-11 01:32:31 +01:00
Alayan
491c3dee34
Fix updateAndTestFinished to use time2ticks
Also remove the useless function parameter
2023-11-10 19:45:03 +01:00
Benau
e00a81a961 Fix broken ProgressBarMessage after 8f596e29b3 2023-08-15 10:48:21 +08:00
Benau
a47e69d74e Add animated by step texture matrix for kart model 2023-07-27 08:11:51 +08:00
CodingJellyfish
3b043b7f47
Fix #4876 (#4897) 2023-07-21 08:37:08 +08:00
CodingJellyfish
13f61d609c
Fix #4893 (#4894) 2023-07-16 09:53:40 +08:00
CodingJellyfish
8f596e29b3 Add multiple skin container & Fix #4891 2023-07-13 16:09:38 +08:00
kimden
1ed896bf9e Fix start positions for negative sidewards distance 2023-06-29 00:40:38 +03:00
Benau
c2840e972b Always add 1 player when leaving the lobby without splitscreen players added 2023-06-24 12:42:57 +08:00
Snoker101
747cd8f128
Update soccer_world.cpp (#4875)
* Update soccer_world.cpp

edited getRescueTransform function in soccer_world.cpp so that the rescue bird places the kart towards the ball in soccer, as requested by many players.
2023-06-20 08:50:44 +08:00
Benau
0d22d03104 Fix instruction for online options 2023-06-16 01:41:46 +08:00
Newow
41609ef69a
Add fflush(stdout) after writing to stdout with printf
fixes issues with backlog when server is running through a pipe
2023-06-11 14:55:53 +06:00
Benau
3d76bc0108 Keep server bookmarks in save order 2023-05-26 11:15:44 +08:00
QwertyChouskie
1ff8b0fc9c UI/UX: Add success dialog for password change
This brings the UX more in line with password recovery and email change
2023-05-11 12:44:04 -07:00
QwertyChouskie
4932a60a9b UI/UX: Add new icon for Lap Trial mode
Also fix more license documentation stuff
2023-05-11 12:44:04 -07:00