mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 19:47:08 +02:00
Memory - The entity and pending-update pages are four times the game's own size (524,288 slots), down from eight times. At eight, the game kept a 3.5 GB block for them that was fully in RAM on custom maps; the largest map load seen needs about 150,000 slots. The render-instance pool and spatial buckets stay at eight times. - The log has a "Memory:" line when the game's memory, the players in the session or the skaters built change: committed, in RAM, players, skaters built, player distance and map. - Console: `perf memory` lists the game's memory by block size. `perf memory mark` remembers it, and the next `perf memory` says what was added since. `perf memory trace` also records who asked for each block until `perf memory stop`. `perf memory big` lists the largest blocks with how much of each is in RAM and a sample of what is in them. RESKATE_MEMORY_TRACE=<megabytes|all> starts the trace with the game. Replay crash guard - The game's replay recorder crashes when its stream has no room for the next chunk: it writes to the chunk it was not given (Skate.exe+0x48efa34, crash reports of 2026-10-10). The function now runs under a handler that, for that one fault alone, returns as if no chunk was ended, and says so in the log. Any other fault still goes to the crash reporter. The skip path has not been triggered in testing. Launcher - `-map <name>` (also --map, -map=<name>) loads that map as soon as the game is up, named as the console's `load` names one. With --no-gui and no other options the launch still uses the saved launcher settings. Pause menu - The Multiplayer and Mod Options pages step aside while the game's side menu, or a screen opened from it such as Settings, is over them. They drew over both before. - A button still held when a page comes back is not a press on it: the Back that closed the side menu no longer dismissed the page as well. Multiplayer cosmetics - A player whose mods add or remove cosmetic slots (stickers, say) no longer has the whole outfit refused. Their items go to this game's slots by slot: a slot they lack stays empty, an item in a slot this game lacks is left out, and the log says how many of each.
75 lines
4.4 KiB
C++
75 lines
4.4 KiB
C++
#include "bootstrap.h"
|
|
#include "Engine/Core/Log/logging.h"
|
|
#include "Engine/Core/Hooks/hooks.h"
|
|
#include "Engine/Core/Platform/launcher_support.h"
|
|
#include "Extension/Boot/startup_interventions.h"
|
|
#include "Extension/Boot/steam_restart_guard.h"
|
|
#include "Extension/Boot/user_data_redirect.h"
|
|
#include "Extension/Boot/ea_app_block.h"
|
|
#include "Extension/Boot/ea_service_block.h"
|
|
#include "Extension/Assets/native_patch_support.h"
|
|
#include "Extension/Assets/mod_layers.h"
|
|
#include "Extension/Assets/loose_files.h"
|
|
#include "Extension/Scripting/custom_script_loader.h"
|
|
#include "Extension/Assets/morph_memory_pool.h"
|
|
#include "Extension/Assets/native_render_resource_pool.h"
|
|
#include "Extension/Rendering/display_startup.h"
|
|
#include "Extension/World/native_route_lookahead.h"
|
|
#include "Extension/World/native_entity_pages.h"
|
|
#include "Extension/World/physics_world_size.h"
|
|
#include <string>
|
|
|
|
namespace dingosdk::runtime {
|
|
namespace {
|
|
bool stage(logging::Channel channel, const char* name, bool ready, const std::string& error) {
|
|
logging::log(ready ? logging::Level::info : logging::Level::error, channel,
|
|
"{}: {}{}", name, ready ? "ready" : "failed", error.empty() ? "" : " - " + error);
|
|
return ready;
|
|
}
|
|
}
|
|
bool initialize_bootstrap(std::uintptr_t base) {
|
|
if (!base) return false;
|
|
using logging::Channel;
|
|
std::string error;
|
|
bool ready = start_startup_interventions(base, error);
|
|
if (!stage(Channel::runtime, "Startup interventions", ready, error)) return false;
|
|
const auto hooks = hook_initialize();
|
|
if (hooks != HookOk && hooks != HookAlreadyInitialized) {
|
|
logging::log(logging::Level::error, Channel::hooks, "Hook service failed: {} ({})", hook_status_string(hooks), static_cast<long>(hooks));
|
|
return false;
|
|
}
|
|
logging::write(logging::Level::info, Channel::hooks, "Microsoft Detours hook service ready.");
|
|
error.clear(); ready = start_native_patch_support(base, error);
|
|
if (!stage(Channel::assets, "Native InitFS/package support", ready, error)) return false;
|
|
error.clear(); ready = start_mod_layers(base, error);
|
|
if (!stage(Channel::assets, "Mod layout layers", ready, error)) return false;
|
|
error.clear(); ready = start_loose_files(base, error);
|
|
if (!stage(Channel::assets, "Loose Lua/config files", ready, error)) return false;
|
|
error.clear(); ready = start_custom_script_loader(base, error);
|
|
if (!stage(Channel::assets, "Custom Lua scripts", ready, error)) return false;
|
|
error.clear(); ready = start_morph_memory_pool(base, error);
|
|
if (!stage(Channel::assets, "Morph memory pools", ready, error)) return false;
|
|
error.clear(); ready = start_native_render_resource_pool(base, error);
|
|
if (!stage(Channel::assets, "Native render-resource pools", ready, error)) return false;
|
|
error.clear(); ready = start_native_entity_pages(base, error);
|
|
if (!stage(Channel::world, "Native entity pages (524288 entity/update slots, 1048576 render slots, 16384 spatial blocks/bucket, 128 MiB arena minimum)", ready, error)) return false;
|
|
error.clear(); ready = start_physics_world_size(base, error);
|
|
if (!stage(Channel::world, "Physics world pools (65000 static bodies)", ready, error)) return false;
|
|
error.clear(); ready = start_native_route_lookahead(base, error);
|
|
if (!stage(Channel::world, "NPC route cycle and endpoint guards", ready, error)) return false;
|
|
// The level unload guard (unload_guard.h) is not installed: stepping over an entry with no
|
|
// asset stopped the crash, but that entry had been registered when the level loaded, and
|
|
// left registered it kept the level from ever finishing its unload (a map change that never
|
|
// ends, which is worse than the crash). It goes back in once it can release what it skips.
|
|
if (!stage(Channel::graphics, "Display startup settings", start_display_settings(base), {})) return false;
|
|
error.clear(); ready = start_user_data_redirect(error);
|
|
if (!stage(Channel::runtime, "Separate game user data", ready, error)) return false;
|
|
error.clear(); ready = start_ea_app_block(error);
|
|
if (!stage(Channel::runtime, "EA app launch block", ready, error)) return false;
|
|
error.clear(); ready = start_ea_service_block(error);
|
|
if (!stage(Channel::runtime, "EA online services block", ready, error)) return false;
|
|
error.clear(); ready = start_steam_restart_guard(error);
|
|
return stage(Channel::runtime, launcher::offline_mode() ? "Offline Steam" : "Steam restart guard", ready, error);
|
|
}
|
|
}
|