Pyrite

Explanation:

  • Engine Initialization and Settings
    • Prerequisites
    • Python Dependencies
    • Installation Steps
    • Configuration
    • Running the Engine
    • Building the Engine
    • Documentation Building
    • Troubleshooting
    • Development Workflow
    • Performance Tuning
    • Next Steps
  • Application Entry and Core Loop
    • Engine Initialization
    • State Management
    • World Generation and Sessions
    • The Main Loop
    • Application Control
    • Detailed Initialization Sequence
    • Detailed State Machine
    • The Main Game Loop
    • Detailed Event Handling
    • Detailed Update Step (In-Game)
    • Detailed Render Step
    • Scene Rendering Pipeline
    • World Session Initialization (LOADING state)
    • Shutdown and Cleanup
    • Next Steps
  • World Architecture and Multithreading
    • Architecture Overview
    • The Main Loop & Asynchronous Processing
    • The Queue System
    • SQLite Write-Ahead Logging (WAL)
    • Memory Management (1D vs 3D Arrays)
    • Next Steps
  • Persistence Systems and SQLite Storage
    • Overview
    • Database Schema
    • Serialization and Compression
    • Database Operations
    • Asynchronous I/O and Threading
    • World Management (File System)
    • WAL Mode Benefits
    • Next Steps
  • Terrain Systems and Procedural Generation
    • Architecture Overview
    • Noise Foundation (Deterministic Generation)
    • Biome Selection Algorithm
    • Height Generation Algorithm
    • Cave Carving Algorithm (3D)
    • Tree Placement and Structure
    • Next Steps
  • Lighting Systems and BFS Propagation
    • Overview
    • Lightmap Data Structure
    • Sunlight Propagation Algorithm
    • BFS Light Propagation
    • Blocklight (Torch) Propagation
    • Chunk Boundary Stitching
    • Integration with Rendering
    • Next Steps
  • Meshing Systems and Greedy Geometry
    • Overview
    • Mesh Classes Hierarchy
    • Vertex Packing: 32-Bit Format
    • Greedy Meshing Algorithm
    • Vertex Light Smoothing
    • Ambient Occlusion (AO) Calculation
    • Flip Detection (Diagonal Flip for Lighting)
    • Water Faces Handling
    • Mesh Building Pipeline (CPU to GPU)
    • Data Flow Example
    • Next Steps
  • Rendering Pipeline and Camera
    • Greedy Meshing
    • Vectorized Frustum Culling
    • Hardware Occlusion Queries
    • Multi-Pass Transparency
    • Texture Atlases
    • Ambient Occlusion
    • Render Flow Summary
    • Next Steps
  • Shader Systems and GLSL Breakdown
    • Shader Architecture Overview
    • Chunk Shader (Main Terrain Rendering)
    • Item Shader (Dropped Items)
    • Sky Shader (Procedural Atmosphere)
    • Clouds Shader (Procedural)
    • UI Block Shader (Inventory Icons)
    • UI Color Shader (Backgrounds, UI Quads)
    • Uniform Management
    • Texture Atlas Binding
    • Debugging Tips
    • Next Steps
  • Player Systems and Physics Controller
    • Player Class Hierarchy
    • Coordinate System
    • Controls and Input Handling
    • Physics: Gravity and Velocity
    • AABB Collision Detection
    • Water Physics
    • Survival Stats Management
    • Inventory Management
    • Mining and Placing
    • View Bobbing and Hand Animation
    • Dynamic FOV During Sprint
    • Integration with Game Loop
    • Next Steps
  • Survival Mechanics and Statistics
    • Player Physics & AABB Collisions
    • Inventory & Crafting
    • Tool Dependencies & Mining Hardness
    • 3D Item Entities
    • Next Steps
  • UI Systems and 2D Overlays
    • UI Architecture Overview
    • Core UI Component Base Class
    • In-Game HUD Components
    • Menu System
    • Layout Metrics (Slot Grid)
    • Button and Component Library
    • Transition Animations
    • Integration with Main Loop
    • Next Steps
  • Audio Systems and Spatial Mixing
    • Overview
    • Primary implementation
    • Key concepts
    • File formats & recommendations
    • How to add new sounds
    • Spatialization & volume
    • Next Steps
  • Asset Systems and Texture Atlases
    • Folder layout
    • Primary tooling
    • Texture conventions
    • Models
    • Icons & UI images
    • Adding or updating assets
    • Versioning and artist workflow
    • Next Steps
  • Telemetry Systems and Profiling Breakdown
    • Architecture Overview
    • Lock-Free Buffering (Thread Safety)
    • API Wrappers & Integration
    • Aggregation and Reporting
    • Next Steps
  • Testing Framework and CI/CD
    • Quickstart
    • Useful options
    • Continuous integration
    • Notes
    • Next Steps
  • Deployment and Build Guides
    • PyInstaller Setup
    • Automated CI/CD Pipeline
    • Version Management
    • Next Steps

