#8 | (WIP) Blaster System
Hello!
I've made some significant progress on the blaster system since the last devlog.
Previously, when the player would reload their blaster, they had only one "magazine" that would be refilled from an ammo pool, instead of actually changing out their current magazine for a different one.
I've improved that mechanic. Now, the player will actually swap out their current magazine for a different one, for whichever one has the most ammo.
Now, let's take a look at the code behind this mechanic. I've left extensive comments to explain what each line of code does.
When the player reloads, the game first waits a few seconds (reload delay) before checking which magazine in the player's inventory has the most ammo. Then, if the player already has a magazine equipped, that one is moved back to the inventory. Finally, the magazine with the most ammo is removed from the inventory and equipped.
I've learned a lot from working on this mechanic and the Blaster System as a whole. The next things I'll be working on is an overhaul of the GDD and more components of the Blaster System.
Thanks for reading!
Get HvZ - 2D
HvZ - 2D
Nerf themed 2D survival shooter!
Status | Released |
Author | The_Hobbyist_2007 |
More posts
- #9 | (WIP) Blaster System3 days ago
- #7 | (WIP) Blaster System27 days ago
- #6 | (WIP) Blaster System36 days ago
- #5 | Major Changes & Plans50 days ago
- #4 | Basic Tilesets53 days ago
- #3 | MVP Version89 days ago
- #2 | Displaying ProgressOct 03, 2024
- #1 | Project Begins!Sep 20, 2024
Leave a comment
Log in with itch.io to leave a comment.