,

Dev Diary – Week 7 Wrapping Up

This was the final week until the optimisation and the Creature Feature project, this meant multitasking and managing time to complete the projects in time. This was an extremely difficult week trying to juggle multiple problems from multiple projects at the same time but ended up fairly well.

Optimisation Project

Project 3 for studio was a C++ optimisation project, where the project was currently generating a world and has the ability to generate the potential fields in the world. The potential field generation was done by comparing the field strength of a single tile to each and every tile in the world, this ran extremely slow and needed optimisation. A solution for this was to implement Quadtrees to the project, quadtrees break up an area into four quadrants if the area exceeds the limit of items in that area. This continues until a certain level limit is set or the area has been separated so that no quadrant exceeds the limit of items. This can be used for checking collisions or any other proximity-based checks that objects require. In the initial implementation of the solution, I checked the location of the tile and see if they exceed the limit in this current quadrant. However, this caused weird behaviours as the field often stretched over the current tile and overlap into other quadrants. I solved this by instead of considering simply the tile location it considers the area that is affected by the tile’s field. Continual problem-solving of the project was an extremely useful experience and would not be possible without the initial research and understanding of the concept of Quadtrees.

Project 3 post-mortem

1200px-point_quadtree-svg

GOAP Debugging

There were a few bugs that needed fixing before I would be able to submit the project. These problems caused the game to crash or slow down significantly and I had to go through some major debugging to find the source of the problem. After some probing and debugging I found that sometimes the pathfinding would choose a node that is next to the player causing the start and end node to be the same, this causes the game to crash as it doesn’t return a valid path. This was solved by adding a minimum distance when selecting a valid node. Another problem that was realised after further debugging was that because the target node was over water and the heuristic value of water was infinity then whenever this was run it would check every single node for a valid path. Finally, it was found that the pathfinding algorithm was being run in every single path update, this caused the game to be extremely laggy, however, it was fairly impressive that the game still ran relatively smoothly while running the algorithm on every update. I also ensured that if the elephant had no current goals it would then wander around the area until it received a goal. Additionally, I managed to fix the bug of floating trees, this was fixed by deactivating the terrain collider. This has been an absolutely massive project for me learning so many techniques ranging from procedural generation, pathfinding and AI behaviours and I’m looking forward to implementing it into my future games.

CreatureFeature.gif

Thinking about Home

In our next project, we needed to design a video game around the theme of ‘home’ and evoke some sense of ‘home’ for the player. For this project I’m going to be working with Nick and Tristan, I’ve worked with Nick before and we both know how to work with each other so I’m looking forward to starting a new project. Some key questions to consider are:

  • What makes a place a home?
  • What does it feel like to go home?
  • What does home mean to you?
  • What are the emotions you associate with home?
  • Us home where you grew up or where you live now? Is a home just the place you live in? Is a home an abstract idea?
  • What does home feel like?

This is something that is new to me, not building a game around the central theme but instead building a game to evoke a certain emotion. It’s a new challenge to tackle in terms of game design and I’m looking forward to working on it.

gone20home20title20square

Tags:

Leave a comment