Mr. Phil Games’ Blog

Posts for Tag: Stellar Throne

Smarter UI, Safer Fleets, and Combat Sanity

Today's work focused on cleaning up gameplay feedbackfixing persistent combat edge cases, and polishing core user experience elements across research, construction, and fleet management. These improvements bring Stellar Throne closer to a cohesive playable loop.


🧭 UI & UX Improvements

  • ✅ Persistent Notifications now route correctly to their respective panels (e.g., idle colonies → construction screen).

  • ✅ Top-bar navigation buttons added for: Research, Diplomacy (placeholder), Construction, and Fleet Management.

  • ✅ Research Notification on Load now reflects actual tech status.

  • ✅ Shipyard Bug Fix: Clicking the bottom ship now properly selects it.

  • ✅ Combat Visualization now only shows when the player is involved — no more interruptions for AI-on-AI skirmishes.

  • ✅ Colony Panel Fixes:

    • Newly constructed buildings now appear as expected

    • Available buildings list now displays more options


⚔️ Combat Logic Edge Cases

  • ✅ Ships In Transit Are Now Immune to Combat: This prevents weird logic loops and unresolvable battle triggers.

  • ⚠️ AI vs AI Combat Bug: Battles between non-player factions were pausing the game indefinitely. This has been identified and will be addressed.


🔍 CLAUDE.md Audit (In Progress)

A first pass of the codebase audit has begun. Naming conventions are largely consistent with camelCase, but some file structure and function naming still need cleanup. The audit continues tomorrow.


💡 What I Learned

When a system feels tangled or risky to change, use Git branches more proactively. Branching lets me explore fixes or improvements without endangering working code. It’s a simple tool I need to use more often.

Refactors, Bug Fixes, and Sprite Progress

Today was a productive day of cleanup, visual iteration, and bug hunting during a full game playthrough. A number of major systems were refactored to stay compatible with Claude and GPT tooling, and the visual fidelity of the star map continues to improve.


🧹 Major File Refactors

To avoid hitting the token limits in Claude and GPT, the following massive files were split, modularized, or cleaned up:

  1. fleet_composition_panel.zig – 1,435 lines

  2. game_state.zig – 1,342 lines

  3. ai_controller.zig – 1,192 lines

  4. save_load.zig – 1,070 lines

  5. colony_panel.zig – 1,056 lines

  6. research_panel.zig – 844 lines

  7. combat_visualization_panel.zig – 831 lines

This lays the foundation for better Claude-assisted iteration and long-term maintainability.


🎮 Playtest + Bug Fixes

During today’s live play session, several bugs were diagnosed and resolved:

  • ✅ Fixed missing territory borders after loading a game

  • ✅ Fixed debug fleet combat where no defenders appeared

  • ✅ Fixed combat resolution stalling (ships now take damage again)

Remaining issues include:

  • UI buttons needed for various subsystems (research, shipyard, etc.)

  • Clicking persistent notifications doesn’t always route to the correct panel

  • Loading a save can show incorrect research status notifications

  • Ships in transit still being targeted in combat — may require a ruleset change


🌍 Visuals & Content

  • Continued planet sprite sheet generation (desert, barren, arctic types)

  • Generated a few new star map icons

  • Posted the latest dev newsletter


🧠 What I Noticed

There’s a growing hostility toward AI tools in gamer communities. It’s worth being mindful of how this project is presented publicly. While AI is helping with tooling and content generation, the final design decisions remain very much human-led.

Fog of War, First Playthrough, and Prompt Engineering Wins

Today was a turning point — both in terms of playtesting Stellar Throne for the first time and in figuring out how to better use Claude via prompt engineering.


🌌 What Got Done

  • ✅ Fog of War Visuals Implemented: Added a stylized galaxy image to obscure unexplored areas. Grid tiles now exist in three states:

    • Unexplored: shows the galaxy backdrop only

    • Visible: full data on stars, planets, fleets

    • Explored: shows known bodies but with stale information
      This adds a meaningful layer to exploration and information control.

  • ✅ Planet Sprite Sheet Progress: Continued work on new sprite sheets for gas giantsgarden worlds, and deserts.

  • ✅ Fuel System Re-enabled (Then Rejected): Re-tested the fuel mechanic and found it clunky, overly punishing, and not impactful enough on strategic decision-making. Removed again for now — possibly permanently.

  • ✅ First Full Playthrough:

    • Exploration phase feels good

    • Later game lacks clarity at zoomed-out scale (icons too small, weak star map feel)

    • Economy is unbalanced: too many resources, ships build too fast

    • Research is too slow (possibly because Research Labs are bugged and not completing)

  • ✅ game_screen.zig Refactor: The file had ballooned past the token limit for Claude/GPT. It’s now modularized and more maintainable.


