New Game-dev. Holding myself accountable by starting an ongoing devlog. Long-term goal: Colony Ship RPG. Short-term Goal: Develop a little mini-game (gamelet) where I can walk up to a NPC. I plan on posting once a week on progress.
and start a brief conversation with some choices / replies gated by skill checks. Currently all UI is via debug streams. Eventually, I will add an actual dialogue window instead.
Devlog #2 - [Gamelet1]:grey-box colony ship RPG”
Week #2 - Steady Incremental progress.
- Added delegates and listeners for conversations (Dialogue Updated & Dialogue Ended)
- Added a rudimentary dialog window for the conversation
- Added a simple Attribute Skill Check
- Updated replies to show Skill Check Percentage Chance.
- Refactored the previously hard coded conversation using debug output into another Listener on the Dialogue Delegate(s).
- Started a rudimentary inventory system (not yet finished)
Week #3 - Finished Gamelet1.
-
Finished the rudimentary Inventory system
-
Created a PickupComponent to support picking inventory items off the ground and storing in inventory.
-
Added Dump to Log (debugger) support to the inventory system
-
Added Inventory Component to Player Character class
-
Made various changes to game system to sup
port picking inventory objects off ground and putting them in the PC’s inventory
-
Created a inventory cube that could be picked up off the ground and added to inventory
-
Added Save / Load support to the dialogue system
-
Added Save / Load support to the inventory system
-
Created A Game Instance Subsystem for inventory changes to survive in the World (outside of the player character). Added my GameInstanceSubsystem to the WorldSubsystem object
-
Made various changes to the rest of the game system to support save/load and to destroy objects (currently in the world) that have actually moved into the players inventory (load game state).
-
Tested entire system end to end (dialogue, skill-check, pick object off ground and put in inventory, change attributes, re-test skill-checks, save/load, verify attribute changes, verify dialogue changes (based on attributes), verify inventory changes (objects get destroyed in world and end up in players inventory).
-
Definitely not perfect but a good start in learning to write a game
-
Accomplished main goal of Gamelet1 (rudimentary dialogue system, rudimentary inventory system, save/load world state – attributes, dialogue, inventory, etc.)
-
Ready to figure out what to learn in gamelet2 and design that new gameplay and then start implementing it.
Devlog #4 - [Gamelet2]:grey-box colony ship RPG"
Note: No Image to show as Gameplay hasn’t fundamentally changed yet, still working through Game Flow State Machine design and implementation…
- Finished Gamelet1 - Rudimentary Attributes, Dialogue, Inventory, Simple save/load
- Started Gamelet2 - building on Gamelet1, improving game by adding game flow state machine
- Started by understanding how to pause, quit, save/load in UE
- Decided that I need to have a Game Instance class instead of a Game World class for supporting state outside of levels (World)
- Wrote initial ColonyGameFlowSubsystem class derived from GameInstanceSubSystem
- Designed rough Game Flow State machine (States, Triggers)
- States: MainMenu, Playing, Paused, QuitGame, etc.
- Triggers: Death (Player died), NewGame, Continue, Key, Quit, etc.
- Refined Game Flow State Machine (added Actions on Transitions)
- Actions: Pause Game, Resume Game, Save Game, Load Game, Continue (Load most recent game), etc.
- Wrote Initial State Machine as static table of Transition Rows (OldState, Trigger, NewState, Actions)
- Wrote HandleTrigger(Trigger) method using Transition Table to implement Game Flow represented by State Machine.
- Added actual pause/resume mechanics to game flow (trickier than expected)
- Realized that complicated states can fail, rewrote Game Flow to deal with failed attempts to save / load / etc.
- Refactored HandleTrigger to call RunAction() subroutine (giant switch statement) for each requested action.
- Added Save Game to game flow
- Still need to refactor LoadGame into BeingLoad, OnBeingLoaded() to keep UE constantly running.
- Still need to write several actions like MainMenu, NewGame, Continue, etc which eventually resolve to calling OpenFile(…) on the appropriate level.
- Still need to test throughly
Devlog #5 - [Gamelet2]:grey-box colony ship RPG
- Added ability to Restart and apply the save
- Continue & Load now reload the level first and then apply the save
- Broke old LoadGame into 2 pieces BeginLoad() + OnMapLoaded() to prevent breaking correct game behavior
- Added level name to SaveGame functionality
- Figured out how to Connect Claude Code to the UE Editor through the editor MCP (using port 8765). Tested the connection briefly to do a rename, a spawn, an undo, and a commit
- Tested edge cases of game flow: load with no save file is refused cleanly. Death → Continue reloads properly.
- Rewrote old ColonySave(), ColonyLoad() methods into thin wrappers around the new game flow state machine. Deleted about 100 lines of now duplicated logic in the process.
- Read through the UE engine’s damage path: ApplyDamage → TakeDamage → OnTakeAnyDamage. The engine delivers damage, and you own the health.
- Designed and wrote UColonyHealthComponent: base max HP is persisted and effective max HP is derived, and damage calculation goes in front of the component.
- Gave my main player character (ColonyPlayerCharacter) a health component, added a ColonyDamage() test command and added an OnDied listener that stops the player’s pawn’s input and movement. Initially broke the game by ignoring all input but figured out how to do it correctly eventually.
- Renamed all character getters to be more consistent, now all Get{Name}Component().
- Tested character death by calling ColonyDamage() repeatedly until dead. Verified death broadcast message and OnDied() listener stopped character input and movement.
- Added Health component to Save/Load game.
- Tested - Damage, save, load, verified HP restored. including loading after death which resulted in a living character that could move again.
- Next Week - Create a grey-box enemy that I can fight with and inflict and receive damage.
Devlog #6 - [Gamelet2]:grey-box colony ship RPG
-
Learned a little about how timers work.
-
Implemented my first Enemy class (AColonyEnemy)
-
Not every smart, just attacks the nearest target in range, does damage through ApplyDamage, and destroys itself on death.
-
Has a Health Component, attackes every 2 seconds, filters characters to only Colony targets who have a Health Component as well, only attacks the nearest target (simulating a melee attack).
-
Wrote a ColonyAttack command for testing attacks on the command line
-
Updated Heath reporting in debugger to name their owner for better tracking and bug fixes.
-
Created a Enemy_Grey in environment that has the ColonyEnemy class and a health component. Gave him the Quinn mesh but no movement, animation, or anything else yet.
-
Tested: Attacking using ColonyAttack (got to be quick), killing enemy, and being attacked (and dying). Found a couple of bugs and fixed them. Getting killed correctly pauses the game.
-
Added the ColonyAttack to the left mouse button for much more rapid attacks.
-
Wrote a ColonyDespawnComponent for tracking characters, enemies, inventory, etc. that are no longer in the world.
-
Despawn Component has a DespwanedId and a MarkDespawned() method. Automatically generates IDs from owners name but also allows hand-typed overrides.
-
Rewrote inventory system to use Despawn Components instead of the older approach.
-
Rewrote Enemys (ColonyEnemy) to use Despawn components on death.
-
Updated Save/Load system to save Despawned ID’s as part of World State.
- Save ID’s to save file
- Load Despawn ID’s and destroy all matching objects in the world from the world.
-
Tested: Tested that saving before killing enemy and reloading brings enemy back to life. Tested that killing enemy first and then saving and then reloading results in enemy not showing up in reloaded world. Tested that picking up inventory object saving and reloading results in inventory object no longer appearing in world.
-
Next Week: Writing a rudimentary game over screen on death and hopefully starting a rudimentary Menu system to avoid having to do game flow from the command line (current situation).
Devlog #7 - [Gamelet]:grey-box colony ship RPG
Short week. But here is what I got down. Going on vacation over the week-end so next week will be short work list as well.
- Updated Character Death and Enemy Death to work with the overall game flow
- Character death pauses game (Game Over state)
- Enemy death (adds enemy to despawn list and destroys enemy object)
- Logged deaths and despawns to make sure it’s working correctly
- Created ColonyGameOverWidget - has support for “Continue” and “Quit to Menu” buttons and behavior.
- Added a helper function to Get() to return ColonyGameFlowSubsystem object which is used else where in code to help track game flow.
- Added the GameOver Widget to the Player Controller as it owns the UI.
- Switches to UI input with a cursor
- New levels start with game input in the correct state
- Added new UI (UMG Layout) elements in Unreal Editor
- Canvas, Vertical Box, Slot settings, anchoring, and justification
- Added “Continue” button and “Quit to Menu” buttons
- Tested new “Game Over” dialogue
- Walked up to enemy and let them kill me
- Game pauses, “Game over” Dialog shows up, “Continue” reloads most recently saved game
- “Quit to Menu” doesn’t do much yet as we don’t have a menu system yet…
Next week - start writing a rudimentary Main Menu for the game. Rewire “Quit to Menu” in game over" dialogue to go to this menu.
Devlog #8 - [Gamelet2]:grey-box colony ship RPG
Another short week
- Implemented a main menu (new game, continue, quit) dialog
- Added a menu level
- Added a MenuWidget to my Player Controller
- Continue button is grayed out if there is no save game
- Tested functionality all works correctly with Game Flow
- Implemented a pause menu (resume, save game, load game, quit to menu)
- Added a PauseWidget to my Player Controller
- Load game is grayed out if there is no save game
- Tested functionality all works correctly with Game Flow
- Next Week
- Minor cleanup
- Final PIE testing of All Game Flow, Enemy Combat, Main Menu, Pause Menu
- Final Standalone testing (see above)
Devlog #9 - [Gamelet3]:grey-box colony ship RPG"
- Finished Gamelet 2 (Game Flow, Menus, Enemy, and Combat)
- Finished final testing of game flow, main menu, pause menu, death, and combat
- Tested new game, pause, save, load, continue, quit to main menu, quit, etc.
- Tested dying, game over screen, and continue or quit to main menu
- Started Gamelet 3 (Start creating a simple Colony Ship Ring Mesh)
- Planned Gamelet 3 - a small walkable ring with radial gravity
- Step 1: Build a flat version with a wall at one end.
- Step 2: wrap the flat mesh into a ring but with normal gravity.
- Step 3: change normal gravity to radial gravity.
- Reading and Design
- Learned about procedural meshes and character movement
- Learned about gravity code in Unreal
- Initial ring => 1 x 1 meter cells, 188 cells around the ring (radius ~= 29.92 meters), 20 meters long, axis of cylinder along x-axis.
- Wrote AColonyRingFloor: A floor mesh and a 2 meter high wall mesh, both built through MapToWorld.
- Proved you can walk on the floor. get blocked by the wall on one end and fall off the open end.
- Had some visibility issues, traced back to the winding rules when creating the triangles in the floor and wall meshes. now fixed.
- Noticed the wall is visible on one side and invisible on the other side. probably OK for now but may need a double sided wall or a wall with volume in the future.
- Discovered my PC (manniquin) has a hierarchy of collision objects around it. Need to learn more about how this works in the future.
- Flat version of ring seems to be working fine.
- Next Week: Start converting flat floor into a ring with normal gravity.
Devlog #10 - [Gamelet3]:grey-box colony ship RPG
- Added a TraceFloor() function to shoot a line from the center of my player character down to hit whatever’s beneath me. Green means I hit something solid. Red means I hit nothing and I’m probably falling. It traces on a timer every half-second. This is useful for debugging.
- Wrapped the flat floor mesh into a curved ring with the ring axis down the +X direction, Y direction now indicates pointing towards (or away) from the center of the ring, Z direction is rotating +/- around the ring axis. Took a little back and forth to get it working. Once working, I ran into a problem with having normal gravity, so I could only walk part way around the ring before slowing down and stopping.
- Moved the entire structure so that switching back and fort between flat mode (normal gravity) and ring mode (radial gravity eventually…) results in a similar layout.
- Moved all my own objects (NPC, inventory, Enemy, PC’s starting location) out of the default starting level provided by UE and onto the ring mesh floor. Took a little tweaking to find the right places. Once correct, i deleted the entire UE default starting level.
- Tested all interactions for Game Flow again to make sure it was all working properly. It was.
- Added Radial Gravity for movement inside the ring. Wrote a GetGravityDirectionAt() method to override default gravity along the FVector::Down vector. Which points the gravity direction from the ring axis through your current location. It gets changed on every tick and the floor trace follows the gravity when TraceFloor() was called. Which also helped with debugging. However still has a couple of bugs. I can only get up about 25% around the ring before I get stuck and can’t go any further.
- Don’t like when games kill you for their geometry bugs (falling through the floor and dying). Added a radial safety net about 2 meters out. So, if you fall through the floor or off the edge. It teleports you back to your last known good location. Would like to add an “Unstuck” command eventually. In case, you get stuck in geometry and can’t move you can hit escape, click on the “unstuck” button and get put back to a known safe location nearby. That’s for later. Tested the safety net feature. So, deliberately running off the open edge teleports you back a second into the ring a second or so later.
- Learned about how UE does movement and rotation.
- Next TIme: Implement radial gravity correctly for both movement and the camera - which hopefully will fix my getting stuck at 25% around the ring bug.
Devlog #11 - [Gamelet3]:grey-box colony ship RPG
- Fixed Camera rotation to account for radial gravity. Camera now rotates automatically with main PC as he runs around the inside of the ring. Before, it had to be constantly adjusted as the camera kept staying in the previous plane instead of rotating with the ring’s cylindrical floor.
- Adjusted movement to account for radial gravity. Movement now feels correct instead of slowing down / stopping around 90 or 270 degrees inside the ring.
- Successfully walked all the way around the ring for the first time.
- Fixed a problem with main PC’s animations related to radial gravity. The animations would start facing forward and then switch to maximal diagonal around 90 degrees or 270 degrees before switching back to facing forward at 180 degrees around the ring. Had to adjust the ABP_Unarmed blueprint also use radial gravity properly instead of planar gravity.
- Stride stays facing forward all the way around the ring now
- Moved the enemy PC and inventory object to top of ring (instead of bottom). They automatically fall back down to the bottom.
- Wrote UColonyRingGravityComponent to deal with radial gravity.
- Made it to handle objects that only need gravity set once (bCanEverTick = true, bStartWithTickEnabled = false) or objects that need gravity to be adjusted on every tick (Frame) (bStartWithTickEnabled = true)
- Rewrote enemy PC and inventory object to use the new UColonyRingGravityComponent
- Enemy PC and inventory object no longer fall from top to bottom but stay glued to their (top) location.
- Enemy PC and inventory object were both in the correct location but upside down, rotated both objects 180 degrees to be correctly oriented.
- Refactored the main PC (AColonyCharacter) to use the new UColonyRingGravityComponent instead of the original hardcoded radial geometry.
- Verified that inventory pickup and combat with the enemy continued to work correctly even though we were all on the top of the ring.
- Adjusted the save system to save the player location, player rotation, and view rotation.
- Added a safety check on player load to make sure player was not outside of the ring before restoring location, rotation, and view. If outside, default to starting location instead.
- Verified that saving / loading / continue all correctly kept the players location, facing, and view.
- Added version number to save system. Discovered and fixed an old bug related to versioning (Unreal doesn’t write values out that happen to be equal to their default value).
- Next Week: Test and verify everything (All game flow, inventory, combat, etc.) on the Ring under radial geometry. Figure out what to design and plan for on the next game-dev installment (Gamelet 4).