Pandora: devlog #2

This post will be a bit shorter than the last, but hopefully much more interesting. I have started blackboxing the game! The idea is to quickly prototype basic systems of the game: movement and pathing, AI, saving and loading player progress and even stuff like sound effects and how the UI will display all relevant information.

I have spent the last couple of days working on movement and pathing. This also meant I had to work out the controls and camera – and it was surprisingly harder than I thought. I always wanted to have some kind of teleport skill in the game and naturally that was one of the first things I added to the prototype. But unfortunatelly my very simple “follow the player” camera wasn’t really a good fit for cases where the player instantly moved a big distance away from his original location.

What happened was that the camera also instantly changed its position – so everything on the screen changed at once. This was very confusing even for me – and I knew what was happening. I can only imagine the utter confusion a new player would feel!

So one solution I tried was to introduce a delay to the camera, so that it kind of “lagged” behind the player. This solved the problem during the teleportation – the camera now nicely “snapped” to the target position over a short period of time. But for regular movement, this felt weird. I want the game to be full of action and tense moments and this laggy camera didn’t feel good.

After experimenting with different settings I have arrived at a compromise that felt much better: during regular movement, the camera follows the player instantly and only when the teleport is used it smoothly approaches the target location. After a bit of tweaking (delay/speed) I think I have a good camera now. Maybe I will make a couple of changes later, but its a good starting point.

Now regarding pathfinding – I decided to NOT implement a full raycast pathing system on my own. A working prototype is not hard to do and I hacked something together over the weekend, but the amount of features needed and all the corner cases that started to show up persuaded me that I should just look for some good solution on the internet. So I used my budget for January and February to get Aron Granberg’s stellar A* library (pun intented). It works perfectly and does everything I need (and much more!). Also I was lucky to get the PRO package with a big discount 😉

Now I promised this post will be a lot more interesting. To make good on that promise, here is a short vide of the prototype in action. You can see proper pathing and movement, some enemy following the player around and also the behavior of the camera when I use teleportation (at the end). Check it out:

That is all for now. In the next post I will show you some interaction with the world – traps and doors. And perhaps even a few thoughts about how I plan to implement saving and loading. Stay tuned!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.