LegacyShell WikiLegacyShell Wiki
Back to LegacyShell
Home
Wiki
Plugins
Docs
Back to LegacyShell
Home
Wiki
Plugins
Docs
  • Plugins

    • Plugin Docs

      • Default

        • Crackshot
        • Auto Restart Notifications
        • Auto Shop Notifications
        • Block Viewer
        • Burnt Block Sets
        • Christmas Event
        • Classic Skybox
        • DeadInternet
        • Debug F3
        • Discord Playtest
        • dynamicmapblocks
        • FancyGraphics
        • Francium
        • Health Pack Item
        • Item ToolTips
        • LagCompensation
        • LegacyAchievements
        • LegacyAdmin
        • LegacyAnalytics
        • LegacyLightmaps
        • LegacyProfiles
        • LegacyReplay
        • LegacySettings
        • LegacyShellCore
        • LegacyThemes
        • LegacyWeather
        • Map Editor Saving
        • Modern Map Blocks
        • Modern Shell Guns
        • Modern Shell Hats
        • Modern Shell Stamps
        • Minerva
        • ParkourMode
        • Player Count Notifications
        • TimeMachine
        • Vaporwave Map Blocks
        • WhatsAppTheme
        • Wiki Only Mode
        • Zaxonius Custom Guns
        • ZombiesMode
      • Examples

        • Modern Shell Maps
    • List of plugins

Canonical source: plugins_default/francium/README.md - edit that file, not this page (this page is built live from it, nothing here is a tracked copy).

Francium

A client performance plugin. Collision, physics, game tick rate and network protocol stay unchanged. Simple Map changes the static map's visual geometry.

  • Comparison toggle: Settings → Debug → Francium Improvements defaults to On. Change it, then reload the page before playing or recording. Off bypasses candidate filtering, material indexing, HUD/crosshair changes, sprite changes, shader preparation and Simple Map; the original F3 frame loop is used. Simple Map preferences are retained for re-enabling. The scripted benchmark remains available, and its results record whether improvements were active. Enable the Debug tab under General first.
  • Unlock FPS: Debug → Performance → Unlock FPS defaults to Off and applies live. With Debug enabled, the game engine schedules frames through MessageChannel tasks instead of waiting for display refresh. It works independently of Francium Improvements, including during the benchmark. Menus, unrelated animation callbacks, hidden tabs and VR requesters retain normal scheduling. This changes rendering cadence, not the simulation tick rate or display refresh rate; browser/GPU limits still apply. Benchmark results record the selected mode. Use the same mode for comparison runs.
  • Local Benchmark: Settings → General → Enable Debug, then Debug → Local Benchmark → Open Test loads a dedicated local Castle scene. It uses the real game loader, Player/PlayerActor models, normal weapons, pooled projectiles, collision queries, particles and sound. No game-server connection, AI bot plugin or replay plugin is required. Six actors follow fixed spawn-based tracks with timed jumps, shots, reloads, grenades, deaths and respawns. The camera follows the same authored 45-second route. The scene warms up before showing a ready screen: start a DevTools Performance recording there, then press Run Fly-through. A 3-second countdown precedes the Francium scripted benchmark measure in the Timings track. It runs all 2,700 simulation ticks at 60 Hz without skipping ticks on slow devices, with seeded synchronous effects and a fixed simulation-time camera. Severe stalls can extend wall duration while the simulation catches up. Current graphics options apply; Auto Detail is temporarily held off to avoid changing resolution/workload between runs, then restored. The run cancels on Esc, hiding the active tab or changing render dimensions. Esc during loading queues cancellation until the map-complete boundary. Completion returns home with scenario version, seed, resolution, detail mode, elapsed wall time and action counts; Last Benchmark → Results reopens that summary until page reload. Both benchmark buttons are disabled/guarded during normal games, pending game connections and an existing benchmark. The load confirmation rechecks this guard. Account kill/death/streak bookkeeping is excluded. Input handlers, settings, local socket state, observers and benchmark UI are restored/cleaned up on exit. Scripted actors do not measure server AI, authoritative combat, network traffic or client movement prediction; native animation/audio timing and driver/GC behaviour can still vary. A benchmark-local alias works around the bundled RocketActor's bullet.player access without changing the core prototype or normal games.
  • Render candidates: disabled hats, gun skins, map-block templates and pooled objects stay available for cloning/collision without being checked every rendered frame. Each camera only evaluates relevant layers, retaining forced-active meshes, action managers, LOD callbacks and enabled instance sources. Layer, camera-mask and forced-active changes take effect on the next evaluation. Lists reuse their storage, retain scene order and follow enable/disable, parenting, addition and removal; existing providers that return a different list, such as octrees, are left alone.
  • Simple Map: choose Off, Simple or Ultra under Graphics → Detail. Simple remains the default: full blocks become cubes, wedges/inverted wedges become triangular ramps, and AABB blocks use their collider bounds in the source mesh's coordinates. Ultra also replaces OBBs, ladders and remaining decorative shapes with boxes. Collider boxes retain their local rotation and scale; shapes without colliders use their visual bounds, with a tiny thickness for flat decorations. Empty templates stay empty. Original vertex colors and UVs are sampled onto flat faces; the normal map material, lightmap generation, fog and shadows still apply. Original model/collider geometry and map cells stay untouched. Simple keeps unsupported shapes and AABBs without valid collider bounds unchanged. This applies to static map construction; moving blocks keep their own renderer. Changes apply from the next game. Existing checkbox preferences carry over as Simple or Off. Castle's real assets build with 32,274 map triangles on Simple (89.8% fewer than the original 315,496), or 9,968 on Ultra (96.8% fewer than the original; 69.1% fewer than Simple).
  • HUD: unchanged health numbers, health-circle attributes and crosshair transforms are not rewritten. Crosshair offsets round to 0.01em to ignore subpixel spread jitter; spread/FOV changes still move the crosshair and readiness changes are immediate. External crosshair changes, including replay transforms, are checked against the current DOM. The visible FPS counter updates at most four times a second; internal FPS calculations are unchanged. During a game, upgraded-player names use their static color and health-circle transitions are immediate. Damage/healing information stays current. F3 stops requesting frames while hidden and resumes when opened.
  • Sprites: empty managers skip uploads/draws. Nonempty managers upload only their populated vertices, retaining the full CPU buffer for context restoration. Sprite animation, fog, blending and depth behavior are preserved.
  • Materials: changes use an index of meshes assigned to that material. Assignments, cloning, instances, scene additions/removals and disposal update it. Unassigned meshes are visited only when the scene's current default material changes, including after replacing that default. Only multi-material users need the general fallback scan, so changing a multi-material slot still works.
  • Shader preparation: representative attribute/bone/material variants, including instancing, are prepared before the render loop starts while unspawned. Egg-shell and outline/overlay variants are included. New player actors only queue their meshes after construction; preparation and shader queries wait until the local player is out of play. Queued work runs at most one mesh and one shader job per timer, with late texture readiness retried up to 40 attempts. Repeated equivalent assets reuse the shader variant; each preparation call is bounded to 64 jobs. Scene disposal cancels queued work. Initial loading and lobby preparation can still block on the driver, and a newly visible shader needed during play can still compile through the normal renderer.

