Cowpocalypse Devlog #4: Cowpocalypse v1 Has Released!

  • mdo   Sergio
  •   Game Dev
  •   December 3, 2025

An eerie RPG-to-FPS hybrid built from the ground up in one semester.

🎬 Introduction

Cowpocalypse v1 is my final project for CS 4423 (Game Development). Before this class, I had never opened Unity. By the end, I shipped a fully playable low-poly RPG/FPS hybrid set on a mysterious, unsettling ranch where the animals don’t quite act like normal animals.

This post walks through what Cowpocalypse is, how it plays, the systems under the hood, the challenges I ran into, and where I’m taking the game next — including more quests, boss fights, and dynamic weather cycles.

🐮 Game Overview

Cowpocalypse is a short, narrative-driven RPG that transitions into an FPS combat experience. You arrive as a new ranch worker and are given increasingly strange tasks by your boss. Over the course of three main quests, you’re introduced to:

  • Ranch aesthetics and exploration
  • Healing items and inventory management
  • Combat against increasingly aggressive cows

🎮 Controls

  • WASD — Move
  • Shift — Sprint
  • Space — Jump
  • Left Mouse — Shoot
  • 1 / 2 — Use healing items
  • Escape — Pause
  • F12 — Take screenshot

📹 Gameplay & Source

Gameplay video: Watch on YouTube
Source code: GitHub: VulnerabilityVigilante/Cowpocalypse
Play Now: Download Link


🧩 Core Features

1️⃣ Full Quest System (With Subtasks & Rewards)

Cowpocalypse has a custom quest framework that supports:

  • Quest states: NotStarted → InProgress → Completed
  • Optional subquest dependencies
  • Coin rewards on completion
  • Event hooks when quests start or complete

The QuestManager tracks quests, progress goals, and completion logic. It also exposes events like OnQuestStarted and OnQuestCompleted for other systems (like spawners) to subscribe to.

The QuestGiver sits on the NPC and:

  • Determines which parent quest comes next
  • Starts parent quests and their subtasks
  • Grants coin rewards through CurrencyManager
  • Marks quests as “rewarded” so they can’t be double-claimed

This logic is handled in QuestGiver, including helper methods like GetNextQuestID, TryGiveQuestReward, and AllQuestsComplete.

On top of that, progress for the combat quest (ShootCowsQuest) is carefully reset when the quest is restarted so you can’t carry over previous kill counts into a new attempt.

2️⃣ Dialogue System With Branching Paths

The ranch boss isn’t just a quest vending machine — he has context-aware dialogue. The DialogueTrigger component:

  • Shows a prompt when you step into range (“Press E to talk to the boss.”)
  • Looks up the state of parent quests through QuestManager
  • Chooses which dialogue lines to show based on:
    • No quest giver / no DB (fallback lines)
    • Quest completed but not rewarded (reward lines)
    • Quest in progress (active reminder lines)
    • Quest available (offer + Accept/Decline choices)
    • All quests completed (final “you saved the ranch” lines)

The system uses a DialogueUI reference to render text and also passes callbacks for Accept/Decline choices when a new quest is offered.

3️⃣ Persistent Save File System

Cowpocalypse uses a custom text save file stored in your Documents folder:

Documents\CowpocalypseSave\save.txt

The QuestFileSaveSystem centralizes all saving and loading:

  • Saves every quest’s state
  • Saves which quests have already been rewarded
  • Saves the player’s coin balance
  • Saves healing item counts (Redbulls, Cigarette Packs, Cigarette Charges)

On save, it writes everything out to a human-readable text file and ensures the folder exists. On load, it restores quest states, reward flags, coins, and consumables, then triggers a UI refresh for healing items.

The CurrencyManager integrates with this system by:

  • Loading coins from the same save.txt file on startup
  • Exposing AddCoins, SpendCoins, and SetCoinsFromLoad
  • Updating the on-screen UI whenever the value changes

It uses a singleton pattern plus DontDestroyOnLoad to persist across scenes.

The DeathScreenController ties it all together: when you die and press restart, it saves the full state via QuestFileSaveSystem.SaveAll(), reloads the scene, and correctly restores mouse lock and player controls.

4️⃣ Inventory & Healing Items

The game includes an inventory-driven healing system using:

  • Redbull — a healing drink
  • Cigarettes — another healing resource with its own count and charges

The HealingItemUse script listens for keypresses (1 and 2), checks the Inventory singleton to see if items are available, and then:

  • Applies the healing effect through inventory logic
  • Plays a healing sound with extreme pitch variance (Random.Range(0.7f, 1.4f)) to keep it feeling crunchy and dynamic

This is all packaged in a self-contained AudioSource that’s created at runtime, keeping the system modular and easy to drop into other scenes.

5️⃣ FPS Combat, VFX, and Custom Shaders

On the combat side, Cowpocalypse features:

  • Raycast-based shooting with hit detection against enemy cows
  • Muzzle smoke particles when firing
  • Orange/yellow explosion particles when animals die
  • Hit markers and gunshot SFX

The rifle’s skin uses a custom camo shader inspired by Phantom Forces. To support this, the GunCamoStaticMatrixBinder script:

  • Builds an identity matrix in code
  • Writes each row into shader properties (_StaticRow0 through _StaticRow3)
  • Forces material instancing so each renderer has its own adjustable camo state

This keeps the scrolling camo effect locked in a static space, independent of player movement and world transforms.

6️⃣ Enemy AI & Wave Spawning

Enemy cows:

  • Detect the player within a large range
  • Rotate to face them
  • Charge forward across the flat ranch terrain

