Compare commits

..

8 commits

Author SHA1 Message Date
4663367673
render: sectioned new HUD layout with portrait; polish action log panel
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8a46ddecadd45712c9bef32d061783896a6a6964
2026-04-08 14:35:56 +03:00
6ea1e084db
render: revert redundant ternary expression
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ica6dc2015e573cc71b1882e69fef351e6a6a6964
2026-04-08 12:04:52 +03:00
1f53d1d40f
render: implement dynamic box sizing & line count calculation in render_message
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibb30f7ff6fbff55f253397619e2208c76a6a6964
2026-04-08 12:04:51 +03:00
70d92f8b3e
build: 'lock' zig build setup
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5a09be217458921978d2a8f69ef72ee86a6a6964
2026-04-08 11:12:39 +03:00
f26f730770
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 10:29:21 +03:00
1d5688526f
stats: track all gameplay statistics during player actions
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie94380572d2256dda45ce7bfcf347c7f6a6a6964
2026-04-08 10:29:20 +03:00
b749511b7b
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 10:29:19 +03:00
ed482e49cc
build: also link raylib for libcombat
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I337a654ffc0dbfab19bdbe68ba9bd9026a6a6964
2026-04-08 10:29:02 +03:00
2 changed files with 24 additions and 22 deletions

View file

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

View file

@ -5,23 +5,14 @@
raylib, raylib,
pkg-config, pkg-config,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation (finalAttrs: {
pname = "rogged"; pname = "rogged";
version = "0.0.1"; version = "0.0.1";
src = let src = builtins.path {
fs = lib.fileset; path = ../.;
s = ../.; name = finalAttrs.pname;
in };
fs.toSource {
root = s;
fileset = fs.unions [
(s + /assets)
(s + /libs)
(s + /src)
(s + /build.zig)
];
};
nativeBuildInputs = [ nativeBuildInputs = [
zig zig
@ -30,9 +21,25 @@ stdenv.mkDerivation {
buildInputs = [raylib]; 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 = { meta = {
description = "A turn-based roguelike game"; description = "A turn-based roguelike game";
license = lib.licenses.mit; license = lib.licenses.mit;
mainProgram = "roguelike"; mainProgram = "roguelike";
}; };
} })