Hey, So I’m working on an open sea type game, where you sail and find islands and explore,
but I can’t seem to generate 10k/10k or even 8k/8k water map to build the islands on?
Main Problem
Every time I try and run this, it takes and hour then studio crashed When generating
Why I need this
You might think this is big, but imagine a sea where you have 4 islands, a few underwater places, and not far to sail before you are repeating yourself… exactly! that’s why I need a big place, and I do fully understand this will take time to build, which I have, this is a big project after all.
Ways I could fix this
So, I have found one main way to fix this, game transferring, where when you come up to an island you get teleported to a different game supporting that island, here are comes the problems, servers will be way less fun, as they will have to be closed and less players, won’t be able to play with friends unless at the same island, and won’t have solid exploration/sailing, and just won’t be an actual open sea.
Your input
I really really need your help and suggestions with this, make sure to reply with your input/thoughts, thanks!
I love your idea, definitely sounds intriguing.
Now, if you think that would cause more lags, I think you might need to make a smaller sea[ you still can have 4 islands]
Not always 'The bigger the map is, the better the game is’
my idea is to make a giant part that have the color of the sea, and where ever you go, a terrain get’s generated at the position of the player’s camera
yes, as he said you can load and unload voxels, basicly the vertual cells that can be filled with terrain. this way you only have water around the camera
I’m not too sure if you understand that I’m trying to say, so my idea is to do this in a local script
Clear all water
Create a ball of water at the position of the player’s camera
Clear all water above sea level
and boom you’re good to go, if posible you should try to make the ship float on water
and for swimming, you can just make water around the player’s character as well
take a part and let it follow the players x,z position
when the player is inside it (you could detect it with region3) parent a posy position or something similer to the players root part. so he keeps (floating)
you can apply effect like bloom and color correction to the lighting as well and axtivate them when tje camera is under water aka in thw region 3
Alright listen, asking people to make assets and scripts for you is against the rules of developer forum, but I did make the script, next time please try your best to make the script youself.
Also, change the WaterSize variable to make the water bigger.
And make sure that there is a part called “WaterRef” in your workspace.
Put this script in a LocalScript in the StarterPlayerScripts
--Configuration
local WaterSize = 40;
--Services
local RunService = game:GetService("RunService");
--Assets
local Terrain = game.Workspace:WaitForChild("Terrain");
local WaterRef = game.Workspace:WaitForChild("WaterRef");
--User
local Player = game.Players.LocalPlayer;
local Camera = game.Workspace.CurrentCamera;
local Character;
local HumanoidRootPart;
--Variables
local CreateSize = Vector3.new(WaterSize, WaterSize, WaterSize);
local ClearSize = (CreateSize * 2);
--Functions
local function GetWaterRefTop()
--Get the top position of the water ref
return (WaterRef.Position.Y + (WaterRef.Size.Y / 2));
end
local function ClearWater(Position)
--Create the region
local Region = Region3.new((Position + (ClearSize * -1)), (Position + ClearSize));
--Clear all water neaby
Terrain:ReplaceMaterial(Region, 4, Enum.Material.Water, Enum.Material.Air);
end
local function CreateWater(Position)
--Create the water
Terrain:FillBlock(CFrame.new(Position), CreateSize, Enum.Material.Water);
--Cut off all water above the sea level
Terrain:FillBlock(CFrame.new(Position.X, (GetWaterRefTop() + (WaterSize / 2)), Position.Z), CreateSize, Enum.Material.Air);
end
RunService.RenderStepped:Connect(function()
--Get needed assets and variables
Character = Player.Character;
if Character then
HumanoidRootPart = Character.PrimaryPart;
end
local CameraPosition = Camera.CFrame.Position;
CameraPosition = ((CameraPosition * Vector3.new(1, 0, 1)) + Vector3.new(0, GetWaterRefTop(), 0));
--Clear all water near the Camera and the character
ClearWater(CameraPosition);
if HumanoidRootPart then
ClearWater(HumanoidRootPart.Position);
end
--Create water near the Camera and the characer
CreateWater(CameraPosition);
if HumanoidRootPart then
CreateWater(HumanoidRootPart.Position);
end
end)