Commit Graph

89 Commits

Author SHA1 Message Date
Kirill 273093bd9e Разделить частоту обновления часов и расчёта симуляции
Счётчик времени UI обновляется до 10 Гц по запрошенному времени, а тяжёлые циклы по-прежнему запускаются с адаптивным интервалом и обрабатывают весь накопленный промежуток. Обновить тесты и описание модели.
2026-10-17 23:41:18 +03:00
Kirill 00b6192d19 Refactor production request handling: implement queuing mechanism and improve production application logic 2026-10-08 22:19:29 +03:00
Kirill 02c9843e1b Enhance civilization flow mechanics and adaptive quality control
- Implemented runtime-only adaptive quality controller to optimize simulation performance based on CPU time.
- Added adaptive quality thresholds and recovery cycles to dynamically adjust simulation fidelity.
- Introduced single-step solving method for civilization transitions to improve performance under high loads.
- Updated benchmark scripts to include speed parameter for testing various simulation speeds.
- Added tests for adaptive quality adjustments and their effects on civilization flow calculations.
- Documented results of optimization attempts and their impact on performance metrics.
2026-10-08 22:05:08 +03:00
Kirill 459fbb2a4d Refactor civilization flow reward calculations for improved accuracy and performance 2026-10-08 21:25:39 +03:00
Kirill c42940369a Refactor capacity enforcement and production logic
- Updated `enforce_capacity` function to accept an optional `physical` parameter, allowing for more flexible handling of physical amounts.
- Modified `initialize_life_batches` to return physical amounts after enforcing capacity, improving data flow.
- Enhanced `try_production` to utilize shared physical amounts, reducing redundant calculations.
- Adjusted `stellar_environment` to accept an optional `quantities` parameter, streamlining its usage.
- Added new test results for physical totals to validate performance improvements across various scenarios.
2026-10-08 21:10:36 +03:00
Kirill 9357f757a9 Refactor civilization flow mechanics: enhance commit and colonization logic, add tests for flow application and resource allocation, and optimize performance metrics. 2026-10-08 20:43:51 +03:00
Kirill 413f2be904 Refactor simulation timing and frame processing logic for improved accuracy and performance 2026-10-08 00:15:23 +03:00
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 6ee66a627d Refactor civilization evolution and state management
- Enhanced the `civilization_evolution.gd` script to improve population handling and resource allocation during civilization transitions.
- Introduced new functions in `civilization_state.gd` for profile normalization and merging, ensuring consistent population representation across stages.
- Updated `evolution_coordinator.gd` to incorporate budget phases for better tracking of simulation performance.
- Improved `frame_budget.gd` to monitor maximum slice durations and phases during processing.
- Added a new benchmarking tool in `android_benchmark.gd` to measure performance metrics during simulation runs, including frame processing times and throughput.
- Created associated scene and resource files for the benchmarking tool to facilitate testing and performance evaluation.
2026-10-06 23:02:42 +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 6f6a1be3bd Refactor audio effect handling: remove cooldown logic and enhance sound playback functionality 2026-10-03 13:36:33 +03:00
Kirill 9e13c8bbe3 Implement audio management system with effects and music players; add settings for sound and music volume 2026-10-03 13:21:53 +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 2f0a3ee8d4 Warming border added 2026-09-28 22:32:52 +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 e87d4083e9 Refactor code structure for improved readability and maintainability 2026-09-22 23:47:59 +03:00
Kirill 5a18b41528 Refactor code structure for improved readability and maintainability 2026-09-22 23:10:09 +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 a3d24114a1 Add screen management to top menu and update button functionality; replace close button with back button 2026-09-21 22:32:56 +03:00
Kirill 8867da569a Refactor code structure and remove redundant sections for improved readability and maintainability 2026-09-21 21:46:43 +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 f246efd6ad Add unit tests for action value formatting and distribution
- Implemented a new test script `test_action_values.gd` to verify the precision of fractional action amounts and the distinctiveness of adjacent values.
- Added checks to ensure that action values are correctly formatted and that the distribution of actions preserves distinct requests.
- Included validation for rendered button labels to confirm they are distinguishable.
2026-09-20 23:55:38 +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
Kirill 85a13eb241 Refactor save management; update validation logic in save_manager.gd and enhance action handling in actions.gd for improved data integrity and user experience 2026-09-14 07:47:21 +03:00
Kirill dea744bc30 Refactor save management; enhance save_data function with verification and plaintext copy options, and update load_data logic for improved error handling 2026-09-13 22:57:25 +03:00
Kirill c22b21a537 Refactor global.gd to update SPEED_LIMIT constant from 4 to 5
Enhance stage.gd debug output in _on_topmenu_button_pressed function for better state tracking; comment out unnecessary print statements.

Update owniverse.gd to introduce new state properties: batch_origins, distribution, and auto_resources; refactor evolute function for improved state management and batch processing.

Revise state.gd to clean up debug print statements in add function for better readability and maintainability.
2026-09-13 21:09:42 +03:00
Kirill b44f92aacf Refactor state structure; encapsulate datetime and year within a time dictionary and update related logic 2026-09-11 09:31:37 +03:00
Kirill 0162084e53 Refactor state management; update unlock logic and enhance signal bindings in scene 2026-09-01 23:53:05 +03:00
Kirill 2f4b6a98d8 Refactor production logic to use state amounts; update calculate_max_producible function to accept default desired amount 2026-09-01 21:29:07 +03:00
Kirill d90f8693c9 Update Godot core rules to version 4.7; refactor production logic and add entity batch processing 2026-08-31 23:51:07 +03:00
Kirill e870c96879 Add 'binds' key to state dictionary for enhanced state management 2026-08-30 22:31:24 +03:00
Kirill e531e7d9b6 Refactor item management and unlock logic; remove unused item update list and signal 2026-08-28 00:07:18 +03:00
Kirill 57cc023558 Implement item unlocking mechanism and refactor save functionality; update scene timer node 2026-08-27 23:04:56 +03:00
Kirill 23929e3651 Refactor owniverse state management; replace evolution class with state handling and update cycle logic 2026-08-25 00:26:31 +03:00
Kirill 829aadca2d Update version to 0.6.27 and increment version code to 143; refactor resource paths in scene files
Android / android (push) Successful in 30s
2026-08-20 22:58:24 +03:00
Kirill d9a2679af4 Replace pressed burger button image and update resource path in world.tscn 2026-08-20 22:54:42 +03:00
Kirill 4f57c37572 Update version to 0.6.25 and increment version code to 141; replace burger button image
Android / android (push) Successful in 30s
2026-08-20 22:45:22 +03:00