# AeThex Engine Documentation

Welcome to AeThex Engine - the cloud-first game engine that makes multiplayer, cloud saves, and AI features trivial.

---

## 🚀 Quick Links

- **[Getting Started](GETTING_STARTED.md)** - Install and create your first game
- **[First Game Tutorial](tutorials/FIRST_GAME_TUTORIAL.md)** - Build multiplayer Pong in 30 minutes
- **[API Reference](API_REFERENCE.md)** - Complete API documentation
- **[Migration Guide](MIGRATION_FROM_GODOT.md)** - Coming from other engines?

---

## 📚 Documentation Structure

### For Beginners

1. **[Getting Started](GETTING_STARTED.md)**
   - Installation
   - Your first project
   - IDE overview
   - Basic concepts

2. **[GDScript Basics](GDSCRIPT_BASICS.md)**
   - Syntax fundamentals
   - Variables and functions
   - Signals and events
   - Common patterns

3. **[First Game Tutorial](tutorials/FIRST_GAME_TUTORIAL.md)** ⭐
   - Build multiplayer Pong
   - Learn cloud saves
   - Understand AeThex features
   - 30 minutes to completion

### For Developers

4. **[API Reference](API_REFERENCE.md)**
   - `AeThexCloud` - Cloud connectivity
   - `AeThexAuth` - User authentication
   - `AeThexSaves` - Cloud save system
   - `AeThexMultiplayer` - Multiplayer backend
   - `AeThexAnalytics` - Event tracking
   - `AeThexAI` - AI assistant
   - Complete method documentation
   - Code examples for every feature

5. **[Tutorial Series](tutorials/README.md)**
   - Multiplayer Pong ✅
   - Single-player platformer *(coming soon)*
   - Co-op dungeon crawler *(coming soon)*
   - AI integration *(coming soon)*
   - 13 tutorials planned

### For Architects

6. **[Architecture Overview](ARCHITECTURE_OVERVIEW.md)**
   - System architecture
   - Engine modules
   - Studio IDE components
   - Cloud services
   - Communication protocols
   - Data flow diagrams

7. **[Cloud Services Architecture](CLOUD_SERVICES_ARCHITECTURE.md)**
   - Microservices design
   - API specifications
   - WebSocket protocol
   - Data formats
   - Database schema
   - Performance optimization

### For Migration

8. **[Migration from Godot](MIGRATION_FROM_GODOT.md)**
   - Compatibility guarantees
   - What's different
   - Migration steps
   - API mapping
   - Troubleshooting
   - Case studies

### Advanced Topics

9. **[Studio Integration](STUDIO_INTEGRATION.md)**
   - Studio IDE features
   - Live reload
   - Collaboration tools
   - Remote debugging

10. **[Building from Source](BUILDING_WINDOWS.md)**
    - Build requirements
    - Compilation steps
    - Platform-specific notes
    - Custom builds

---

## 📖 By Topic

### Cloud Features

