Commit Graph

20 Commits

Author SHA1 Message Date
Kirill 3fcc7211ce Implement civilization flow mechanics and profiling for resource allocation
- Added `civilization_flow.gd` to manage continuous expected flows and resource allocation within civilizations.
- Introduced `allocate_profiled` and `whole_quotas` functions in `quantity_math.gd` for precise stock allocation based on float shares.
- Enhanced `credit` logic in `object_ledger.gd` to handle production remainders more effectively.
- Updated `append_batch` in `object_batches.gd` to prevent batch creation for invalid IDs.
- Introduced `ratio_approx` function in `exact.gd` for better handling of float profiles.
- Added a benchmark script `benchmark_civilization_flows.gd` to evaluate the performance of civilization flow mechanics.
- Refactored various functions to improve clarity and efficiency in handling resource flows and allocations.
2026-10-07 22:51:55 +03:00
Kirill e48d4bbe88 Add comprehensive tests and optimizations for simulation and UI performance
- Introduced a new benchmark save script to create a stress test scenario with extreme values for simulation performance.
- Added a full UI benchmark script to measure frame rates and performance metrics during UI interactions.
- Implemented tests for coarse generations to ensure population transitions are handled correctly.
- Created tests for extra parameters to validate the loading and application of configuration settings.
- Developed simulation optimization tests to verify the efficiency of population drift and rounding mechanisms.
- Added split optimization tests to ensure accurate allocation and rounding behavior in population management.
- Included startup parameter tests to confirm the correct initialization of global parameters before scene readiness.
- Enhanced the audit rounding ledger to compare selective and full rounding results for consistency.
2026-10-05 22:16:59 +03:00
Kirill c4e7302567 Add new tests and implement frame budget management
- Introduced `civilization_benchmark.gd` and `legacy_quantity_math.gd` for benchmarking and legacy quantity calculations.
- Created `test_dynamic_math.gd`, `test_frame_evolution.gd`, and `test_sparse_batches.gd` to validate mathematical operations and frame evolution logic.
- Implemented `frame_budget.gd` to manage cooperative work on the main thread, ensuring no partially calculated state is published.
- Added UID files for all new scripts to maintain unique identifiers.
2026-10-01 23:43:34 +03:00
Kirill f51eea6c0f Enhance simulation performance and accuracy by optimizing physical amount calculations and refining arithmetic operations 2026-10-01 20:30:53 +03:00
Kirill befb377774 Add new music tracks to the sound directory
- Added cosmic_unicorns.ogg
- Added funky_eldritch.ogg
- Added meditative_beings.ogg
- Added owniverse_main_theme.ogg