The engine adapters target the bundled Babylon 3.3.0. Recheck _syncParentEnabledState, _syncSubMeshes, the material setter/dirty mechanism and sprite buffer layout when upgrading Babylon. Changes should use normal scene/material/parent APIs, not write private fields directly. The F3 build adapter matches the existing loop; if its source changes, only that adapter is skipped.

Restart the client server and reload the page to load the plugin. Rename the folder to _francium, restart the client server and reload to disable it. Like other bundled plugins, it uses the main repository's Git history.

Verification

node plugins_default/francium/test.js
node plugins_default/francium/test-features.js
node plugins_default/francium/test-rendering.js
node plugins_default/francium/test-benchmark.js
node plugins_default/francium/test-assets.js # needs the client's prepared models
node plugins_default/francium/test-map-assets.js # also needs server-game/store/maps.json

Tests use the browser's bundled Babylon build with a NullEngine, including templates, clones, instances, parenting, material changes/multi-materials, default-material replacement, scene lifecycle, render evaluation and shader preparation. Two-camera tests compare visible mesh sets and readiness/matrix calls, including cross-layer instances and forced/action/LOD exceptions. Map tests check ramp orientation/winding, collider-relative bounds, rotated/scaled/mirrored boxes, flat decorations, UV/color sampling, cell rotations, setting compatibility, disabling and disposal. Real Castle SPS builds check both detail levels' triangle counts and untouched source/collider geometry and map definitions. Real-asset checks also ensure unrelated material changes skip the thousands of unassigned templates. HUD tests check unchanged writes, immediate health, crosshair jitter/FOV/readiness/external changes and F3 toggling. Shader scheduling checks prohibit preparation during play, bound each queued timer to one shader job and check disposal cancellation. Sprite tests compare animation/blending/depth draw behavior with the original renderer and check empty/partial uploads. Performance gains and driver compilation still need an A/B recording on the target device.

Benchmark tests check disabled buttons and direct-call guards for games/connections/re-entry, confirmation races, local socket setup, blocked joins, restoration without account bookkeeping, safe loading/render-stack cancellation, fixed routes/event schedules, scoped RNG restoration and catch-up without skipped ticks. Full-client browser checks exercise loading, shader preparation, the complete actor/effect sequence, return home and repeated runs.

Prev
FancyGraphics
Next
Health Pack Item