{"id":31630783,"url":"https://github.com/aegis-dev/obsidon","last_synced_at":"2026-02-14T20:05:28.857Z","repository":{"id":316918435,"uuid":"1047133165","full_name":"aegis-dev/obsidon","owner":"aegis-dev","description":"A lightweight 2D game engine written in Odin with WebGPU rendering backend.","archived":false,"fork":false,"pushed_at":"2025-10-03T12:28:27.000Z","size":6708,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T22:04:20.374Z","etag":null,"topics":["2d","2d-game-engine","lightweight","odin","pixel-perfect"],"latest_commit_sha":null,"homepage":"","language":"Odin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aegis-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T19:47:51.000Z","updated_at":"2025-10-03T12:28:31.000Z","dependencies_parsed_at":"2025-09-27T16:20:02.579Z","dependency_job_id":"0d29264a-7ca7-419f-a3a8-b3b27822e452","html_url":"https://github.com/aegis-dev/obsidon","commit_stats":null,"previous_names":["aegis-dev/obsidon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aegis-dev/obsidon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegis-dev%2Fobsidon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegis-dev%2Fobsidon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegis-dev%2Fobsidon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegis-dev%2Fobsidon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aegis-dev","download_url":"https://codeload.github.com/aegis-dev/obsidon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegis-dev%2Fobsidon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29454780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","2d-game-engine","lightweight","odin","pixel-perfect"],"created_at":"2025-10-06T22:02:08.183Z","updated_at":"2026-02-14T20:05:28.852Z","avatar_url":"https://github.com/aegis-dev.png","language":"Odin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Obsidon\n\nA lightweight 2D game engine written in [Odin](https://odin-lang.org/) with WebGPU rendering backend.\n\n## Features\n\n- **Modern Rendering**: WebGPU-based renderer with sprite batching\n- **Pixel Perfect Graphics**: Support for custom resolution rendering buffers (e.g., 128x128, 320x240) that scale to any window size\n- **Scene System**: Flexible scene management with lifecycle callbacks\n- **Input Handling**: Keyboard and mouse input support\n- **Audio System**: Sound loading and playback capabilities\n- **Text Rendering**: Font loading and text drawing with custom colors\n- **Mathematics**: Built-in 2D vector math utilities\n- **Camera System**: 2D camera with position tracking\n- **Cross-Platform**: Works on Windows, macOS, and Linux\n\n## Core Modules\n\n- **Sprite**: 2D sprite loading, drawing, and management\n- **Audio**: Sound loading and playback system\n- **Input**: Keyboard and mouse input handling\n- **Text/Font**: Font loading and text rendering\n- **Camera**: 2D camera system\n- **Scene**: Scene lifecycle management\n- **Vec**: 2D vector mathematics utilities\n\n## Extensions\n\nObsidon includes optional extension modules in `obsidon/extensions/` that provide additional functionality:\n\n- **Transform**: Object transformation system for position, rotation, and scale management\n- **Transform Animations**: Animation system for smooth interpolation between transform states\n\nExtensions are designed to be lightweight and modular - use only what you need for your project.\n\n## Philosophy\n\nObsidon follows a **\"less is more\"** philosophy:\n\n- **Constraints breed creativity** - By providing focused, well-defined tools rather than endless options\n- **Simplicity over completeness** - We prioritize ease of use and clarity over covering every possible use case\n- **Intentional limitations** - Not trying to be a one-size-fits-all engine; instead focusing on 2D games and pixel art\n- **Minimal but powerful** - Providing the essential building blocks that let you create without getting in your way\n\nIf you need features beyond Obsidon's scope, you're encouraged to extend it yourself or use a different tool. This keeps the core clean and focused.\n\n## Prerequisites\n\n- **Odin SDK**: Install the [Odin programming language](https://odin-lang.org/) and add to PATH\n- **Python 3.x**: For build scripts and tooling\n- **Visual Studio Code** (recommended): \n  - C/C++ Extension Pack (for debugging support)\n  - Odin Language Extension\n\n## Quick Start\n\n### 1. Add Repository as a Submodule\n```bash\ngit submodule add https://github.com/aegis-dev/obsidon.git\n```\n\n### 2. Create Your Own Project\n\nCreate a basic main file:\n\n```odin\npackage main\n\nimport \"base:runtime\"\nimport \"core:log\"\nimport obsidon \"path/to/obsidon\"\n\n// Type aliases for convenience\nVec2 :: obsidon.Vec2\nScene :: obsidon.Scene\nSprite :: obsidon.Sprite\n\nGameScene :: struct {\n    using scene: Scene,\n    player_sprite: Sprite,\n    player_pos: Vec2,\n}\n\nscene_create :: proc(s: ^Scene) {\n    scene := cast(^GameScene)s\n    \n    // Set background color\n    obsidon.set_clear_color(0.2, 0.3, 0.4, 1.0)\n    \n    // Load sprites (embed asset at compile time)\n    player_png: []u8 = #load(\"assets/player.png\")\n    scene.player_sprite = obsidon.sprite_load(player_png)\n    scene.player_pos = Vec2{0, 0}\n}\n\nscene_update :: proc(s: ^Scene) -\u003e ^Scene {\n    scene := cast(^GameScene)s\n    dt := obsidon.get_delta_time()\n    \n    // Handle input\n    if obsidon.is_key_down(.KEY_W) do scene.player_pos.y += 100 * dt\n    if obsidon.is_key_down(.KEY_S) do scene.player_pos.y -= 100 * dt\n    if obsidon.is_key_down(.KEY_A) do scene.player_pos.x -= 100 * dt\n    if obsidon.is_key_down(.KEY_D) do scene.player_pos.x += 100 * dt\n    \n    if obsidon.is_key_pressed(.KEY_ESCAPE) do obsidon.quit_game()\n    \n    // Return a pointer to scene if you want to change the scene.\n    // Current scene will be freed.\n    return nil\n}\n\nscene_draw :: proc(s: ^Scene) {\n    scene := cast(^GameScene)s\n    \n    // Draw player sprite\n    origin := Vec2{f32(scene.player_sprite.width)/2, f32(scene.player_sprite.height)/2}\n    obsidon.sprite_draw(\u0026scene.player_sprite, scene.player_pos, origin, 0.0, false, 1.0)\n}\n\nscene_destroy :: proc(s: ^Scene) {\n    scene := cast(^GameScene)s\n    obsidon.sprite_destroy(\u0026scene.player_sprite)\n}\n\ncreate_game_scene :: proc() -\u003e ^Scene {\n    scene := new(GameScene)\n    scene.on_create = scene_create\n    scene.on_update = scene_update  \n    scene.on_draw = scene_draw\n    scene.on_destroy = scene_destroy\n    return scene\n}\n\nmain :: proc() {\n    context = runtime.default_context()\n    context.logger = log.create_console_logger()\n    \n    scene := create_game_scene()\n    obsidon.run_game(\"My Game\", 800, 600, scene)\n}\n```\n\n### 3. Build and Run\n```bash\n# Build the example\npython obsidon/build.py --source-dir .example/ --output-dir bin\n\n# Run the example (Windows)\n./bin/example.exe\n\n# Run the example (Linux/macOS)\n./bin/example\n```\n\n## Building\n\n**Note**: The included `build.py` script is **completely optional** and provided purely for convenience. You can use any build pipeline that suits your needs - Make, CMake, shell scripts, or even direct `odin build` commands.\n\n### Using the Convenience Script\n\n#### Development Build\n```bash\npython build.py --debug --source-dir your_project --output-dir bin\n```\n\n#### Release Build  \n```bash\npython build.py --source-dir your_project --output-dir bin\n```\n\n#### Build Options\n- `--debug`: Include debug information\n- `--source-dir`: Directory containing your Odin source files\n- `--output-dir`: Directory for built executable\n\n### Manual Building\n\nYou can also build directly with Odin:\n\n```bash\n# Debug build\nodin build your_project -out:bin/your_game.exe -debug\n\n# Release build  \nodin build your_project -out:bin/your_game.exe -opt:3\n\n# With custom flags\nodin build your_project -out:bin/your_game.exe -opt:3 -no-bounds-check\n```\n\n## Project Structure suggestion\n\n```\nyour_project/\n├── main.odin           # Entry point\n├── assets/            # Game assets (images, sounds, fonts)\n├── obsidon/           # Obsidon engine (as submodule or copy)\n└── bin/               # Built executables\n```\n\n## Examples\n\nCheck the `example/` directory for a complete working example that demonstrates:\n- Sprite loading and rendering\n- Input handling (WASD movement, spacebar interaction)\n- Text rendering with custom fonts\n- Sound playback\n- Scene management\n\n## Contributing\n\n### For New Features\nBefore implementing new features, **please create a GitHub Discussion** to ensure your contribution aligns with Obsidon's philosophy of simplicity and focused scope. We want to make sure any additions fit within our \"less is more\" approach.\n\n1. Create a GitHub Discussion describing your proposed feature\n2. Wait for maintainer feedback and approval\n3. Fork the repository\n4. Create a feature branch\n5. Implement the approved feature\n6. Submit a pull request referencing the discussion\n\n### For Bug Fixes and Small Improvements\nNo prior discussion needed - feel free to directly:\n\n1. Fork the repository\n2. Create a branch for your fix\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request with a clear description\n\nWe appreciate all contributions that help make Obsidon better while staying true to its core philosophy!\n\n## License\n\nLicensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.\n\n## Requirements\n\n- **Odin**: Latest stable version\n- **WebGPU**: Provided through Odin's vendor libraries\n- **Platform**: Windows 10+, macOS 10.15+, or Linux with Vulkan/OpenGL support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegis-dev%2Fobsidon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faegis-dev%2Fobsidon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegis-dev%2Fobsidon/lists"}