Have some words because I can't think of an appropriate title

5
Official Construct Team Post
Laura_D's avatar
Laura_D
  • 6 Sep, 2019
  • 557 words
  • ~2-4 mins
  • 1,022 visits
  • 0 favourites

It's been a busy week for me gamedev wise, what with Tuesday's stream and then working on the game at an event on Wednesday (until I got distracted by Smash Bros), I've got quite a bit done. There's a clunky albeit mostly working version of 'Nepeo's following dog' and I've started moving the LoS events from the tester project to the main build.

I'll talk briefly about the following dog system first before I talk about the TRAUMA I had with the LoS porting.

A good few streams ago when I first started building the NPC system for the game, Nepeo requested that we put in a little creature, a dog perhaps, that would follow the player around in certain areas. Think something along the lines of Snot Boy in The Legend of Zelda: The Wind Waker. We did also joke about adding our own version of snot boy later in the game, rather than just a dog!

Long story short, there is now a working version utilising the code that Demonoire uses for its enemies. Essentially every so often the follower object looks at the angle between it and the player and chooses a movement direction accordingly. This is currently done with a time-based instance variable hence why it's clunky, but overall it works. It also means it doesn't have too much trouble navigating around other NPCs and solid objects which is handy. I'll probably do some more work on that next week.

So, onto Wednesday. I figured that porting code would be an easy, time-consuming task that would be ideal for a long stint at an event. And I was largely right, except I didn't make as much progress as I thought.

Mostly because I spent almost an hour trying to debug my own stupidity.

I'll set the scene for you. I'm working on one screen (which is a terrible plan when you're transferring between projects and have two screens available.) and I'm switching between the test project and the actual game file.

I've transferred all the events correctly, everything lines up nicely, I go to test aaaaaand.... It doesn't work. My infinite loop of battling has returned - I'm stuck in a Joey-themed nightmare of my own making.

Frantically looking through my game file, nothing makes sense. All the events are as they should be, the behaviors are all there but for some reason, my instance variables aren't persisting between layouts. Then it hits me. Persist is the thing not working properly. So I go back and check the main game file again. Lo and behold, I hadn't added the persist behavior to my NPCs.

Basically, I'd been stupidly looking at the tester project and thinking it was the main game file. Moral of the story - ALWAYS CHECK THE PROJECT BAR. I write these blog posts so you don't repeat my idiocy. Public service and all that.

I'll carry on porting bits of this code over on Tuesday, and hopefully, by the end of next week, we can start adding more battle-able NPCs to the game. Hurrah!

Also, do join me for more gaming on Thursday when I'll be carrying on with RedBlack Spade's CatMaze. And hopefully, the developer will be able to join us again in the chat so if you have any questions for him, that's the perfect time to ask!

Subscribe

Get emailed when there are new posts!

  • 3 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • I really like how with each post you slowly join in on the fun of descending into the dark abyss of programming and debugging. A world where nothing makes sense and everything makes you start to doubt your own sanity until you realize it was all of your own making, and at that point, finally reach the last stage of madness.

  • Every post just reveals how the sanity is slowly disappearing

    as it should

  • :3

    platformer like game

    title :

    parkour maker