alufolie91 7b2e28ef84 w_wad: replace unordered_map with verstable hashmap for lumpnumcache + convert back to C from C++
been rethinking this and been doing some digging online
the unordered_map was just a quick and simple fix for performance issues in blan, but came with caveats:
- unordered_map is simple to use but not particulary great in terms of performance during lookups especially
- we needed to convert w_wad to c++ just for the lumpnumcache
- due to needing to preserve the key since they gotta outlive the scope of the function that inserts things into the map, we effectively did a string copy on each map insert and lookup
after some research came across verstable, which is basically almost the exact same as unordered map but in C while being extremely fast (even more with its builtin string hash and comparisor)
only caveat with verstable is we need to rely on a new lib, though its just a single header file, and we gotta manage ensuring the input keys outlive functionscope ourselves, which we do with strdup in this case
good thing, verstable allows to call a "destructor" specified by us whenever it removes or replaces keys in the map
this also means we only need to copy strings on insert and not on lookup anymore
all in all this is much faster while giving us the simple usage of c++ unordered_map while staying in C

due to the strdup quirk i had to slightly modify verstable to allow to take const as inputs for the getter functions even if the keys themselves are not const marked with "KEY_GET_CONST"

Verstable can be found here: https://github.com/JacksonAllan/Verstable
and is licensed under MIT which is perfect!
2026-02-24 15:10:42 +01:00
2014-03-15 13:11:35 -04:00
2026-01-23 09:55:00 +01:00
2026-01-23 09:55:00 +01:00
2025-09-25 21:34:59 +02:00
2023-11-10 18:59:58 +03:00
2014-03-15 13:11:35 -04:00
2024-08-19 17:51:35 +02:00
2026-01-23 09:55:00 +01:00
2014-03-15 13:11:35 -04:00
2016-05-21 23:53:04 -04:00
2014-04-07 10:03:14 -04:00
2014-03-15 13:11:35 -04:00
2023-09-14 00:18:22 +03:00
2025-12-04 19:21:30 +03:00
2025-02-06 16:15:16 -06:00
2024-03-17 19:28:14 +01:00
2023-09-29 15:34:29 +02:00

SRB2Kart-Saturn

SRB2Kart-Saturn is a modification of SRB2Kart with a focus on new Features, Fixes, Optimizations and general Improvements, all while retaining 100% compatibility with vanilla SRB2Kart.

SRB2Kart is a kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2, based on a modified version of Doom Legacy.

For more information on Saturn´s features check out the changelogs on the Releases page and the ingame "Saturn Options" menu.

Also be sure to check the LUASTUFF file for more information on all the extra lua features Saturn has.

We also have a Flatpak available on Flathub! (many thanks to riomccloud!)

Dependencies

  • SDL2 (Linux/OS X only)
  • SDL2-Mixer (Linux/OS X only)
  • libgme (Linux/OS X only)
  • libopenmpt (Linux/OS X only)
  • libbacktrace (Linux/OS X only, optional, disable support with NOLIBBACKTRACE)
  • libupnp (Linux/OS X only, optional, enable support with HAVE_MINIUPNPC)

Compiling

See SRB2 Wiki/Source code compiling. The compiling process for SRB2Kart is largely identical to SRB2. Visual C++ (MSVC) is unsupported

For Windows only the Makefile build system with GCC or Clang compiler is supported. Visual C++ (MSVC) is unsupported.

64-bit Windows builds are supported and recommended over 32-bit builds, they will build automatically when using the MSYS2 MinGW 64-bit executable (requires the mingw-w64-x86_64-gcc package), no extra flags needed! The specific DLLs can be found under /libs/dll-binaries/(i686 for 32bit/x86_64 for 64-bit)/ or in the Release packages

MacOS and Linux can be build with CMake, but it is recommended to use the Makefile for Linux over CMake

Alternatively the srb2bld script by Bijman can be used aswell!

Disclaimer

Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.

S
Description
No description provided
Readme GPL-2.0
327 MiB
0 Stars 2 Watchers 0 Forks
2026-09-27 21:29:09 +02:00
Languages
C 90.1%
C++ 4.7%
Shell 1.9%
Roff 1.3%
CMake 0.8%
Other 1.2%