How did they do this?!

Ello!

So in this game: 🏖️Roblox but every second the baseplate grows +1 - Roblox somehow they got a part bigger then 2048 studs, how did they do this? I’m pretty sure they didn’t use multiple parts since I am not seeing any seams.

I was able to get a mesh bigger then 2048 using a SpecialMesh, but it has no collisions :(.

EDIT: I realized that it stops at 4096 studs. so the probably just used 4 parts. but how could I go over this limit?

1 Like

Just use multiple parts and scale the edges as it grows. Eventually the engine will probably not bother drawing parts that are too far away though.

If you want to use the mesh solution (assuming it scales to the sizes you want and you can’t get the mesh to collide) you can since this is a baseplate just have a large invisible part on the client follow the player on the x,z plane every heartbeat to give collisions. This should be done on the client.

3 Likes

the method of having a moving collision underneath the player is a great idea. but how would I stop the player from moving off of the baseplate and just walking on air?

2 Likes

You can clamp its position to the size of the baseplate.

You’ll have to account for the size of your platform. So like X has to be less than BaseplateSize.X - 1/2*collisionPlate.SizeX. (This assumes the baseplate is at the origin). you have to account for positive and negative of both x and z.

2 Likes

Would this be better for performance then using this script that I wrote? every second it makes parts that fill in the area:

-- Configuration
local size = Vector3.new(200,30, 290)    -- Desired total size to fill
local position = Vector3.new(0, 0, 0)         -- Starting position in the workspace
local maxPartSize = Vector3.new(2048, 2048, 2048) -- Maximum allowed size per part
local maxPartsPerModel = 15                 -- Maximum number of parts per model

-- Function to split a single dimension into chunks not exceeding max size
local function splitDimension(totalSize, maxSize)
	local chunks = {}
	local remaining = totalSize
	while remaining > 0 do
		local currentSize = math.min(remaining, maxSize)
		table.insert(chunks, currentSize)
		remaining = remaining - currentSize
	end
	return chunks
end

-- Main function to create parts efficiently
local function createEfficientParts(size, position, maxPartSize, maxPartsPerModel)
	-- Split each axis into appropriate chunks
	local chunksX = splitDimension(size.X, maxPartSize.X)
	local chunksY = splitDimension(size.Y, maxPartSize.Y)
	local chunksZ = splitDimension(size.Z, maxPartSize.Z)

	-- Calculate total number of parts needed
	local totalParts = #chunksX * #chunksY * #chunksZ
	print(string.format("Total parts needed: %d", totalParts))

	-- Calculate how many models are required
	local modelsNeeded = math.ceil(totalParts / maxPartsPerModel)
	print(string.format("Number of models needed: %d", modelsNeeded))

	-- Initialize the first model
	local currentModel = Instance.new("Model")
	currentModel.Name = "Parts_Model_1"
	currentModel.Parent = workspace
	local partCount = 0
	local modelCount = 1

	-- Initialize starting positions
	local currentPosX = position.X
	for xi, chunkX in ipairs(chunksX) do
		local currentPosY = position.Y
		for yi, chunkY in ipairs(chunksY) do
			local currentPosZ = position.Z
			for zi, chunkZ in ipairs(chunksZ) do
				-- Check if current model has reached the part limit
				if partCount >= maxPartsPerModel then
					-- Create a new model
					modelCount = modelCount + 1
					currentModel = Instance.new("Model")
					currentModel.Name = "Parts_Model_" .. modelCount
					currentModel.Parent = workspace
					partCount = 0
				end

				-- Create a new part with the current chunk size
				local part = Instance.new("Part")
				part.Size = Vector3.new(chunkX, chunkY, chunkZ)
				-- Calculate the center position for accurate placement
				part.Position = Vector3.new(
					currentPosX + chunkX / 2,
					currentPosY + chunkY / 2,
					currentPosZ + chunkZ / 2
				)
				part.Anchored = true                    -- Prevent physics from moving the part
				part.CanCollide = false                 -- Optional: Improve performance by disabling collisions
				part.Parent = currentModel              -- Parent to the current model
				partCount = partCount + 1

				-- Update Z position for the next part in the Z-axis
				currentPosZ = currentPosZ + chunkZ
			end
			-- Update Y position for the next layer in the Y-axis
			currentPosY = currentPosY + chunkY
		end
		-- Update X position for the next column in the X-axis
		currentPosX = currentPosX + chunkX
	end

	print("Parts creation completed.")
end

-- Execute the part creation function with the specified parameters
createEfficientParts(size, position, maxPartSize, maxPartsPerModel)

You would have to test to know for sure, but probably. It only matters if the script you just supplied is slow enough to cause issues though.

The proposed script is fast because it simply updates the position of a part every frame which is a relatively cheap operation. Making new objects is pretty slow, but again it only matters if it’s actually causing performance issues as is.

1 Like

Awesome thanks so much! I’m going to try your way first since it seems better to me then creating 50 parts every second.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.