ysn-rfd/text-dataset-tiny-code-script-py-format
USED of tahamajs/medicine_ds_persian for .parquet file USED of Alijafarixcs2/persian-it-llama2-2k for .parquet file USED of Abirate/english_quotes for .jsonl file NEW FILES (05/12/2025) NEW FILES (12/26/2025) NEW FILES (02/15/2026)
31.6k
1# DCE2 3# ๐น๏ธ Dungeon-Crawler-Engine4 5Modular dungeon crawler simulation for **AI-driven gameplay**, **pathfinding experiments**, and **cryptographic save testing**. 6**Under development** by **YSNRFD**7 8---9 10## ๐ง DCE_ysnrfd โ Procedural Dungeon Crawler Engine with AI & Secure Save System11 12[](https://www.python.org/)13[]()14[]()15 16---17 18## ๐ Overview19 20**DCE_ysnrfd** is an extensible, modular dungeon crawler simulation built in pure Python. 21It includes a secure save/load system using cryptographic HMACs, procedurally generated dungeons, an intelligent A\* enemy AI, and a structured turn-based system. 22Perfect for prototyping **game mechanics**, **AI behavior**, and **simulation loops**.23 24This project is for **educational purposes**, AI/ML pathfinding demos, and ethical development only.25 26---27 28## โจ Features29 30- ๐งฑ **Procedural Dungeon Generation** 31 Uses recursive division with controlled randomness to generate interconnected dungeon layouts.32 33- ๐ง **A\* Pathfinding** 34 Enemies use a priority queue with Manhattan heuristics for navigation and targeting.35 36- โ๏ธ **Component-Based Entity System** 37 Players, enemies, and items are all modeled with clean, modular class structures.38 39- ๐ **Cryptographic Save/Load** 40 Uses HMAC-SHA256 to verify save integrity. Saves are rejected if tampered.41 42- โฑ๏ธ **Turn-Based State Machine** 43 Robust finite state system for clean transitions (menu โ gameplay โ endgame).44 45- ๐ง **Inventory & Items System** 46 Supports armor, weapons, potions, and quest items with metadata and effects.47 48- ๐ **Type-Hinted & Extensible** 49 Fully annotated for IDE support and future expansion.50 51- ๐ **Verbose Logging System** 52 Game states and events are logged to `dungeon_crawler.log`.53 54---55 56## ๐ฆ Installation57 58**1. Clone the repository**59 60```bash61git clone https://github.com/ysnrfd/DCE.git62cd DCE-main63```64 65**2. Run the program**66 67Linux:68```python69python3 dungeon_crawler.py70```71Windows:72```python73python dungeon_crawler.py74```75 76 77 78 79## ๐ง Usage Examples80 81**Run the main game loop**82```python83python dungeon_crawler.py84```85 86**Use the map generation module alone**87 88```python89from dungeon_crawler import DungeonGenerator90map_data = DungeonGenerator(width=40, height=20).generate()91print(map_data)92```93 94**Save and verify game state**95 96```python97from dungeon_crawler import SaveSystem, GameState98 99state = GameState(...)100SaveSystem.save(state, "game_state.encrypted")101verified = SaveSystem.load("game_state.encrypted")102```103 104 105## ๐ Project Structure106```structure107dungeon-crawler-engine/108โโโ dungeon_crawler.py # Main game engine109โโโ #dungeon_crawler.log # Log output110โโโ #game_state.encrypted # Cryptographically signed game save111โโโ README.md 112โโโ LICENSE113```114 115 116## ๐ Save System Details117- **Based on HMAC-SHA256 with secret key** 118 119- **Includes timestamp and anti-replay protection** 120 121- **Invalid or tampered saves are automatically discarded** 122 123 124## ๐ง Algorithms & Internals125- **Pathfinding: A with open/closed sets, priority queues (heapq)** 126 127- **Dungeon Generation: Recursive division + random room linking** 128 129- **State Machine: Enum-based game states and transitions** 130 131- **Secure Save: JSON serialization + hmac + secrets**132 133 134## ๐ฃ๏ธ Roadmap135**โ
Cryptographic save/load system** 136 137**โ
Procedural generation engine** 138 139**โ
A pathfinding and enemy AI** 140 141**๐ฒ GUI version with Pygame or Pyxel** 142 143**๐ฒ Quest/dialogue system** 144 145**๐ฒ Plugin API for modding** 146 147**๐ฒ Fog of war and minimap** 148 149 150 151## โ ๏ธ Ethical Usage Notice152This engine is intended for learning, game prototyping, and academic experiments only. 153You are not permitted to use this code in unethical simulations or closed-source game repackaging without preserving attribution.154 155## ๐ License156This project is licensed under the **YSNRFD License.** 157You are free to fork and build upon it with proper credit and within ethical guidelines. 158Redistribution without credit is strictly forbidden. 159 160## ๐จโ๐ป Author161**Developer: YSNRFD** 162**Telegram: @ysnrfd**163 164## โญ Support This Project165**If you enjoyed this project or learned something useful, please star it on GitHub and share it with others!**166 