During my time working on Hex Grid Island Builder, I focused on developing a dynamic grid-based island-building game using Unreal Engine. Here are some of the key achievements and contributions:
Below is an code snippet demonstrating procedural generation in Unreal Engine:
// HexGridIslandBuilder.cpp
void AHexGridIslandBuilder::GenerateIsland()
{
for (int32 y = 0; y < GridHeight; y++)
{
for (int32 x = 0; x < GridWidth; x++)
{
FVector HexLocation = GetHexLocation(x, y);
float NoiseValue = PerlinNoise.GetNoise(x * NoiseScale, y * NoiseScale);
if (NoiseValue > WaterThreshold)
{
SpawnTile(HexLocation, LandTile);
}
else
{
SpawnTile(HexLocation, WaterTile);
}
}
}
}
FVector AHexGridIslandBuilder::GetHexLocation(int32 x, int32 y)
{
float Offset = (y % 2 == 0) ? 0 : HexWidth / 2;
return FVector(x * HexWidth + Offset, y * HexHeight * 0.75, 0);
}
void AHexGridIslandBuilder::SpawnTile(FVector Location, UClass* TileClass)
{
FActorSpawnParameters SpawnParams;
GetWorld()->SpawnActor(TileClass, Location, FRotator::ZeroRotator, SpawnParams);
}
Hex Grid Island Builder is an innovative grid-based island-building game developed using Unreal Engine. The game allows players to build and customize their islands with a variety of tiles and procedural generation techniques. This was my first game project and it includes dynamic landscapes, real-time strategy elements, and seamless performance.