Stardust Gambit is a C++/Qt desktop auto-battler. It combines a lightweight PvE round loop, shop economy, hero traits, star upgrades, equipment drops, save files, and snapshot-based LAN/remote battles in a single Qt Widgets application.
- 8 x 8 tactical board with drag-and-drop deployment.
- Automatic combat with target selection, movement, attacks, mana, and hero skills.
- Shop system with refresh, gold economy, population upgrades, win/loss streaks, and interest rewards.
- Hero collection with 10 units, 5 traits, and automatic 3-to-1 star upgrades.
- Equipment drops with drag-to-equip, unequip, and sell interactions.
- Three JSON save slots for stable prep/resolve game states.
- Full-screen image-based UI with menu music and volume settings.
- LAN battles over
QTcpServer/QTcpSocket. - Remote room matching through the Python relay in
server/remote_relay.py.
- C++17
- Qt 5 or Qt 6
- Qt Widgets
- Qt Network
- Qt Multimedia
- CMake 3.16+
- Open
CMakeLists.txtin Qt Creator. - Select a kit that includes Qt Widgets, Network, and Multimedia.
- Configure, build, and run the
Stardust_Gambittarget.
If Qt is already discoverable by CMake:
cmake -S . -B build
cmake --build buildIf CMake cannot find Qt, pass your Qt installation path:
cmake -S . -B build -DCMAKE_PREFIX_PATH=C:/Qt/6.10.2/msvc2022_64
cmake --build buildOn Windows, use Qt's windeployqt when distributing the executable to machines
without a matching Qt installation.
The game loads images from image/ and menu music from music/. Keep these
directories next to the project root, next to the executable, or in a parent
directory that the executable can reach at runtime.
- Start a new game from the main menu.
- Buy heroes from the shop during the preparation phase.
- Drag heroes from the bench onto the lower half of the board.
- Press
Spaceor click the battle button to start combat. - Win rounds to earn gold, advance through encounters, and collect equipment.
- Survive the five-round PvE run to win.
Useful controls:
S: save during non-combat phases.Esc: return from menus or the end screen.- Right click a friendly unit: sell it during preparation.
Ctrl+ right click, orUwhile hovering a unit: unequip its item.- Drag equipment onto a friendly unit: equip it.
Stardust Gambit uses round snapshots instead of frame-by-frame real-time synchronization. Each player prepares an army, both sides exchange ready snapshots, and the clients play out the resulting battle locally.
- Both players run the same version of the game on the same LAN.
- One player chooses LAN host.
- The other player joins with the host machine's IPv4 address.
- Both players prepare their armies and start the round.
LAN mode uses port 45454.
The relay server is in server/remote_relay.py.
python server/remote_relay.py --host 0.0.0.0 --port 45455Clients connect to a relay, join the same room id, then exchange battle
snapshots through the server. The current client code points to
67.216.192.97:45455; change RemoteRelayHost and RemoteRelayPort in
mainwindow.cpp if you want to use your own relay.
Stardust_Gambit/
CMakeLists.txt CMake project definition
main.cpp Qt application entry point
mainwindow.h/.cpp UI, game loop, input, saves, networking
unit.h/.cpp Unit base class, heroes, skills, traits
player.h/.cpp Player health, gold, level, streak economy
equipment.h/.cpp Equipment model and catalog
tile.h/.cpp Board tile model
image/ Runtime UI and hero image assets
music/ Runtime audio assets
server/remote_relay.py Remote battle relay server
server/stardust-relay.service
Example systemd service for the relay
- Save files are written as
save_slot_1.json,save_slot_2.json, andsave_slot_3.jsonin the application directory. - Combat saves are intentionally disabled so save files only contain stable game states.
- The remote battle mode is authoritative at the room/result level, not a deterministic lockstep PvP simulation.
No license file has been added yet. Until a license is provided, all rights are reserved by the repository owner.
