How bitsbytoader/tudorcraft works
Main Components Overview
a) Core Components:
• Engine System
• Rendering System
• Networking System
• UI System
• Protocol Implementation
Detailed Component Breakdown
A. Engine System (Blue components):
• Core Engine (/Engine/Engine.hpp)
• Physics System (/Engine/Physics/)
• Collidable
• PhysicsConformable
• World Management (/Engine/World/)
• World
• Chunk
• BlockState
• Entity System (/Engine/Mobs/)
• Entity
• EntityComponent
• MobEntity
B. Rendering System (Green components):
• Metal Renderer (/Renderer/)
• Renderer class
• Shaders
• TextureAtlas
• Asset Management (/Assets.xcassets/)
C. Networking System (Purple components):
• TCP Implementation (/Networking/)
• TCPClient
• TCPStream
• Minecraft Protocol (/Minecraft Protocol/)
• Packet System
• NBT Implementation
• Protocol Types (VarInt, UUID)
D. UI System (Orange components):
• SwiftUI Views (/UI/)
• MainScreenView
• GameView
• ConnectionView
• GameHudView
• IPC Communication (NotificationCenter)
Connection Flow Representation
UI Layer → Engine → Networking → Minecraft Server
↑ ↓
UI ← Renderer ← Engine ← Protocol Handler
Specific Design Elements
Crucial interactions:
• IPC communication between Swift UI and C++ engine
• Metal rendering pipeline flow
• Entity component system relationships
• Network protocol packet flow
• Physics system interaction with world and entities
Technical Details
Annotations for:
• Metal-cpp integration points
• Smart pointer usage (both Apple's MRC and std::shared_ptr)
• Thread management for networking and UI
• Memory management strategies
• Platform-specific considerations (iOS/macOS)
Implementation Notes
Notes regarding:
• Multiplatform support requirements
• Metal API integration points
• SwiftUI and C++ bridging
• Protocol compatibility requirements
• Memory management strategies
Key Considerations:
• Separation between the C++ game engine and Swift UI
• Metal rendering pipeline
• Clear boundaries between networking, game logic, and presentation
• Cross-platform considerations
• Important synchronization points
This will provide a clear understanding of how TudorCraft's components interact while maintaining the game's performance and multiplatform capabilities.