Welcome to Text-Engine โ an ambitious project to create a powerful and flexible game engine for building Text User Interface (TUI) games. The engine is designed with a modular architecture, combining the performance of Rust with the simplicity of Python for game scripting.
- Rust Core: The engine's core is built in Rust, ensuring high performance, memory safety, and reliability. This solid foundation handles all the heavy lifting โ from rendering to event management.
- Python Scripting: Game logic is written in Python, offering a simple and intuitive development experience. We've created a custom Rust-based library that bridges the gap between the Rust core and your Python code.
- TUI-Focused: Our primary goal is to provide a first-class experience for creating TUI games. We're building a rich set of tools and components specifically designed for text-based interfaces.
eguiInterface: The engine uses the powerful and easy-to-useeguilibrary for its own interface, providing a modern environment for managing projects and debugging.- Flexible Mod System: At the heart of our design is an incredibly flexible mod system, allowing developers to easily extend the engine's functionality.
- โ
Mod Loader (
mod_system/loader.rs) โ automatic loading of mods from themods/directory - โ
Dependency System (
mod_system/dependencies.rs) โ resolution and validation of mod dependencies - โ
Mod Manifests (
mod_system/manifest.rs) โ mod configuration via TOML files
- โ
Mod API (
python_bridge/api.rs) โ Python API for engine interaction - โ Function Registration โ system for registering Python functions callable from Rust
- โ Tab and Menu System โ create UI elements from Python code
- โ
Console Output โ
print_to_console()function for debugging
- โ
Main Application Window (
app/app.rs) - โ Tab System โ support for multiple tabs with dropdown menus
- โ Output Console โ built-in console for logs
- โณ Text Editor (in development)
- Rust 2024 edition (or newer)
- Python 3.x
- Cargo
# Clone the repository
git clone https://github.com/yourusername/TextEngien-Rust.git
cd TextEngien-Rust/text_engine
# Build and run the project
cargo runTextEngien-Rust/
โโโ text_engine/ # Main Rust project
โ โโโ src/
โ โ โโโ main.rs # Application entry point
โ โ โโโ mod_system/ # Mod loading system
โ โ โ โโโ loader.rs # Mod loader
โ โ โ โโโ dependencies.rs # Dependency resolution
โ โ โ โโโ manifest.rs # Manifest parsing
โ โ โโโ python_bridge/ # Python integration
โ โ โ โโโ api.rs # Python API
โ โ โ โโโ execution.rs # Python code execution
โ โ โ โโโ registry.rs # Function registry
โ โ โโโ app/ # Application and UI
โ โ โ โโโ app.rs # Main application
โ โ โ โโโ state.rs # Application state
โ โ โโโ ui/ # UI components
โ โโโ mods/ # Mods directory
โ โ โโโ Core/ # Base mod
โ โ โโโ manifest.toml # Mod configuration
โ โ โโโ main.py # Mod code in Python
โ โโโ Cargo.toml # Project dependencies
Each mod consists of:
- manifest.toml โ configuration file
- main.py โ main Python script
[mod_info]
id = "my_mod"
name = "My Awesome Mod"
version = "0.1.0"
authors = ["Your Name"]
main = "main.py"
load_order = 100
[dependencies]
# id = "version"
# core = "0.1.0"import text_engien
def my_function():
text_engien.print_to_console("Hello from my mod!")
def run():
# Register functions
text_engien.register_function("my_func", my_function)
# Create a tab
text_engien.register_tab("my_tab", "My Tab", "๐ฎ")
# Add dropdown menu
text_engien.add_dropdown_menu("my_tab", "Actions", "โก")
# Add menu items
text_engien.add_menu_item("my_tab", "Actions", "Do Something", "my_func", "โจ")print_to_console(message)โ print message to consoleregister_function(name, func)โ register Python functionregister_tab(id, title, icon)โ create new tabadd_dropdown_menu(tab_id, name, icon)โ add dropdown menuadd_menu_item(tab_id, menu, label, function, icon)โ add menu item
- Rust โ systems programming
- PyO3 โ Python โ Rust integration
- egui โ graphical interface
- eframe โ application framework
- Legion โ Entity Component System (ECS)
- TOML โ configuration files
- Serde โ serialization/deserialization
- Basic mod loading system
- Dependency resolution between mods
- Python API for creating UI elements
- Tab and menu system
- Output console
- Core mod with usage examples
- Text/code editor
- Save/load system
- Advanced UI components
- API documentation
- Plugin system
- Full-featured TUI rendering system
- Event system
- Audio subsystem
- Networking capabilities
- Export to executable files
You've made it this far, which means you see the potential of this project. But let's be honest โ right now, it's still very raw. There's a mountain of work to be done, and I can't do it alone.
If you have any experience with Rust, Python, game development, or just a passion for TUI games โ I personally ask you to consider helping. Whether it's writing code, fixing bugs, improving documentation, or just sharing ideas โ every bit of help makes a world of difference.
This project is a labor of love, and with your support, we can turn this dream into reality. Please, help me make this engine something special.
- โญ Star the project on GitHub
- ๐ Report bugs via Issues
- ๐ก Suggest new features
- ๐ง Submit Pull Requests
- ๐ Improve documentation
- ๐ฎ Create mods and share them
This project is in active development. License information will be added later.
Thank you for your time and attention. I hope to see you in the list of contributors! โค๏ธ