How yan-yu-lin/ai_npc works
Project type and purpose
• The “worlds” directory full of JSON files holds game data (maps, items, saves, interactions).
File structure
Top-level:
• main.py – entry point, wires together subsystems
• backend.py – core game logic (state management, rules, interactions)
• pygame_display.py – rendering engine using pygame
• pygame_map_selection.py – UI for choosing or browsing maps
• demo.py – scripted demo or example run of the game
• fonts/ – font assets for rendering text
• worlds/ – game data (JSON definitions for maps, items, saves)
• requirements.txt, pyrightconfig.json – project configuration
Observations:
• MVC-like separation: backend (Model), pygame_display + pygame_map_selection (View + Controller)
• Data persistence via JSON files under worlds/
• No web server, purely local application
README for additional insights
– README is empty; rely solely on file structure and naming conventions.