Skip to content

Repository files navigation

Wnv-CPP

Συνοπτικη περιγραφη / Overview

GR: Ενα απλο turn-based παιχνιδι σε grid με Avatar, Vampires και Werewolves. Το παιχνιδι εκτελειται σε terminal και καθε γυρο το ταμπλο ενημερωνεται. Οι κανονες και η ζητουμενη λειτουργικοτητα περιγραφονται αναλυτικα στο PDF/ALLinONE.pdf.

EN: A simple turn-based grid game with an Avatar, Vampires, and Werewolves. The game runs in the terminal and the board updates each turn. Rules and requirements are described in PDF/ALLinONE.pdf.

GUI preview

Ομαδα / Team

Gameplay (συμφωνα με τον κωδικα) / Gameplay (based on code)

  • Ο παικτης ελεγχει το Avatar (H) και επιλεγει συμμαχια: Vampires (V) ή Werewolves (W).
  • EN: The player controls the Avatar (H) and chooses an alliance: Vampires (V) or Werewolves (W).
  • Κινήσεις του Avatar: w/a/s/d.
  • EN: Avatar moves with w/a/s/d.
  • Η τεχνητη κινηση των V/W γινεται τυχαια σε ελευθερες γειτονικες θεσεις.
  • EN: V/W move randomly to free adjacent tiles.
  • Γινεται ελεγχος μαχης σε γειτονικα κελια (πάνω/κατω/αριστερα/δεξια).
  • EN: Combat checks occur in adjacent tiles (up/down/left/right).
  • Αν ο αντιπαλος ειναι ισχυροτερος, το entity προσπαθει να απομακρυνθει. Αν δεν υπαρχει ελευθερη θεση, δεχεται επιθεση.
  • EN: If the opponent is stronger, the entity tries to flee; if no free tile exists, it takes damage.
  • Τα healing potions (+) συλλεγονται απο το Avatar. Heal επιτρεπεται μονο στην αντιστοιχη χρονικη φαση.
  • EN: Healing potions (+) are collected by the Avatar. Healing is allowed only in the correct time phase.

Χρονικες φασεις / Day-Night cycle

  • SUN: 2 γυροι (EN: 2 turns)
  • MOON: 2 γυροι (EN: 2 turns) GR: Ο κυκλος επαναλαμβανεται. EN: The cycle repeats.

Controls

  • w/a/s/d : κινηση / move
  • h : heal (αν επιτρεπεται) / heal (if allowed)
  • p : τερματισμος παιχνιδιου (με επιβεβαιωση) / quit (with confirmation)
  • ? : εμφανιση βοηθειας / show help

Συμβολα χαρτη / Map symbols

  • H: Avatar
  • V: Vampire
  • W: Werewolf
  • T: Tree
  • ~: Water
  • +: Potion
  • .: Empty

Δομη κωδικα / Code structure

  • main.cpp: εισοδος χρηστη και εκκινηση παιχνιδιου / user input and game start
  • sdl_main.cpp: GUI εκδοση με SDL2 / GUI version with SDL2
  • map.h: map rendering, game loop, movement, combat, healing
  • characters.h: Avatar, Vampires, Werewolves, stats
  • Entities.h: βασικη κλαση για entities και Hpack / base class for entities and Hpack
  • Terrain.h: terrain entities (T, ~)
  • map.cpp: minimal (header include)

Build & Run

Dependencies (Windows / MSYS2 UCRT64)

GR: Εγκατασταση απαιτουμενων βιβλιοθηκων: EN: Install required libraries:

C:\msys64\usr\bin\pacman.exe -S mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_ttf

Windows (g++)

g++ -o wnv main.cpp
wnv.exe

Linux/macOS (g++)

g++ -o wnv main.cpp
./wnv

GUI (SDL2)

g++ sdl_main.cpp -o wnv_gui -IC:\msys64\ucrt64\include\SDL2 -LC:\msys64\ucrt64\lib -lSDL2_ttf -lSDL2 -mconsole -Wl,-subsystem,console
wnv_gui.exe

GR: Αν το GUI αποτυχει λογω DLLs, αντιγραψτε τα διπλα στο exe: EN: If the GUI fails with missing DLLs, copy these next to the exe:

copy C:\msys64\ucrt64\bin\SDL2.dll .
copy C:\msys64\ucrt64\bin\SDL2_ttf.dll .

GR: Αν θελετε custom grid size: EN: If you want a custom grid size:

wnv_gui.exe 12 12

GR: Αν θελετε επιλογη συμμαχιας (V ή W): EN: If you want to choose alliance (V or W):

wnv_gui.exe 12 12 V

Σημειωσεις / Notes

  • GR: Οι διαστασεις του χαρτη ζητουνται στην αρχη.
  • EN: Map dimensions are requested at startup.
  • GR: Η ευθυγραμμιση του grid εξαρταται απο το μεγεθος της κονσολας.
  • EN: Grid alignment depends on console size.
  • GR: Για το SDL2 build απαιτειται εγκατεστημενο SDL2.
  • EN: SDL2 must be installed to build the GUI.
  • GR: Για το GUI απαιτειται και SDL2_ttf (για κειμενο/βοηθεια).
  • EN: SDL2_ttf is required for text/help in the GUI.
  • GR: Στο GUI: F1/Tab εμφανιζει/κρυβει βοηθεια.
  • EN: In the GUI: F1/Tab toggles the help overlay.
  • GR: Για πληρεις απαιτησεις/προδιαγραφες, δειτε το PDF/ALLinONE.pdf.
  • EN: For full requirements/specs, see PDF/ALLinONE.pdf.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages