packages/library/odinsweeper
o

odinsweeper

v86271aalibrary

No description provided.

0 stars0 forksUnknownupdated 5 hours ago
Open repo

Minebreacher

Initial Odin scaffold for a Minesweeper-style project using SDL3 for the window/render loop and a vendored odin-imgui dependency for shell UI.

Current layout

  • src/main.odin: bootstrap entry point
  • src/app.odin: app state, screen flow, SDL3 init/shutdown, event handling
  • src/render.odin: SDL3 background rendering and board placeholder rendering
  • src/ui.odin: odin-imgui integration for start, pause, settings, and the in-game HUD
  • vendor/odin-imgui: vendored Dear ImGui Odin bindings plus SDL3 backends
  • scripts/build_imgui.sh: rebuild helper for the vendored odin-imgui static library

Controls in the scaffold

  • Mouse-driven ImGui menus for start, pause, and settings
  • One-click preset starts for Beginner, Intermediate, and Expert
  • Enter or Space: start/resume quick path
  • S: open settings from start/pause screens
  • P or Esc: pause/resume while playing
  • Left click in-game: reveal a cell
  • Left click a revealed number: reveal surrounding cells when adjacent flags match
  • Right click in-game: place or remove a flag
  • Esc: quit from the start screen or back out of settings

The title bar still mirrors the current screen and board setup, but the menu flow now comes from odin-imgui windows instead of placeholder SDL panels. The core Minesweeper loop is now wired in: boards generate on a new run, the first reveal is always safe, empty cells flood open, flags can be toggled, and win/loss states are surfaced in the HUD and overlay windows.

Board settings now persist locally in .minebreacher/settings.txt, so the last chosen size and mine count are restored on the next run.

Clear times now track per board configuration. The active run timer appears in the HUD, and the best clear time for each difficulty is stored locally alongside the saved settings.

Settings changed during a run are now treated as the next board configuration. The current board keeps its original dimensions and mine count until you explicitly start the pending setup.

Vendored UI dependency

The project vendors Capati/odin-imgui under vendor/odin-imgui and currently builds the sdl3 + sdlrenderer3 backends.

If you need to rebuild the static library:

./scripts/build_imgui.sh

Running

odin run src

Current status

  • Preset quick-start flow from the title screen
  • Persistent custom settings and per-layout best times
  • Safe next-board settings flow during active or completed runs
  • Richer SDL board rendering with clearer cell glyphs and reveal flash feedback
Package Info
Version
v86271aa
License
Unknown
Author
@danmartinsa
Type
library
Forks
0
Created
5 hours ago
Updated
5 hours ago
Health
maintained
has releases
has readme
has license
Activity
last 56 weeks