(WIP) Naval Combat + Roguelike

I have been working on a rogue like centered around naval combat. In this blog post I will detail my progress and talk about some interesting parts of the project.

World Generation

I have been working on a world map that the player has to navigate from the left to right. Every hexagonal tile will have a random chance of having either a battle, treasure, or random event similar to other rogue-like games.
The visuals are still a prototype, but I’m very happy how it has turned out so far. The effect is purely shader based using a height map. There is no mesh being generated.

To create the effect I used an algorithm that is similar to wave function collapse to generate 2 tree-like connected graphs at each side. Towards the center of the map the rivers are more narrow compared to the edges.
After that I connect both trees at specific locations and I make sure that the new connections make it possible to reach one end of the map from the other.
For each tile I draw a circle on a Render Texture depending on the size of the tile and then I draw the connections using lines that smoothly connect the circles.
After all the circles and lines are drawn to a Render Texture I process the texture using the Signed Distance Function texture processing technique described in this paper. https://lnkd.in/gV6vHi_c
Lastly I wrote a custom shader that interprets the values in the signed distance field texture as height to get the direction of the normal at each pixel and use the same height value to choose a color from a color gradient.


Posted

in

, ,

by

Comments

Leave a comment