API Reference:

  • API Reference
    • camera
      • Camera
        • Camera.update()
        • Camera.update_view_matrix()
        • Camera.update_vectors()
        • Camera.rotate_pitch()
        • Camera.rotate_yaw()
        • Camera.move_left()
        • Camera.move_right()
        • Camera.move_up()
        • Camera.move_down()
        • Camera.move_forward()
        • Camera.move_back()
    • frustum
      • Frustum
        • Frustum.update_factors()
        • Frustum.is_on_frustum()
      • frustum_cull_fast()
    • lighting
      • get_voxel_fast()
      • get_light_fast()
      • set_light_fast()
      • propagate_light_queue()
      • init_chunk_lighting()
      • stitch_chunk_lighting()
      • remove_light_node()
      • update_light_place_block()
      • update_light_remove_block()
      • place_torch()
    • main
      • Pyrite
        • Pyrite.load_config()
        • Pyrite.save_config()
        • Pyrite.on_init()
        • Pyrite.init_game_session()
        • Pyrite.render_loading_screen()
        • Pyrite.update()
        • Pyrite.render()
        • Pyrite.handle_events()
        • Pyrite.quit_game()
        • Pyrite.run()
    • meshes
      • base_mesh
        • BaseMesh
      • chunk_mesh
        • ChunkMesh
      • chunk_mesh_builder
        • get_ao()
        • get_vertex_light()
        • pack_data()
        • get_chunk_index()
        • get_neighbor_voxel_id()
        • get_neighbor_light()
        • is_transparent()
        • is_void()
        • add_data()
        • build_chunk_mesh()
      • cloud_mesh
        • CloudMesh
      • cube_mesh
        • CubeMesh
      • item_mesh
        • ItemMesh
      • obj_mesh
        • ObjMesh
    • noise
      • set_seed()
      • noise2()
      • noise3()
    • player
      • Player
        • Player.find_spawn_position()
        • Player.update()
        • Player.handle_event()
        • Player.mouse_control()
        • Player.handle_interaction()
        • Player.keyboard_control()
        • Player.apply_gravity()
        • Player.move_and_collide()
        • Player.resolve_axis()
        • Player.get_aabb()
        • Player.aabb_intersect()
        • Player.add_item()
        • Player.take_damage()
        • Player.respawn()
    • profiler
      • ThreadSampleBuffer
        • ThreadSampleBuffer.record()
      • Profiler
        • Profiler.start_frame()
        • Profiler.end_frame()
        • Profiler.record()
        • Profiler.measure()
        • Profiler.profile_func()
        • Profiler.save_report()
    • scene
      • Scene
        • Scene.update()
        • Scene.render()
    • settings
      • get_path()
    • shader_program
      • ShaderProgram
        • ShaderProgram.set_uniforms_on_init()
        • ShaderProgram.update()
        • ShaderProgram.get_program()
    • sounds
      • Sounds
        • Sounds.set_sfx_volume()
        • Sounds.play_walk()
        • Sounds.play_break()
        • Sounds.play_place()
        • Sounds.play_jump()
        • Sounds.play_breaking()
        • Sounds.play_place_block()
    • terrain_gen
      • random()
      • get_biome()
      • get_height()
      • get_index()
      • set_voxel_column()
      • place_tree()
      • fill_initial_sunlight()
    • textures
      • Textures
        • Textures.load()
    • ui
      • components
        • get_shared_resource()
        • UINode
        • VBox
        • Button
        • WorldButton
        • TextInput
        • Slider
        • Toggle
      • hud
        • Crosshair
        • Hotbar
        • HeldBlock
        • InventoryUI
        • DebugOverlay
      • menus
        • MainMenu
        • PauseMenu
        • OptionsMenu
      • meshes
        • CrosshairMesh
        • BlockIconMesh
        • UIColorMesh
        • UITextMesh
      • text
        • TextRenderer
    • voxel_handler
      • VoxelHandler
        • VoxelHandler.add_voxel()
        • VoxelHandler.rebuild_adjacent_chunks()
        • VoxelHandler.remove_voxel()
        • VoxelHandler.set_voxel()
        • VoxelHandler.update()
        • VoxelHandler.ray_cast()
        • VoxelHandler.get_voxel_id()
    • world
      • World
        • World.update()
        • World.process_mesh_queue()
        • World.process_load_queue()
        • World.stream_chunks()
        • World.load_chunk()
        • World.save_chunk_to_db()
        • World.unload_chunk()
        • World.render()
        • World.render_water()
        • World.save()
    • world_objects
      • chunk
        • Chunk
      • clouds
        • Clouds
      • item
        • Item
        • ItemManager
      • sky
        • SkyMesh
        • Sky
      • voxel_marker
        • VoxelMarker
Pyrite
  • Search


© Copyright 2026, ShivamKR12.

Built with Sphinx using a theme provided by Read the Docs.