mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 12:00:26 +02:00
Grow the widget and light volume pools for large games
A plasma bolt is drawn by its light volume, a widget, and both pools were still the Xbox's: 64 widgets and 256 light volumes. Every assault rifle holds a light volume for its flashlight beam from when it is made, held or dropped. In network co-op the rifles left lying about are kept as garbage in proportion to the players, and garbage that any player can see is never collected, so a large game fills the widget pool and keeps it full; a client that joins a game in progress makes all the rifles at once and takes every slot. From then on widgets_new finds the pool full and skips the widget, so every bolt flies and hits unseen. - widgets 64 -> 2048 (HALO_PORT_MAXIMUM_WIDGETS) - light volumes 256 -> 2048 (HALO_PORT_MAXIMUM_LIGHT_VOLUMES); with only the widgets grown, the light volumes run out next At 128 players a game can hold about 1,000: the rifles in hand, the ones on the ground (garbage collection starts at 400 and keeps those in view) and the bolts and needles in the air. The CPU part of the game state grows by 38,144 bytes, to 18,242,828 (2,466,548 free). As with any pool size, saved games of earlier builds no longer load.
This commit is contained in:
1 parent
d7efd3934a
commit
35f643f376
3 files changed
+8
-2
No files matched your search
@@ -58,6 +58,12 @@ objects, noncollideable objects, lights) */
|
||||
#define HALO_PORT_MAXIMUM_AREA_OF_EFFECT_OBJECTS 256 /* (64) */
|
||||
/* object references shared by all script object lists */
|
||||
#define HALO_PORT_MAXIMUM_LISTED_OBJECTS_PER_MAP 1024 /* (128) */
|
||||
/* widgets (light volumes, antennas, flags, glows, lightning), each made with
|
||||
its object and kept for its life: an assault rifle's flashlight beam, held or
|
||||
dropped, and a plasma bolt's light volume; a full pool draws the object
|
||||
without its widget */
|
||||
#define HALO_PORT_MAXIMUM_WIDGETS 2048 /* (64) */
|
||||
#define HALO_PORT_MAXIMUM_LIGHT_VOLUMES 2048 /* (256) */
|
||||
|
||||
/* ---------- effects, particles, lights and sounds */
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ static struct light_volume_globals light_volume_globals = {0};
|
||||
void light_volumes_initialize(
|
||||
void)
|
||||
{
|
||||
light_volume_globals.light_volume_data = game_state_data_new("light volumes", 256, 8);
|
||||
light_volume_globals.light_volume_data = game_state_data_new("light volumes", HALO_PORT_MAXIMUM_LIGHT_VOLUMES, 8);
|
||||
if (!light_volume_globals.light_volume_data)
|
||||
{
|
||||
display_assert(
|
||||
|
||||
@@ -61,7 +61,7 @@ symbols in this file:
|
||||
|
||||
enum
|
||||
{
|
||||
MAXIMUM_WIDGETS_PER_MAP = 64
|
||||
MAXIMUM_WIDGETS_PER_MAP = HALO_PORT_MAXIMUM_WIDGETS
|
||||
};
|
||||
|
||||
/* ---------- macros */
|
||||
|
||||
Reference in new issue
Block a user