Compare commits

..

10 commits

Author SHA1 Message Date
1a6b71fd03
render: sectioned new HUD layout with portrait; polish action log panel
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8a46ddecadd45712c9bef32d061783896a6a6964
2026-04-08 15:38:22 +03:00
ea8306060b
render: revert redundant ternary expression
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ica6dc2015e573cc71b1882e69fef351e6a6a6964
2026-04-08 15:38:21 +03:00
22a2da75a9
render: implement dynamic box sizing & line count calculation in render_message
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibb30f7ff6fbff55f253397619e2208c76a6a6964
2026-04-08 15:38:20 +03:00
4f0a85df19
build: 'lock' zig build setup
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5a09be217458921978d2a8f69ef72ee86a6a6964
2026-04-08 15:38:19 +03:00
436083f606
render: replace game over screen with end screen; show stats breakdown
The game over logic is now consolidated as there are two possible
scenarios: victory or death. The end-screen rendering has thus been
consolidated to display victory (gold YOU ESCAPED) or death (red GAME OVER)
with a stats box. 

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iecf71ecde4097a41bd074f9123c8c4c76a6a6964
2026-04-08 15:38:18 +03:00
19a9da4aee
stats: track all gameplay statistics during player actions
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie94380572d2256dda45ce7bfcf347c7f6a6a6964
2026-04-08 15:38:17 +03:00
e048e02475
stats: add stat tracking fields to GameState
We can now track kills, items, damage dealt/taken, crits, times hit,
potions used, floors reached, and final score in `GameState` for
end-game display. This is rather basic for now, but I intend to extend
the tracked statistics as we introduce more mechanics. 

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4dcd3e1effd0209268dc56fe4bba4b696a6a6964
2026-04-08 15:38:16 +03:00
0b4f14c73c
build: also link raylib for libcombat
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I337a654ffc0dbfab19bdbe68ba9bd9026a6a6964
2026-04-08 15:38:15 +03:00
24bb2696e4
nix: add a package alias 'rogged' in flake outputs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2a526b49d0c8b43b529d760a340d8af56a6a6964
2026-04-08 15:34:20 +03:00
172ff53561
nix: apply a source filter to the main package
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id6933272a05f17c70fe91719dbd3ac9c6a6a6964
2026-04-08 15:34:19 +03:00
2 changed files with 22 additions and 24 deletions

View file

@ -1,13 +1,18 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
outputs = {nixpkgs, ...}: let
outputs = {
self,
nixpkgs,
...
}: let
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages;
in {
packages = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/package.nix {};
rogged = pkgsForEach.${system}.callPackage ./nix/package.nix {};
default = self.packages.${system}.rogged;
});
devShells = forEachSystem (system: {

View file

@ -5,14 +5,23 @@
raylib,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation {
pname = "rogged";
version = "0.0.1";
src = builtins.path {
path = ../.;
name = finalAttrs.pname;
};
src = let
fs = lib.fileset;
s = ../.;
in
fs.toSource {
root = s;
fileset = fs.unions [
(s + /assets)
(s + /libs)
(s + /src)
(s + /build.zig)
];
};
nativeBuildInputs = [
zig
@ -21,25 +30,9 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [raylib];
dontConfigure = true;
buildPhase = ''
runHook preBuild
export ZIG_GLOBAL_CACHE_DIR="$TMPDIR/zig-cache"
zig build --release=fast
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp zig-out/bin/roguelike $out/bin/
runHook postInstall
'';
meta = {
description = "A turn-based roguelike game";
license = lib.licenses.mit;
mainProgram = "roguelike";
};
})
}