$ cat docs/guides/development-workflow.md
# daily development cycle
Typical Development Session
- Build scripts and engine:
bash
cmake --build build --config Debug- Run:
bash
.\build\bin\Debug\OpenEngine.exe- Edit C# scripts in
Assets/โ hot-reload detects changes automatically - For C++ changes, rebuild and re-run:
bash
cmake --build build --config Debug
.\build\bin\Debug\OpenEngine.exeHot-Reloading Workflow
- Run the engine
- Keep it running
- Edit C# scripts in
Assets/ - Save the file
- Watch console for change detection messages
- Changes reflect immediately
tip
File detection is sub-millisecond. The engine detects saves via platform-native file watchers.
Adding New Assets
- Add files to
Assets/ - Run the engine โ assets are discovered automatically
- Check console for asset registration messages
- Use assets in C# scripts via
NativeInterop.LoadAsset()
Example Games
The Examples/ directory contains ready-to-run games:
| Game | Type | Features |
|---|---|---|
| Space Shooter | Action/Arcade | Player movement, enemy spawning, collision, scoring |
| Platformer | Platform | Physics, gravity, jumping, collectibles |
| RPG | Role-Playing | Stats, inventory, quests, turn-based combat |
| Game Demo | All-in-one | Switches between all games every 30s |
To run an example:
bash
copy Examples\SpaceShooter\SpaceShooter.cs Assets\Scripts\
cmake --build build --config Debug
.\build\bin\Debug\OpenEngine.exeTroubleshooting
Build Issues
| Error | Fix |
|---|---|
Could not find .NET hosting library | Install .NET 9.0 SDK, restart terminal |
MSBuild Error: Project file not found | Ensure you're in a configured build directory |
C# compilation failed | Check dotnet --version โ needs 9.0 |
Runtime Issues
| Error | Fix |
|---|---|
CoreCLR initialization failed | Build C++ project first to trigger ScriptAssemblies pipeline |
Assembly not found | Check build/bin/Debug/ScriptAssemblies/ exists |
No assets found | Ensure Assets/ directory exists with files |
Performance Issues
| Symptom | Check |
|---|---|
| Low frame rate | Debug vs Release build, CPU usage, console errors |
| File changes not detected | File watcher initialization messages, correct directory path |
Next Steps
- Explore the Build System
- Learn about C# Scripting