Screencast.From.2024-11-26.10-19-15.webm
A Zelda-inspired action-adventure game built with the Odin programming language and Raylib. This project was created as part of a game jam to explore game development with Odin.
- Top-down action-adventure gameplay
- State-based screen management (Title, Game, Pause, Game Over)
- Save/Load game functionality
- Built-in level editor
- Player animation system
- Enemy AI and pathfinding
- Collision detection system
- Install the Odin compiler
- Ensure you have the required assets in the
assets
directory
odin build . -file=main.odin
./zelda_clone
- WASD: Move player/Navigate menus
- Enter: Select menu option
- Escape: Pause game
- F2: Toggle level editor
- F3: Toggle camera zoom (1.0x/4.0x) while in edit mode
The game includes a built-in level editor accessible by pressing F2. Editor features include:
- Grid-based placement system
- Entity placement with left-click
- Entity deletion with right-click
- Adjustable placement size with mouse wheel
- Auto-save functionality
- Level loading from JSON
- scroll wheel will increase or decrease entity size
main.odin
: Entry point and game loopgame_screen.odin
: Main game state and update logiclevel_editor.odin
: Level editor implementationscreen_manager.odin
: Screen state managementtitle_screen.odin
: Title screen implementation
The game implements a save system that stores:
- Player position and health
- Current level
- Enemy positions
- Level layout
Save files are stored in JSON format as save_game.json
.
Place the following assets in the assets
directory:
Player/Player.png
: Player sprite sheetlevel_1.png
: Background for the first level
- Enemy types can be extended in the enemy animation system
- New levels can be added to the
Levels
enum ingame_screen.odin
- Additional screen types can be added to
Screen_Type
enum inscreen_manager.odin
When compiled in debug mode (ODIN_DEBUG
), the game includes memory tracking to help identify memory leaks and incorrect frees.
- Its not done, I ran out of time. some of the colisions are a bit buggy as well
- game ui loads in top right corner, would be an easy fix to just make it relative to the screen
- its not really a real game
- level loading, so the player could exit the first map and go to a second one
- new mechanic, like a grappling hook
- NPC's to talk to
- a boss to fight
- Raylib community
- Odin programming language team