A lesson in frustration

7
Official Construct Team Post
Laura_D's avatar
Laura_D
  • 12 Jul, 2019
  • 585 words
  • ~2-4 mins
  • 1,340 visits
  • 0 favourites

Today’s blog post is brought to you by cupcakes and frustration!

So. Another week has passed, and I feel like I have accomplished practically nothing for this game, because naïve, past me decided that programming NPCs would be the next logical step to take. How hard could it be?

Very. As it happens.

If you tuned in on Tuesday, you’ll know that we got part of a system for NPCs up and running. We could set them up to rotate on the spot randomly and non-randomly, and we could tell others to follow a set path using a combination of variables and mover plates. Apart from a few small issues when interacting with the player character, it did what it needed to do. Great.

During the stream, the topic of state machines came up. And despite having a pretty good system already in place, in the back of my mind, I knew this was the kind of thing I should really be looking into. So off I went to do some research.

To begin with, it all seemed to be going swimmingly. I quickly got my spinning NPCs set up, with a random and non-random state, and they both work beautifully. We have one guy who turns 90º every second, and we have a lady who does that wonderful random-as-heck Pokemon style turning. Where, you know, she could be staring at a wall for five minutes before randomly deciding to turn your way, just as you walk by.

I even have some states defined for my walking NPCs. Their movement direction and state are set by an instance variable, which I can configure in the layout, which makes for easy testing. I have two instances of one NPC in the layout, and they move independently of each other when I set their variables. Lovely.

So where is the frustration, I hear you ask? It all sounds brilliant, right?

Ha. Seemingly, every time I try and create the path for my NPCs to follow (using a method proven to work in a separate project), they do something completely different. I won’t bore you with the details now; this is a blog post, not a bug thread. But suffice to say, I got hugely irritated with this whole system.

But. It did remind me (and so did my colleagues) – know your limits.

It’s pointless to keep hammering away at the same issue while frustrated with it. Take a step back, go and do something else and then come back to the problem with a clear head.

You can only produce your best work when you’re at your best, and pounding your head against a (proverbial) brick wall with frustration is hardly your best. A considerable part of any project like this is looking after yourself. After all, the work won’t get done if you’ve driven yourself to madness.

So that’s what I’m doing. I’ve taken a break, written this blog, and enjoyed a cup of tea and a cupcake. My brain has had time to reset, and I feel ready to tackle this problem again. I’ve stripped out my project to the bare essentials that I know work, and now I can focus on building up a new system. (I should probably mention that I’m building this NPC system in a separate project – I didn’t rip up my actual game in my frustration!)

So, to all of you out there working on a project. Look after yourself so that you can look after your masterpiece.

Subscribe

Get emailed when there are new posts!

  • 6 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Thank you for your interesting article, I wish I can do something like you, but in most case, I am just too stubborn to step back :((, I really need to train my mind!

  • That's really good advice.

  • Perfect time to go play a pvp mmo. The giggles associated with chopping off someone's head often alleviates the frustrations of writing code.

      • [-] [+]
      • 1
      • Laura_D's avatar
      • Laura_D
      • Construct Team Community Manager
      • 1 points
      • (0 children)

      Ah, that's something like Splatoon for me - there is great joy in sneaking up behind someone and smacking them over the head with a giant paint roller.

  • Great article!

    Something I do when I hit a brick wall is do something completely different and unrelated. Either some other system, or draw stuff, or watch some netflix for a day or two, or play a game, or even decide to get out of my house to take a train for an hour to get to a remote city and vlog there for my friends and family to watch.

    Also remember to drink water kids.

      • [-] [+]
      • 2
      • Laura_D's avatar
      • Laura_D
      • Construct Team Community Manager
      • 2 points
      • (0 children)

      Thanks :)

      I'm sure I've said this before, but I want this blog to cover all aspects of gamedev, and this definitely counts in my opinion!

      And yes. Always stay hydrated!