Skip to content

v-craft/vc-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoidCraft-Core

VoidCraft is an experimental game engine, drawing design inspiration from Bevy.

As the core component, this project primarily includes the following modules:

  • [vc_utils] : Platform-agnostic container extensions

    • Examples include hash functions and related containers, block linked lists, circular arrays, and stack-optimized dynamic arrays.
  • [vc_os] : Cross-platform abstraction layer for host-side programs

    • Provides specific std implementations for no_std and wasm environments.
    • Examples include synchronization primitives like Mutex and RwLock, offering fallback implementations based on atomic variables and spin operations.
    • Multi-threading and file system abstractions are not yet implemented. The current workaround is to restrict no_std environments to single-threaded operation.
  • [vc_reflect] : Dynamic reflection system

    • Implemented via compile-time AST modification, generating code through simple metadata annotations. Main features include:
      1. Runtime Type Information (RTTI), such as type names and IDs, generic information, and custom attributes (similar to attributes in C#).
      1. Type erasure, allowing different types to be stored as identical dynamic objects, supporting dynamic content manipulation.
      1. Global registry containing type information for all reflected objects, supporting interface (method) reflection and automatic type registration.
      1. Serialization and deserialization, enabling data serialization/deserialization based on reflection information without implementing serde.
      1. Path access, allowing multi-level field access via strings.
  • [vc_task] : Task system (multi-threading and concurrency system)

    • Provides a task pool (thread pool) for managing thread resources.
    • Offers multiple async executors that work with the task pool to automatically handle asynchronous tasks and achieve multi-threaded load balancing.
    • Provides a parallel task interface that splits continuous tasks into chunks for parallel execution via the task pool.
  • [vc_ecs] : Entity-Component-System

    • ECS for game engines, a data-oriented programming design pattern.
    • In progress.

VoidCraft introduces many modifications and optimizations compared to Bevy, such as:

  • Merging PartialReflect and Reflect in the reflection system.
  • Implementing a custom async executor in the task system instead of relying on async_executor.
  • Providing more fallback implementations in the cross-platform module and offering additional utilities in the utility module.

The project also includes numerous structural adjustments, code refinements, and documentation improvements. Some of these changes have been upstreamed to the Bevy engine, though larger-scale modifications could not be merged.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages