SpriteBatcher now sorts with a stable LSD radix sort: equal-key sprites keep submission order across frames (no flicker) and passes over digits identical in all keys are skipped, making the common single-layer case nearly free. Hot paths avoid per-sprite trig and square roots: SinCos is skipped for unrotated sprites and the culling radius comes from the region's precomputed diagonal. Stress scene (100k entities, ~61k on screen, Release): 103 -> 124 FPS. Sample now runs with VSync off to show real frame rates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 lines
461 B
C#
17 lines
461 B
C#
using Microsoft.Xna.Framework;
|
|
using MrGameEng.Core;
|
|
using MrGameEng.Sample.Scenes;
|
|
|
|
using var host = new GameHost(
|
|
new GameHostOptions
|
|
{
|
|
Title = "MrGameEng Sample",
|
|
Width = 1280,
|
|
Height = 720,
|
|
ClearColor = new Color(24, 26, 32),
|
|
VSync = false, // техдемо: показываем реальный FPS, не ограниченный частотой монитора
|
|
},
|
|
new MainScene());
|
|
|
|
host.Run();
|