💡 What I Learned

When Claude wasn’t understanding the 3-layer Fog of War system (kept confusing Explored vs Visible), I turned to ChatGPT for help designing a better prompt. That worked instantly. Claude called it a great prompt and immediately executed everything correctly.

Lesson: When I’m stuck with Claude, use ChatGPT as my prompt architect — especially for tricky, layered systems.


🚧 Still Unfinished / Blocked

  • 🔍 Construction System Bug: Buildings may not be finishing or may not be added to colony data. May also relate to notification failures for idle colonies.

  • 🧠 Memory Leaks: Need to audit allocations and lifetimes.


Research Deepens, Energy Burns, and the Galaxy Pushes Back

Today was all about depth and connection — linking research to real gameplay effects, improving feedback systems, and laying down infrastructure for systems that depend on each other.


🔬 What Got Done

  • ✅ Research System Enhancements: Added more technologies, unlock tiers, special projects, and gating for buildings and ship components. Research is now central to player progression.

  • ✅ Energy System: Ships now have power capacity, and weapons consume energy per use. This creates tactical limitations and strategic outfitting tradeoffs.

  • ✅ Building UI Fixes: Squashed bugs related to construction interface logic.

  • ✅ HUD Improvements: Added a clean and functional Next Turn button.

  • ✅ Smart Notifications: Implemented a new system to surface pending actions — like unassigned research, idle shipyards, and colonies needing orders.


🧠 What I Noticed

Generating believable Terran planet sprites remains tough. GPT tools frequently lean on Earth-like continents and familiar geography, even when prompted otherwise. I had to toss a lot of attempts. The mitigation strategy continues to be selective generation, manual filtering, and stitching.


⚠️ Still Unfinished

  • Systems are interdependent and tangled now. Many features can’t be finished in isolation — research depends on diplomacy, AI logic needs construction, and unlocking tech touches everything.


Explosions, Research, and High-Fidelity Sprites

Today’s dev sprint focused on destructive power and high-quality visual polish.


💥 What Got Done

  • ✅ SpriteSheetMaker Upgrade: Implemented the Mitchell filter for high-quality downscaling. This significantly improves crispness and sprite consistency when generating sheets from single images.

  • ✅ Bombardment System: You can now rain destruction from orbit. Basic damage logic is in place, with hooks for visuals and colony impact.

  • ✅ Ground Combat: First pass at a turn-based ground invasion system is working — includes attacker/defender phases and post-battle resolution.

  • ✅ Visual Effects Foundation: Started work on a unified FX system to support combat visuals like explosions, hits, and transitions.

  • ✅ Save/Load System: Added auto-savequick save, and a new save/load UI panel for player access and session persistence.

  • ✅ Research System: Implemented the framework for unlocking technologies — categories, cost progression, and placeholder techs.


🔍 What I Learned

The Mitchell filter made a noticeable visual upgrade for my sprite workflows — definitely worth the integration. It’s now clear that sprite quality from AI tools can be saved with the right post-processing. Also, committing to a unified effects system early means smoother integration later, especially for combat-heavy sequences.


🚧 Still in Progress

  • The Research System is scaffolded but incomplete — needs UI improvements, better tech tree layout, and actual gameplay unlocks.


A Big Systems Push – Colonization, Borders, and Battles

Today was a heavy systems-focused day in Stellar Throne. I made major progress on gameplay infrastructure and galaxy simulation features — pushing forward across colonization, ship systems, economy, and even the early combat layer.


🌌 What Got Done

  • ✅ Colonization System: Colonies can now be established and affect nearby territory.

  • ✅ Improved Territory Borders: Adjacent colonies now merge and fill territory more realistically.

  • ✅ Sensor System Overhaul: Colonies now reveal stars only; planets require ship presence to reveal.

  • ✅ Planet Type Adjustments: Terran and Ocean worlds are less common, Gas Giants more common.

  • ✅ Fleet Management: Added fleet splittingmerging, and renaming features.

  • ✅ Ship Components & Retrofitting: Began component system and retrofitting support.

  • ✅ Terraforming System: Initial hooks implemented.

  • ✅ Building System: Basic framework begun (awaits research unlocks).

  • ✅ Trade System: First pass implemented (currently lacks destinations).

  • ✅ Victory System: Added tracking logic and display UI.

  • ✅ Game Setup Screen: Customize game options before galaxy generation.

  • ✅ Battle System: Implemented with an auto-resolver and simple battle visualization.


