Game Gen - Week 19

Continuing in C++ and Unreal Engine!

Over the last two weeks, I've focused on developing the core mechanics of my 2D resource game, "Star Paws." Here's a summary of the key C++ classes and functionality I've implemented:

Here are the C++ Classes and functionality I've made over the last two weeks:

Here's a short GIF of my 2D game, which is still very early in development. 

  • Player Character 

    • Setup: Created a Paper2D character using a C++ class, then converted it to a Blueprint.
    • Functionality: The player character moves to the Base Console on tap, triggering the Base Management mission control menu upon arrival.
A snippet of how we control the player's movement with timers. 

  • Trade Table System 

    • Structure: Developed a C++ class and Blueprint for managing trade goods using Enums and Structs.
    • Mechanics:
      • On interaction, items are sold, and the appropriate gold amount is added.
      • NPCs trigger sales by moving to the table and purchasing items.
      • A weighted system determines item rarity, updating inventory accordingly.
      • Coin pickups spawn with accumulated values for completed sales.
This is the function that controls the actual selling of items from the trade table.

These functions control calling the NPC, and also determining the items available to sell and keeps the weighted running total which allows the weight system to work for the probability of items.

Once the item is sold, then we spawn the coin and reduce the amount of inventory. 

  • NPCs

    • Behavior: NPCs spawn with a random number of items to buy, move to the trade table, and purchase items.
    • Rarity System: Implemented a weighted probability system to determine item rarity using a random number range.
This is a utility function in the player which determines the rarity of the item to buy.

Here's the main functionality of the NPC, it just moves and then buys. The movement gets called by the Trade Table once the NPC is spawned. 

  • NPC Manager

    • Control: Created a C++ class and Blueprint to manage NPC spawn timing and quantity.
    • Mechanics: Uses random intervals and quantities to spawn NPCs, which then move to the trade table for purchases.
Here's the functionality I created for the NPC Manager. It's pretty simple, it uses a timer that gets started on the begin play from the "SpawnNPCs" and it loops to spawn NPCs, which is not best practice but just temporary.

Here's how the spawning is written, the SpawnNPC actually starts the timer and that timer will call the spawn loop when the time is up. Once the loop finishes, it chooses another random timeframe to wait for the next spawn.

2D Art and Animation:

  • Art Style: Chose a "Minimalist Flat Vector Illustration" style, similar to "Kurzgesagt."
  • Character Design: Iterated on designs, opting for simplicity due to time constraints.
  • Objects: Created various game objects.
  • Animation: Learning Blender Grease Pencil for quick, high-quality animations.

Here's some of the Art I've been working on:

Yarn Ball Resource
Fish Resource
"Fluff" Resource
Catnip Leaf Resource
Base Console in Progress

Character Design Process:


My Character design iterations, it took me a few experiments before landing on the design I felt was best suited for this project but I learned a lot about Krita and character design in the process! 



The first design I did I loved but quickly realized it would be difficult to create all the poses and animations, at least for my first time learning animation. 

The second iteration I tried, which I don't mind the look of but it wasn't exactly what I was going for. 

My third character iteration, I felt like it was closer, but animating this even as a cutout was very tedious and there were a lot of moving parts for the body. 





Finally, I looked at a lot of different illustration styles and felt like this more cute minimal style would work better for the project overall. 


This character is based on my cat "Pumpkin" who passed away about a year ago. She was with me since I was 16 years old and lived a wonderful 15 years with me as my first-ever pet of my own. She was an angel and I miss her every day, so this game is in her memory. 

Rest in Power Paya! 









Goals for the next two weeks:

  • Further work on the trade system and inventory management for the trade system. 
  • Better NPC movement that feels more natural. 
  • Continue are and animations for the game assets. 
Thanks for reading!

Comments

Popular posts from this blog

Game Gen - Week 1

Game Gen - Week 4