Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

War Pigs

Chaotic diner card battles where pigs gamble to avoid becoming bacon. · By WeShipEventually

Changelog V0.0.2

A topic by Aluminati Studios created 93 days ago Views: 27
Viewing posts 1 to 1

UI / Menus

Changed

  • Button image and text alignment
  • Button alignment on Main Menu and Pause Menu

Added

  • Button hover and unhover animations
  • Controls Menu that opens when the Controls button is clicked on the Main Menu or Pause Menu
  • Settings Menu opens when the Settings button is clicked on the Main Menu or Pause Menu
  • Settings Menu sub-buttons open placeholder settings panels
  • Settings Menu Close button dismisses the menu
  • Volume sliders with live text blocks displaying current slider values; audio slider functionality implemented in code
  • Placeholder entries in the Graphics Settings menu

Fixed

  • Bug where multiple Controls Menus could be spawned if the Controls button was clicked while the Controls Menu was already open
  • Bug where the Controls Menu button hover and click sounds increased in volume each time the menu was closed and reopened
  • Bug where buttons on the Pause Menu or Main Menu could be clicked while the Controls or Settings menus were open
  • Duplicate audio file that was overlooked during dynamic audio system setup in the CodeTesting map

Audio

Added

  • Card flip sound implemented and routed through the Audio Manager PlaySimpleSound method
  • Audio system configured for Settings Menu and Pause Menu; pauses current music track and plays the relevant menu audio track

Changed

  • Default volume levels restored for both music tracks; default volumes can still be adjusted without breaking code
  • Volume slider state saving implemented; audio settings are persisted to a text file using two new save/load functions called across appropriate locations

Gameplay — War Card Game

Fixed

  • Click/round flow fix and card reveal timing rework:
    • Cards now spawn face-down (bStartFaceUp = false) on both PlayerDeck and EnemyDeck
    • HandlePlayerCardClicked rejects clicks while bRoundInProgress is true
    • PlayBattleRound now calls RevealCard on both top cards before comparing ranks, fixing premature or missing reveals
    • War tie loop correctly burns WarBurnCount cards per deck into the Pot and re-reveals new top cards each pass
    • SetSelectable(true) is applied to the next player top card immediately after AddCardsToBottom, removing the 1.5s click-block window
    • CleanupRound removes the stray RevealCard call that was pre-flipping the enemy's next card before the player's click
    • GetCardRank changed from a hardcoded 52-entry RankTable[] to arithmetic: (CardID % 13) + 2, eliminating risk of mistyped table entries
  • Bug where Z-fighting caused mouse input to detect buried card actors instead of the true top card:
    • SetSelectable() now toggles collision (QueryOnly + Visibility when selectable, NoCollision otherwise); only the top card of each deck is interactable
  • Timing bug where RevealCard() and the hide/move step ran in the same frame, making flipped cards invisible to the player:
    • Added RevealDelaySeconds (default 1.0s) timer between card reveal and hiding/moving cards to the winner's pile
  • Biased card shuffle corrected:
    • WarPigsDefaultGameMode and DeckActor both updated from a full-range RandRange(0, Num()-1) to proper Fisher-Yates using RandRange(0, i) (counting down), producing a uniform distribution and reducing abnormal War frequency

Added

  • Player can now choose between AI or Player-controlled enemy

Changed

  • Slide Down animation on card buttons now plays only after the Slide Up animation fully completes

Player Controller & Pause System

Changed

  • Replaced BindKey with Action Mappings
  • Implemented proper pause/resume toggle on P
  • Added UPauseMenu forward declaration and CurrentPauseMenu pointer
  • Fixed compile errors related to missing type references
  • Corrected module dependency from PaperZD to Paper2D
  • Cleaned up input mode handling and pause menu creation
  • WarPigsPlayerController.h: Restored correct include order so WarPigsPlayerController.generated.h is last, fixing UHT errors; added UPauseMenu* CurrentPauseMenu and bool bIsGamePausedByController members
  • WarPigsPlayerController.cpp: Updated constructor to initialize new members; reworked HandlePause to own pause behavior — on P press, pauses game, loads WBP_PauseMenu, adds to viewport with Game+UI input and visible mouse cursor; tracks state via bIsGamePausedByController
  • PauseMenu.cpp: Rewired buttons (Main Menu → CodeGameInstance::LoadMainMenu, Resume → ResumeGame, Controls → OpenControlsMenu); reimplemented TogglePauseMenu, PauseGame, and ResumeGame to delegate unpause to AWarPigsPlayerController::HandlePause, restoring GameOnly input on resume; updated OpenControlsMenu to use typed LoadClass

Config & Packaging

Added

  • Config/DefaultGame.ini:
    • Added GameInstanceClass=/Script/wegaming.CodeGameInstance under [/Script/EngineSettings.GameMapsSettings]
    • Added [/Script/UnrealEd.ProjectPackagingSettings] with +DirectoriesToAlwaysCook=(Path="/Game/UI") to ensure PauseMenu and ControlsMenu are cooked into the build executable

HUD

Added

  • C++ WarPigsHUD widget class
  • Gameplay HUD displaying player card count, enemy card count, and round result text
  • Timed clearing of round result text after each battle
  • Pulsing animation on gameplay hint text
  • Automatic hint text removal after five seconds

Changed

  • Connected WarPigsDefaultGameMode to update HUD after every completed round
  • Connected WarPigsPlayerController to create and display the gameplay HUD
  • Reparented WBP_TempHud to the WarPigsHUD C++ class
  • Converted HUD root to a Canvas Panel for improved positioning and future expansion
  • Updated WBP_TempHud anchors and layout to scale correctly with viewport size
  • Adjusted hint pulse scale and pivot for a cleaner stationary animation
  • Improved placement of player card count, enemy card count, and round result labels

Fixed

  • Gameplay HUD not updating card counts during rounds
  • Round result text remaining on screen indefinitely
  • HUD widget bindings mismatched with C++ implementation
  • HUD elements shifting to incorrect positions on window resize
  • Hint text appearing to drift/move while pulsing
  • Hint text remaining visible for the entire game session