🧠 What I Noticed

  • The design philosophy of “build the framework early, even if features are placeholder” really paid off — systems like terraforming, building, and trade are all partially implemented and ready to expand once research and diplomacy come online.

  • Sensors now reveal different information depending on context (colony vs ship), which helps with fog-of-war and strategic decision-making.

  • Sprite generation is still a bottleneck, and I need better upscaling or native-resolution output.


🔧 Still in Progress

  • 🚧 Ship Component Retrofitting – Lacks advanced components beyond starter parts.

  • 🚧 Terraforming System – Blocked until the research system is available.

  • 🚧 Building System – Also waiting on research and unlock logic.

  • 🚧 Trade System – Has no destinations or diplomacy integration; currently functions magically.


Restart, Rebuild, Recalibrate

After discovering that snake_case had been deeply baked into the project from near the start, I made the tough call to restart Stellar Throne from scratch. Enforcing camelCase from the new CLAUDE.md spec led to unintended breakages — especially thanks to batch Python scripts Claude had run, which mangled filenames and import paths.

Instead of trying to untangle it all, I opted for a clean slate. Painful, yes, but with the speed of agentic tools like Claude, I’m confident I’ll catch back up quickly.

On the bright side: the visuals are already looking better.


✅ What Got Done

  • Rebuilt the star map with newly rendered star and planet sprites

  • Implemented fleet movementHUD overlays, and user notifications

  • Built a new app: SpriteSheetMaker to stitch GPT-generated sprites into clean, aligned sprite sheets

  • Recreated sprite sheets for F-type and G-type stars

  • Began implementing ship construction UI and logic


💡 What I Learned

  • Agentic development makes it easy to justify starting over — dangerously easy. Productivity makes code feel disposable, but discipline matters.

  • GPT still struggles with sprite sheet consistency. The centering is unreliable, so I’m generating one-off sprites and stitching them myself.

  • The starting sector often places the player too far from meaningful targets. I may need to guarantee at least 7 stars and 1 colonizable world within reachable range.


🧱 Still in Progress

  • More star and planet sprite rendering

  • Continued work on ship construction systems


Editor Progress & CLAUDE.md Wrangling

Today I made major strides on the new in-game data editor for Stellar Throne. It now displays all JSON config files in a tree view with collapsible branches and supports basic text editing. This should make tuning gameplay values much faster and more accessible going forward.

Meanwhile, I continued working on the CLAUDE.md audit — though it’s turned into more of a rescue operation than a review.

A previous batch of Python-driven refactors (authored by Claude) introduced subtle bugs, most notably mangled import paths due to overzealous snake_case replacements. It looks like some *-based file rewrites accidentally touched filenames that were never meant to change, which has caused some issues across the codebase. Untangling this has required slow, careful manual review.


✅ What’s Working

  • Tree-view editor UI for JSON game configs

  • Collapsible branches, inline editing, working file display

  • Good early traction on making tools for modding & tuning


⚠️ What’s Still In Progress

  • Editor lacks save & backup functionality

  • Needs scroll bar for long file lists

  • CLAUDE.md audit continues to drag on


💡 Takeaway

Letting the AI run unchecked file operations (especially scripted Python refactors) can introduce subtle breakage. The lesson: don’t let your AI coworker manipulate your repo unsupervised, especially across filenames or imports.

👑 Stellar Throne: Building a 4X Strategy Game with AI Coding Tools

What is Stellar Throne?
Stellar Throne is a turn-based 4X strategy game — Explore, Expand, Exploit, Exterminate — where you command fleets, colonize worlds, negotiate peace (or war), and compete for control of the galaxy.


What inspired you to create it?
I've always loved science fiction, but the biggest influence on this project is Master of Orion (1993). It was my first real taste of interstellar conquest — and I’ve been chasing that feeling ever since.


What makes Stellar Throne different?
A few standout features set it apart:

  • Tactical Combat

  • Fuel Logistics Mechanics

  • Giant Star Maps (800+ stars)

  • Deep, Functional Diplomacy

It blends large-scale empire management with focused, tactical engagements — and logistical depth that rewards planning.


What’s your design philosophy?
Gameplay first. Instead of chasing ultra-realistic visuals, I'm designing a clean and readable aesthetic that helps players make smart decisions. Everything on screen should communicate something useful.


What tools are you using?
I’m building Stellar Throne in Zig using SDL2 for rendering. I’m also using LLMs (Claude Code, ChatGPT, Grok) to accelerate development — from code to art generation. This project started as a way to learn Agentic Coding, and it’s been transformative.