- **Authentication:**
  - [API Reference - AeThexAuth](API_REFERENCE.md#aethexauth)
  - Email/password login
  - OAuth providers
  - Guest accounts
  - User profiles

- **Cloud Saves:**
  - [API Reference - AeThexSaves](API_REFERENCE.md#aethexsaves)
  - Save/load system
  - Auto-sync
  - Conflict resolution
  - Cross-device play

- **Multiplayer:**
  - [API Reference - AeThexMultiplayer](API_REFERENCE.md#aethexmultiplayer)
  - [Multiplayer Pong Tutorial](tutorials/FIRST_GAME_TUTORIAL.md)
  - 3-line setup
  - Room codes
  - Matchmaking
  - State sync

- **Analytics:**
  - [API Reference - AeThexAnalytics](API_REFERENCE.md#aethexanalytics)
  - Event tracking
  - User properties
  - Funnels
  - Crash reporting

- **AI Integration:**
  - [API Reference - AeThexAI](API_REFERENCE.md#aethexai)
  - In-game assistant
  - Code generation
  - Context-aware help

### Game Development

**→ [Complete Game Development Guide](GAME_DEVELOPMENT.md)**

Learn all core engine concepts:

- **[Scene System](GAME_DEVELOPMENT.md#scene-system)** - Building blocks of your game
- **[Node Hierarchy](GAME_DEVELOPMENT.md#node-hierarchy)** - Organizing game objects
- **[Signals & Callbacks](GAME_DEVELOPMENT.md#signals-and-callbacks)** - Event-driven programming
- **[Physics System](GAME_DEVELOPMENT.md#physics)** - 2D/3D physics, collisions, layers
- **[UI System](GAME_DEVELOPMENT.md#ui-system)** - Control nodes, layouts, themes
- **[Audio System](GAME_DEVELOPMENT.md#audio-system)** - Music, sound effects, 3D audio
- **[Workflow & Tools](GAME_DEVELOPMENT.md#workflow--tools)** - Studio IDE, version control

### Platform Export

**→ [Complete Export Guide](EXPORTING_GAMES.md)**

Export to all platforms:

- **[Windows Export](EXPORTING_GAMES.md#windows-export)** - Desktop Windows builds, code signing, distribution
- **[Linux Export](EXPORTING_GAMES.md#linux-export)** - Linux builds, AppImage, Flatpak, Snap
- **[macOS Export](EXPORTING_GAMES.md#macos-export)** - macOS builds, notarization, App Store
- **[Web Export](EXPORTING_GAMES.md#web-html5-export)** - HTML5/WebAssembly, PWA, hosting
- **[Android Export](EXPORTING_GAMES.md#android-export)** - APK/AAB builds, Play Store, optimization

---

## 🎯 Quick Reference

### Common Tasks

**Start a new project:**
```bash
aethex --editor --path ./my-project
```

**Connect to cloud:**
```gdscript
func _ready():
    await AeThexCloud.connect_to_cloud()
```

**Add authentication:**
```gdscript
var result = await AeThexAuth.login_email("user@example.com", "password")
```

**Save to cloud:**
```gdscript
await AeThexSaves.save_game("slot1", save_data)
```

**Create multiplayer room:**
```gdscript
AeThexMultiplayer.create_room("room-123")
```

**Track analytics event:**
```gdscript
AeThexAnalytics.track_event("level_complete", {"level": 5})
```

**Ask AI for help:**
```gdscript
var answer = await AeThexAI.ask_assistant("How do I add jumping?")
```

### Keyboard Shortcuts

**Editor:**
- `F5` - Run project
- `F6` - Run current scene
- `F7` - Test single scene
- `F8` - Debug mode
- `Ctrl+S` - Save scene
- `Ctrl+Shift+S` - Save all

**Studio IDE:**
- `Ctrl+B` - Build project
- `Ctrl+Shift+B` - Build and run
- `F12` - Open debugger
- `Ctrl+P` - Quick open file

### API Quick Reference

See [API Reference](API_REFERENCE.md) for complete documentation.

**AeThexCloud:**
- `connect_to_cloud()` - Connect to services
- `is_connected()` - Check connection
- `disconnect()` - Disconnect

**AeThexAuth:**
- `login_email(email, password)` - Email login
- `login_oauth(provider)` - OAuth login
- `login_as_guest()` - Guest login
- `logout()` - Logout
- `is_logged_in()` - Check auth status

**AeThexSaves:**
- `save_game(slot, data)` - Save to cloud
- `load_game(slot)` - Load from cloud
- `delete_save(slot)` - Delete save
- `list_saves()` - Get all saves

**AeThexMultiplayer:**
- `create_room(code)` - Create room
- `join_room(code)` - Join room
- `leave_room()` - Leave room
- `get_players()` - List players
- `call_rpc(method, args)` - Call RPC

---

## 🔗 External Resources

### Official

- **Website:** [https://aethex.io](https://aethex.io)
- **Download:** [https://aethex.io/download](https://aethex.io/download)
- **GitHub:** [https://github.com/aethex/engine](https://github.com/aethex/engine)
- **Asset Store:** [https://aethex.io/assets](https://aethex.io/assets)

### Community

- **Discord:** [https://discord.gg/aethex](https://discord.gg/aethex)
- **Forum:** [https://forum.aethex.io](https://forum.aethex.io)
- **Reddit:** [https://reddit.com/r/aethex](https://reddit.com/r/aethex)
- **Twitter:** [@AeThexEngine](https://twitter.com/AeThexEngine)

### Learning

- **YouTube:** [AeThex Tutorials](https://youtube.com/@aethex)
- **Blog:** [https://aethex.io/blog](https://aethex.io/blog)
- **Examples:** [https://github.com/aethex/examples](https://github.com/aethex/examples)

### Support

- **Documentation:** You're here!
- **FAQ:** [https://aethex.io/faq](https://aethex.io/faq)
- **Email:** [support@aethex.io](mailto:support@aethex.io)
- **Pro Support:** [https://aethex.io/pro](https://aethex.io/pro)

---

## 📝 Contributing

Want to improve the docs?

1. **Report issues:** [GitHub Issues](https://github.com/aethex/engine/issues)
2. **Suggest improvements:** [Discussions](https://github.com/aethex/engine/discussions)
3. **Submit PRs:** See [Contributing Guide](../engine/CONTRIBUTING.md)

**Documentation guidelines:**
- Clear, concise language
- Code examples for every feature
- Step-by-step tutorials
- Screenshots when helpful
- Test all code samples

---

## 🗺️ Roadmap

### Documentation Priorities

**Completed ✅:**
- Getting Started guide
- GDScript basics
- Complete API reference
- First game tutorial (Multiplayer Pong)
- Architecture overview
- Cloud services documentation
- Migration guide

**In Progress 🔄:**
- Additional tutorials (12 more planned)
- Video tutorials
- Interactive examples

**Planned 📅:**
- Advanced topics guide
- Performance optimization guide
- Best practices & patterns
- Troubleshooting guide
- Localization guide
- Plugin development guide

---

## 📊 Documentation Stats

- **Pages:** 8 major documents
- **Tutorials:** 1 complete, 12 planned
- **API Methods:** 67+ documented
- **Code Examples:** 100+
- **Last Updated:** 2024

---

## 🆘 Need Help?

**Can't find what you're looking for?**

1. **Search:** Use Ctrl+F in this index or search GitHub
2. **Ask Community:** Discord is very active
3. **Check Examples:** [GitHub examples repo](https://github.com/aethex/examples)
4. **Contact Support:** [support@aethex.io](mailto:support@aethex.io)

**Found a bug in documentation?**
- Report on [GitHub Issues](https://github.com/aethex/engine/issues)
- Include: Page name, section, what's wrong, suggested fix

---

## 🎓 Learning Paths

### Path 1: Complete Beginner

1. Read [Getting Started](GETTING_STARTED.md) (15 min)
2. Skim [GDScript Basics](GDSCRIPT_BASICS.md) (10 min)
3. Follow [First Game Tutorial](tutorials/FIRST_GAME_TUTORIAL.md) (30 min)
4. Build your own game!
5. Reference [API Documentation](API_REFERENCE.md) as needed

**Total time:** ~1 hour to working game

### Path 2: Experienced Developer

1. Review [API Reference](API_REFERENCE.md) (15 min)
2. Skim [Architecture Overview](ARCHITECTURE_OVERVIEW.md) (15 min)
3. Build tutorial project (30 min)
4. Start your own game!

**Total time:** ~1 hour to production-ready knowledge

### Path 3: Team/Enterprise

1. Review [Architecture Overview](ARCHITECTURE_OVERVIEW.md) (30 min)
2. Read [Cloud Services Architecture](CLOUD_SERVICES_ARCHITECTURE.md) (30 min)
3. Study [Studio Integration](STUDIO_INTEGRATION.md) (20 min)
4. Plan deployment strategy (varies)
5. Contact [sales@aethex.io](mailto:sales@aethex.io) for enterprise support

**Total time:** ~2 hours + implementation

---

## ⭐ Featured Content

### Must-Read Documents

1. **[First Game Tutorial](tutorials/FIRST_GAME_TUTORIAL.md)** - Start here if new
2. **[API Reference](API_REFERENCE.md)** - Reference for all features
3. **[Migration Guide](MIGRATION_FROM_GODOT.md)** - If coming from Godot

### Most Popular Topics

- Setting up multiplayer (3 lines of code!)
- Cloud save implementation
- Authentication best practices
- Exporting to all platforms

---

**Ready to build amazing games?** Start with [Getting Started](GETTING_STARTED.md) or jump into the [First Game Tutorial](tutorials/FIRST_GAME_TUTORIAL.md)!

Happy building! 🚀