During the ShootCowsQuest, cows spawn in waves and each kill increments the quest progress until the target count is reached, at which point the quest completes and a reward can be granted. The system also accounts for players who start the game mid-quest and ensures the wave spawner activates correctly when loading a saved state.

7️⃣ Screenshot System

Pressing F12 triggers:

  • A quick flash overlay
  • A camera shutter sound (played via PlayOneShot)
  • A screenshot saved into the user’s Pictures folder under a Cowpocalypse directory

This makes it easy to capture the low-poly horror vibes and share moments from the ranch.


🛠️ Technical Challenges & How I Solved Them

Challenge 1 — Save Files Going Out of Sync

At one point, restarting from the death screen or reloading the game could desync coins, consumables, and quest states. Sometimes I’d come back with the wrong number of items or quests in the wrong state.

To fix this, I centralized all game persistence into QuestFileSaveSystem.SaveAll() and QuestFileSaveSystem.LoadAll(). Now:

  • Quests, rewards, coins, and healing items all serialize through one path
  • The death screen’s restart button always saves and then reloads from the same file
  • Loading on startup uses the same logic as loading after death, so it’s consistent

This made the entire game feel much more stable and predictable.

Challenge 2 — Mouse Lock & Pause Menu Bugs

I ran into multiple edge cases where:

  • The mouse stayed locked when I needed to click UI
  • The mouse unlocked but the player couldn’t look or move after restarting
  • Shooting sounds still played while clicking on UI elements

The DeathScreenController now:

  • Reacquires references to PlayerController, PlayerLook, and Quest3_PlayerGun when a scene is loaded
  • Unlocks the mouse and disables those scripts when the death screen appears
  • Relocks the mouse before reloading the scene

Combined with extra guards in the gun logic to not fire when the cursor is unlocked, this cleaned up the UX significantly.

Challenge 3 — Enemy AI That Rotated But Didn’t Move

Early on, cows would rotate to face the player but stay rooted in place. A lot of this came from trying to mix a CharacterController with simple forward motion.

The solution was to simplify things: since my game takes place on flat terrain, I rewrote cow movement to be fully code-driven and not dependent on CharacterController for vertical behavior. This gave me predictable, steady stampede behavior without strange physics edge cases.

Challenge 4 — Shaders Scrolling in the Wrong Direction

The scrolling camo shader originally moved in the wrong direction and axis. By introducing a static matrix binder (GunCamoStaticMatrixBinder) that writes an identity matrix into shader rows, I could precisely control how the shader interprets “static” versus “world” directions and fix the scrolling behavior.


🎨 Art & Aesthetic

Cowpocalypse uses a mix of:

  • Low-poly environment packs (trees, houses, animals)
  • Custom-modeled fences and perimeter structures for Quest 1
  • Hand-crafted UI for the main menu, pause menu, shop, and consumables
  • A cactus green health bar and themed font choices to sell the “ranch but unsettling” tone

The game starts off feeling goofy and light, but as you progress through the quests and see how the animals behave, the tone shifts into something much creepier.


🌟 Accomplishments

From the bounty system, I completed an estimated 41–67 points worth of optional features, including:

  • Custom particle effects (runic spawn particles, muzzle smoke, animal death explosions)
  • Custom HLSL shader for the gun camo
  • Full pause menu system
  • Screenshot saving functionality
  • Checkpoints and resumable progress via save files
  • Inventory and multiple usable items
  • Dialogue and branching dialogue sequences
  • Overlay canvases for combat, shop, currency, and dialogue

👤 Peer Feedback

A fellow student playtested Cowpocalypse and commented on:

  • Smooth performance and stable framerate
  • Enjoyable art style and animal behavior
  • Quest, consumable, and gun systems working reliably

They also pointed out areas to improve, like adding a sound effect when the player takes damage, providing an in-game way to reset progress, and letting the player keep the gun after finishing the game to mess around more.


🚀 What’s Next for Cowpocalypse

Cowpocalypse v1 is just the starting point. Here’s what I want to build next:

🧭 More Quests & Story Arcs

  • Extend the quest chain beyond the initial three main quests
  • Add side quests that explore different parts of the ranch and neighboring areas
  • Introduce moral choices and branching questlines that affect how NPCs treat you
  • Use the existing QuestManager + QuestGiver architecture to support multi-step arcs and more complex dependencies

💀 Boss Fights

  • Create unique boss encounters (e.g., an alpha cow, corrupted ranch animals, or a skeletal overseer)
  • Design special mechanics like charge attacks, area denial, and phase changes
  • Extend the current AI and wave systems into bespoke boss arenas
  • Tie boss fights to major story beats and high-value quest rewards

🌦 Dynamic Weather & Day/Night Cycles

  • Implement a full time-of-day cycle: sunrise, daytime ranch work, eerie twilight, and pitch-black nights
  • Add weather states like fog, rain, and storms to enhance the creepy vibe
  • Change enemy behavior and quest availability depending on time and weather (e.g., more aggressive cows at night, special quests only during storms)
  • Integrate lighting changes and ambient soundscapes to match the current weather/phase

I plan to keep iterating on this project post-semester and eventually package a “Cowpocalypse v2” with expanded content, bosses, and a much more dynamic world.


🙏 Closing Thoughts

Cowpocalypse v1 represents my first real dive into Unity, C#, shaders, AI, save systems, and overall game architecture. I’m proud of how much I managed to build in a single semester and excited to keep growing this weird, low-poly ranch into a full-on cursed open world.

If you’ve read this far — thanks for checking out Cowpocalypse. And remember:
The cows are watching. 🐄👁️


© 2026 YazdiLabs - All rights reserved.