Devlog #2 - Be a good neighbor


Hey all!

Made a ton of progress since last post!

Added place-able static tiles for testing and added debugging tools to more easily preview neighboring tiles. When a path is placed, it updates the 8 cardinal and ordinal directional neighbor data of each tile. It'll also check the neighbors of ordinal tiles so we know if what we're trying to connect to already has connections.




I also started the path placing logic by checking the sprites, checking their neighbors, and changing the tiles and neighbor data. Here's a quick preview of tiles changing direction and becoming corners based on what's in proximity. Not all checks were coded yet, so in this .gif, I needed to delete / connect from certain directions for them to work.


It was so cool seeing this come together!

Then I realized... checking the neighboring sprite and doing condition checks for which sprite to change would not scale well... especially once I add forking paths and other tile mechanics later. It requires so many checks - some of them redundant.

So next steps, I'll be changing sprite references to structs that hold sprite info and socket availability. That way, I can check sockets first and if it's not a match or nothing is available, I can skip.

I might build this and make another discovery that requires me to refactor, but I'm having fun and making great progress. (:

Thanks for reading! Would love to hear your thoughts!!

Follow on twitch for Salamancy dev streams.
Follow on twitter for updates, game dev, and art.

- Tapsteady

Leave a comment

Log in with itch.io to leave a comment.