What does it look like?
The UI is futuristic but minimal — no clutter, no noise, just clean visuals that support intuitive play. I’m going for a lighter, slightly playful tone. Conquering the galaxy should be fun, not grim.


Who’s it for?
Hardcore strategy gamers of all ages. If you love deep systems, thinking a few moves ahead, and carving your legacy into the stars, you’re in the right place.


What’s been the hardest part so far?
Communicating with LLMs. It’s powerful, but requires precision — especially when describing bugs or edge cases. But once you get the hang of it, it’s like working with a hyper-productive assistant.


What are you most proud of?
The speed and scope of progress thanks to AI-assisted development. I’m tackling complex math, AI systems, and mechanics I’ve never built before — and doing it fast. It really feels like I’m not working alone.


What’s next?
An alpha release is coming soon to my itch.io page. You’ll be able to try the core loop and give feedback directly.


Where can people follow the project?
I'm actively blogging development updates at https://blog.mrphilgames.com — from tech deep-dives to design decisions.


Thanks for reading! If you’re a fan of 4X games or AI-assisted development, I’d love to connect. The stars await.

Exploring Agentic and Vibe Coding: My Early Impressions

Over the past couple months, I’ve been diving into two emerging paradigms in the world of AI-assisted development: Agentic Coding and Vibe Coding. Both offer fascinating, albeit very different, approaches to working with intelligent systems. I wanted to document my early experiences to help clarify what each of these methods offers — and how they’ve influenced the way I build.


🧠 What Is Agentic Coding?

Agentic coding is all about giving AI systems goals rather than tasks. You describe what you want, and the agent figures out how to do it — often breaking it down into subtasks, iterating, and self-correcting as it goes. It’s not just autocomplete on steroids — it’s like having a junior, maybe even senior, engineer who can think, plan, and code on your behalf.


💻 My Experience So Far (Agentic)

At first, using agentic systems felt like magic — and mind-blowing. I'd give it a goal like “Add a notification system,” and the system would reason through the steps, generate the code, and even unit test the flow.

I found myself stepping into more of a product owner role, guiding the agent, reviewing its work, and steering its decisions.

Upsides:

  • Huge productivity gains

  • Great for building systems I haven’t implemented before

  • Fast prototyping for game features

Downsides:

  • Debugging can be strange — the system makes decisions I didn’t explicitly direct

  • Describing visual/UI problems can be tough (though screenshots


     helps a lot)

That said, when paired with tight version control and a “trust but verify” mindset, it’s incredibly powerful — especially in fast-paced development cycles.


🎨 What Is Vibe Coding?

If agentic coding is about outsourcing the “how,” vibe coding is about expressing the feel of what you want and letting the AI fill in the details. It’s less like writing blueprints and more like painting in broad strokes.

You might say, “I want the galaxy to be a spiral like the Milky Way,” and the system codes a procedural generation system with spiral arms, a galactic center, and a visually accurate structure — and does it fast.


🚀 My Experience So Far (Vibe)

Vibe coding has felt incredibly intuitive — and liberating — especially for creative work.

When I’m building assets or UI for my game Stellar Throne, I don’t always know what the final design should look like. Vibe coding lets me describe the tone, mood, and visual direction, and get results that are often better than I imagined.

Highlights:

  • Great for prototyping game visuals, UI layouts, procedural content

  • Fast iteration and creative discovery

  • Feels more like collaboration than delegation

Challenges:

  • Sometimes results are too literal

  • Editing images or visuals requires learning some unique language

  • But once you get the hang of it, the model usually “gets” you

Vibe coding also pairs beautifully with agentic systems. I can vibe-code a UI mockup, then let an agent implement the layout and wire up the logic. That hybrid workflow? It’s starting to feel like the future.


🧩 Wrapping Up

As someone building a complex project like Stellar Hegemony, I’ve found both Agentic and Vibe coding to be more than just tools — they’re new creative mindsets. They’ve expanded not just how I work, but how I think about the work. Less time buried in syntax, more time focused on vision and design.

These paradigms aren’t magic bullets. They require learning, judgment, and a willingness to trust (but verify). But when they click, the results are transformative.

If you’re curious, try integrating one of them into your workflow. Start small — maybe prompt an agent to build out a feature, or vibe-code a mockup of a screen. See what happens. You might find, like I did, that you’re no longer just coding — you’re collaborating with something new.

And that’s a pretty exciting place to be.

Thanks for reading — and if you’re experimenting with these approaches too, I’d love to hear what’s working (or not) for you.

— MrPhil