These tracks enhance the audio experience of the project.
2026-10-01 07:48:52 +03:00
Kirill fad862d618 Add benchmark for saved state performance
- Introduced `benchmark_saved_state.gd` to evaluate the performance of the saved state restoration process.
- Implemented JSON integer restoration to handle large integers accurately.
- Added command-line argument parsing for specifying the path to the diagnostic JSON file and optional delta seconds.
- Conducted performance tests at different speeds and logged the elapsed time for six consecutive steps.
- Created a new UID file for the benchmark script.
2026-09-30 22:46:26 +03:00
Kirill fb8a3f5658 Add exact arithmetic implementation and tests
- Introduced exact arithmetic with support for large integers and fractions in `exact.gd`, `big_integer.gd`, and `exact_value.gd`.
- Implemented a comprehensive test suite in `test_exact_math.gd` to validate arithmetic operations against expected results.
- Added a README in `math` directory to document the exact arithmetic system and its usage.
- Ensured that all arithmetic operations maintain precision without floating-point errors, using a custom representation for large numbers.
- Included methods for encoding and decoding exact values for serialization.
2026-09-30 08:08:27 +03:00
Kirill f2111a376a Add core simulation modules for owniverse mechanics
- Introduced `life_evolution.gd` to manage life evolution processes.
- Implemented `manual_production.gd` for handling production mechanics, including resource management and production steps.
- Created `object_batches.gd` to manage batches of objects, including scaling and appending batches.
- Developed `object_ledger.gd` for tracking physical amounts, available resources, and binding ownerships.
- Added `simulation_module.gd` as a base class for simulation modules, providing a weak reference to the world.
- Established `stellar_rules.gd` for managing stellar evolution and destruction mechanics.
- Introduced `universe_environment.gd` to calculate environmental parameters based on the current state of the universe.
2026-09-29 20:23:20 +03:00
Kirill da03ba11c0 Refactor Owniverse modules for quantity mathematics and entity catalog
- Introduced `quantity_math.gd` for arithmetic operations including allocation, normalization, and accumulation of quantities without scene tree dependencies.
- Created `entity_catalog.gd` to manage entity definitions, groups, and event indexes, ensuring separation from simulation state and UI.
- Implemented `item_presentation.gd` for read-only projections of simulation state, handling amounts and unlock conditions for UI elements.
- Updated `civilization_evolution.gd` and `civilization_state.gd` to utilize new quantity math functions, improving code clarity and maintainability.
- Enhanced tests in `test_quantity_catalog.gd` to validate new functionality and ensure correctness of mathematical operations.
- Revised documentation to reflect changes in module structure and functionality.
2026-09-29 19:55:20 +03:00
Kirill c2313e9163 Enhance item visibility logic and update initial energy parameter; add tests for life icon functionality 2026-09-28 22:56:40 +03:00
Kirill 15ee7833ed Add world indicators and parameters to enhance universe simulation
- new universe creation function.
2026-09-28 22:19:13 +03:00
Kirill d6fd40969f Implement short-lived stellar event handling and optimize batch processing; add tests for new functionality 2026-09-22 22:50:54 +03:00
Kirill 1796829338 Update speed limit, enable embedded PCK format, and enhance brown dwarf production logic 2026-09-21 20:42:40 +03:00
Kirill f25b77b605 Implement asynchronous save manager with UI update optimizations and add tests for save functionality 2026-09-20 22:14:47 +03:00
Kirill a09e3df220 Refactor save manager validation and update state structure
- Updated the save manager to enforce a new format version (2) and improved validation checks for the save data structure.
- Enhanced the `validate_data` function to ensure all required fields are present and valid.
- Adjusted the handling of legacy saves and introduced new checks for various state fields.
- Improved number formatting in the global script for better readability of large numbers.
- Updated tests to reflect changes in the save manager and validation logic, ensuring compatibility with the new state structure.
- Added new tests for group indexing and production transactions to ensure correctness of entity management and resource production.
2026-09-20 20:56:15 +03:00
Kirill 26347fca30 Add comprehensive civilization evolution tests and enhance civilization state management
- Introduced a new test script for civilization evolution (`test_civilization_evolution.gd`) to validate the evolution mechanics, including population dynamics, ethical transitions, and war impacts.
- Updated `README.md` to include instructions for running the new civilization evolution tests.
- Modified `test_civilization_state.gd` to accommodate changes in civilization rules and ensure proper validation of ethical stages.
- Enhanced `test_descriptions.gd` to check for accurate population counters and state validation.
- Adjusted `test_life.gd` to reflect updates in life version management.
- Improved `civilization_state.gd` to include habitat budget calculations and transition management.
- Added `civilization_evolution.gd` to handle the logic for civilization evolution, including population drift, warfare, and colonization mechanics.
- Updated `owniverse.gd` and `owniverse_entity.gd` to integrate new evolution logic and ensure proper initialization of entities.
2026-09-16 19:54:47 +03:00
Kirill 5ea65a7e9b Update export presets, project version, and enhance civilization simulation rules
- Updated export path and version code in export_presets.cfg
- Changed project version in project.godot to 0.7.0
- Expanded simulation rules in simulation_rules.md to clarify resource management
- Improved testing framework in tests/README.md to include new civilization budget checks
- Added new tests for batch boundaries and civilization state transitions
- Enhanced civilization_state.gd with shared budget and transition logic
- Refactored owniverse.gd to enforce capacity during life batch initialization
2026-09-16 07:58:19 +03:00
Kirill 5f3875bc14 Add life rules and implement tests for civilization and life states
- Introduced a new file `life_rules.txt` to define life progression and degradation rules.
- Created `test_civilization_state.gd` to validate the functionality of civilization rules and ethics.
- Added `test_life.gd` to test life evolution, including initialization, batch processing, and state validation.
- Implemented `civilization_state.gd` to manage civilization ethics and space civilization detachment logic.
- Ensured all tests check for expected outcomes and validate state integrity after operations.
2026-09-15 23:05:05 +03:00
Kirill cc2700d507 Add item description and testing framework for Owniverse
- Introduced `item_description.gd` to handle item descriptions with localization support.
- Implemented a testing script `test_descriptions.gd` to validate item description rendering and localization.
- Added a new template file for Russian localization.
- Included a large package file `owniverse.0.6.29-145.pck` for game assets.
- Ensured proper memory management in tests with fixture and dispose functions.
2026-09-15 22:01:45 +03:00
Kirill 5f5cc6f894 Implement gradual evolution mechanics and simulation time handling in Owniverse.GI
- Added `blastability` property to entities for vulnerability tracking.
- Enhanced planet string parsing with validation and error handling.
- Introduced `simulation_rules.md` to document evolution mechanics and rules.
- Created tests for time progression and stellar evolution rules, ensuring correct handling of fractional years and resource production.
- Implemented `simulation_time.gd` for managing accumulated time and year processing.
- Updated tests to validate legacy save compatibility and migration to new time schema.
2026-09-15 08:27:04 +03:00