3

Easy RTS Pathfinding System & $0 Budget Textures: Deterrence - Video Devlog...

 2 years ago
source link: https://dev.to/piscesstudios/easy-rts-pathfinding-system-0-budget-textures-deterrence-video-devlog-2-710
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Cover image for Easy RTS Pathfinding System & $0 Budget Textures: Deterrence - Video Devlog 2

Easy RTS Pathfinding System & $0 Budget Textures: Deterrence - Video Devlog 2

A tower defense mixed with real-time strategy where you repel attacking sentient AI robots until they give up.

$0 Budget Terrain Textures

Making textures for terrain is pretty straight forward work, but I found that getting pictures of the ground on an overcast day is best. The overcast allows for the ground to be lit and have no shadows. Next part is the guess and check work, find the best photos and make them square while keeping an eye out for anything that stands out which would make textures look repetitive. Whatever photo you take, you'll always have seams when you put them side by side; I found a nice online tool that will make your textures seamless here.

An Easy RTS Pathfinding System

This easy pathfinding system I've put in the game is very similar to Dijkstra's algorithm. The unit will move on a grid. The unit will test for a collision with a block before moving to the next grid point. The unit can only rotate to 1 of 8 directions that lead to neighboring points.

The whole path is mapped out in a single frame within a loop. With this method you can see the path without traversing it and see the distance of that path made. Next I added four different rotation patterns to plug into the pathfinding method: Always clockwise, Always counterclockwise, starting with counterclockwise and alternating, and starting with clockwise and alternating.

Of the four paths made, the one with the least points is chosen. And finally, before the unit begins it's journey, the path is refined by getting rid of junk points. This way, only key points without a block between them exist.


If you would like to follow me on my game dev journey, don't forget to subscribe or follow on social media!

Facebook - https://www.facebook.com/DeterrenceGame/
Twitter - https://twitter.com/DeterrenceGame
Instagram - https://www.instagram.com/deterrencegame/
Discord Server - https://discord.gg/CjAybsdq
IndieDB - https://www.indiedb.com/games/deterrence


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK