Weekly Game Dev Log: Oct 3-Oct 9

Pretty slow week because I kept getting stuck on bugs and not having the energy to figure them out – but I have some fun news – I’m taking the next two weeks off work for a long overdue vacation, and I’m going to try to devote as much time as possible to working on my game! Can’t wait to see what happens 🙂

Here’s this past week’s log:

  • Started working on converting some of my code to use structs, since I keep getting incredibly frustrated with the data structures and lack of objects. Structs came out in 2.3 and I hadn’t learned how to use them yet, but it’s time!
  • Worked on the shop system, started making it so the player can purchase items from a shop.
  • Fixed the shop to spend the player’s gold, and not let them buy items if they don’t have enough gold, or enough space.
  • Discovered a bug with placing items, added it to my backlog! Using Trello to manage this project is super helpful for keeping the flow going, because I don’t feel the need to fix this right now!
  • Working some more on the shop system, and NPC schedules. I need to make this shop only be open if the NPC is there, and I’m trying to make the NPC walk to the shop, but the collision box of the shop counters are slightly over the grid, which means the code can’t find a path to it, even though the path should work.
  • I adjusted the sprites and collision boxes down, and he still wouldn’t walk! I eventually figured out that bug was because he himself was being marked as a collision, which is obvious to me now looking at the screenshot, because he is in a big red box.
  • I switched the code to only add the one main shop counter to the collision grid, and now he can walk! This made two other bugs clearly evident: He walked through the other counter, because I didn’t add it to the grid, and he isn’t changing directions when his path does.
  • The first bug was easy to fix, I went back to the original code that adds everything that is a collision object to the grid, then removed him specifically, so he could start working. The direction changes I need to copy some code over from my Pet object, and consolidate it into one piece of code, so I’m going to work on that this weekend!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s