├── .gitignore ├── LICENSE ├── README.md ├── chunk.go ├── collection_iter.go ├── component.go ├── component_collection.go ├── component_getter.go ├── component_meta.go ├── component_meta_test.go ├── component_operate_task.go ├── component_set.go ├── component_set_test.go ├── component_test.go ├── component_utils.go ├── compound.go ├── compound_test.go ├── compound_utils.go ├── concurrent_map.go ├── concurrent_map_test.go ├── direct_api.go ├── entity.go ├── entity_info.go ├── entity_set.go ├── entity_test.go ├── example ├── benchmark-0 │ ├── components.go │ ├── damage_system.go │ ├── game_common.go │ ├── game_ecs.go │ ├── game_normal.go │ ├── go.mod │ ├── main_benchmark_test.go │ ├── main_test.go │ ├── move_system.go │ └── simu_load_system.go └── fake-simple-game-server │ ├── client │ └── fake_client.go │ ├── game │ ├── chat.go │ ├── empty_system.go │ ├── fake_game.go │ ├── move_component.go │ ├── move_system.go │ ├── player_component.go │ ├── position_sync_system.go │ └── session.go │ ├── gm │ └── gm.go │ ├── go.mod │ ├── main.go │ └── network │ └── fake_net.go ├── fixed_string.go ├── fixed_string_test.go ├── fixed_string_utils.go ├── go.mod ├── go.sum ├── goroutine_id.go ├── goroutine_pool.go ├── goroutine_pool_benchmark_test.go ├── internal_type_mock.go ├── logger.go ├── metrics.go ├── optimizer.go ├── optimizer_benchmark_test.go ├── ordered_int_set.go ├── ordered_int_set_test.go ├── res ├── img.png ├── img1.png ├── img2.png ├── img3.png └── img4.png ├── serialize.go ├── shape_getter.go ├── shape_getter_test.go ├── shape_iter.go ├── sparse_array.go ├── system.go ├── system_event.go ├── system_flow.go ├── system_group.go ├── system_group_test.go ├── system_requirement.go ├── unordered_collection.go ├── unordered_collection_test.go ├── unordered_collection_with_id.go ├── unordered_collection_with_id_test.go ├── utility.go ├── utils.go ├── utils_test.go ├── world.go ├── world_async.go ├── world_sync.go └── world_test.go /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/README.md -------------------------------------------------------------------------------- /chunk.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/chunk.go -------------------------------------------------------------------------------- /collection_iter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/collection_iter.go -------------------------------------------------------------------------------- /component.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component.go -------------------------------------------------------------------------------- /component_collection.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_collection.go -------------------------------------------------------------------------------- /component_getter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_getter.go -------------------------------------------------------------------------------- /component_meta.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_meta.go -------------------------------------------------------------------------------- /component_meta_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_meta_test.go -------------------------------------------------------------------------------- /component_operate_task.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_operate_task.go -------------------------------------------------------------------------------- /component_set.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_set.go -------------------------------------------------------------------------------- /component_set_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_set_test.go -------------------------------------------------------------------------------- /component_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_test.go -------------------------------------------------------------------------------- /component_utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/component_utils.go -------------------------------------------------------------------------------- /compound.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/compound.go -------------------------------------------------------------------------------- /compound_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/compound_test.go -------------------------------------------------------------------------------- /compound_utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/compound_utils.go -------------------------------------------------------------------------------- /concurrent_map.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/concurrent_map.go -------------------------------------------------------------------------------- /concurrent_map_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/concurrent_map_test.go -------------------------------------------------------------------------------- /direct_api.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/direct_api.go -------------------------------------------------------------------------------- /entity.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/entity.go -------------------------------------------------------------------------------- /entity_info.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/entity_info.go -------------------------------------------------------------------------------- /entity_set.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/entity_set.go -------------------------------------------------------------------------------- /entity_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/entity_test.go -------------------------------------------------------------------------------- /example/benchmark-0/components.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/components.go -------------------------------------------------------------------------------- /example/benchmark-0/damage_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/damage_system.go -------------------------------------------------------------------------------- /example/benchmark-0/game_common.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/game_common.go -------------------------------------------------------------------------------- /example/benchmark-0/game_ecs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/game_ecs.go -------------------------------------------------------------------------------- /example/benchmark-0/game_normal.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/game_normal.go -------------------------------------------------------------------------------- /example/benchmark-0/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/go.mod -------------------------------------------------------------------------------- /example/benchmark-0/main_benchmark_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/main_benchmark_test.go -------------------------------------------------------------------------------- /example/benchmark-0/main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/main_test.go -------------------------------------------------------------------------------- /example/benchmark-0/move_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/move_system.go -------------------------------------------------------------------------------- /example/benchmark-0/simu_load_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/benchmark-0/simu_load_system.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/client/fake_client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/client/fake_client.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/chat.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/chat.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/empty_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/empty_system.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/fake_game.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/fake_game.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/move_component.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/move_component.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/move_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/move_system.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/player_component.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/player_component.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/position_sync_system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/position_sync_system.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/game/session.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/game/session.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/gm/gm.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/gm/gm.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/go.mod -------------------------------------------------------------------------------- /example/fake-simple-game-server/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/main.go -------------------------------------------------------------------------------- /example/fake-simple-game-server/network/fake_net.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/example/fake-simple-game-server/network/fake_net.go -------------------------------------------------------------------------------- /fixed_string.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/fixed_string.go -------------------------------------------------------------------------------- /fixed_string_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/fixed_string_test.go -------------------------------------------------------------------------------- /fixed_string_utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/fixed_string_utils.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/zllangct/ecs 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /goroutine_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/goroutine_id.go -------------------------------------------------------------------------------- /goroutine_pool.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/goroutine_pool.go -------------------------------------------------------------------------------- /goroutine_pool_benchmark_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/goroutine_pool_benchmark_test.go -------------------------------------------------------------------------------- /internal_type_mock.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/internal_type_mock.go -------------------------------------------------------------------------------- /logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/logger.go -------------------------------------------------------------------------------- /metrics.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/metrics.go -------------------------------------------------------------------------------- /optimizer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/optimizer.go -------------------------------------------------------------------------------- /optimizer_benchmark_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/optimizer_benchmark_test.go -------------------------------------------------------------------------------- /ordered_int_set.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/ordered_int_set.go -------------------------------------------------------------------------------- /ordered_int_set_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/ordered_int_set_test.go -------------------------------------------------------------------------------- /res/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/res/img.png -------------------------------------------------------------------------------- /res/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/res/img1.png -------------------------------------------------------------------------------- /res/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/res/img2.png -------------------------------------------------------------------------------- /res/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/res/img3.png -------------------------------------------------------------------------------- /res/img4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/res/img4.png -------------------------------------------------------------------------------- /serialize.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/serialize.go -------------------------------------------------------------------------------- /shape_getter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/shape_getter.go -------------------------------------------------------------------------------- /shape_getter_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/shape_getter_test.go -------------------------------------------------------------------------------- /shape_iter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/shape_iter.go -------------------------------------------------------------------------------- /sparse_array.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/sparse_array.go -------------------------------------------------------------------------------- /system.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system.go -------------------------------------------------------------------------------- /system_event.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system_event.go -------------------------------------------------------------------------------- /system_flow.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system_flow.go -------------------------------------------------------------------------------- /system_group.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system_group.go -------------------------------------------------------------------------------- /system_group_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system_group_test.go -------------------------------------------------------------------------------- /system_requirement.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/system_requirement.go -------------------------------------------------------------------------------- /unordered_collection.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/unordered_collection.go -------------------------------------------------------------------------------- /unordered_collection_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/unordered_collection_test.go -------------------------------------------------------------------------------- /unordered_collection_with_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/unordered_collection_with_id.go -------------------------------------------------------------------------------- /unordered_collection_with_id_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/unordered_collection_with_id_test.go -------------------------------------------------------------------------------- /utility.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/utility.go -------------------------------------------------------------------------------- /utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/utils.go -------------------------------------------------------------------------------- /utils_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/utils_test.go -------------------------------------------------------------------------------- /world.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/world.go -------------------------------------------------------------------------------- /world_async.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/world_async.go -------------------------------------------------------------------------------- /world_sync.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/world_sync.go -------------------------------------------------------------------------------- /world_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zllangct/ecs/HEAD/world_test.go --------------------------------------------------------------------------------