Hello. I’m a Lithuanian developer who joined on 4/13/2014
Currently, I am working on a new project where the players spawn in the first area. Every area has a unique map style, like medieval, modern or some kind of culture. Apparently I have made only 3 maps so far because I do every single step on creating a game by myself. My scripting skills are pretty decent but I am learning every once in a while more things to create something more well made and scripted. Every map has 20 boxes that every player could open to get a weapon and fight with others and as soon as you open a box the system that I scripted drops another box to keep the same amount of boxes on the map. Every single map has the same system which means that every single map has a script that runs the system I wrote. The player unlocks areas by killing people.
My main problem is, that I build everything for myself but I don’t really know what makes the game lag - heavy. I made 3 maps and its already heavy for the player who is playing on the mobile phone or console, or computer it doesn’t matter. As long as you turn your camera away from the side where is other maps are pretty fine with the lag, but once you turn your camera to further maps, it feels heavy. I can’t imagine playing on a mobile phone because it would be a terrible experience. I made walls, trees, a well, grass and other things with AUTODESK MAYA - meshes.
You can find this project here
Droping boxes script:
ss = game:GetService(“ServerStorage”)
–FOfD = ss:WaitForChild(“Weapons1”)
local MyTable = {}
MyTable[1] = ss:WaitForChild(“Weapons1”)
MyTable[2] = ss:WaitForChild(“Weapons2”)
MyTable[3] = ss:WaitForChild(“Weapons1”)
MyTable[4] = ss:WaitForChild(“Weapons2”)
MyTable[5] = ss:WaitForChild(“Weapons1”)
MyTable[6] = ss:WaitForChild(“Weapons2”)
MyTable[7] = ss:WaitForChild(“Weapons1”)
MyTable[8] = ss:WaitForChild(“Weapons2”)
MyTable[9] = ss:WaitForChild(“Weapons1”)
MyTable[10] = ss:WaitForChild(“Weapons2”)
MyTable[11] = ss:WaitForChild(“Weapons1”)
MyTable[12] = ss:WaitForChild(“Weapons2”)
MyTable[13] = ss:WaitForChild(“Weapons1”)
MyTable[14] = ss:WaitForChild(“Weapons2”)
MyTable[15] = ss:WaitForChild(“Weapons1”)
MyTable[16] = ss:WaitForChild(“Weapons2”)
MyTable[17] = ss:WaitForChild(“Weapons1”)
MyTable[18] = ss:WaitForChild(“Weapons2”)
MyTable[19] = ss:WaitForChild(“ChineseBox1”)
MyTable[20] = ss:WaitForChild(“Weapons2”)
BoxDrop = false
if BoxDrop == false then
BoxDrop = true
else
BoxDrop = false
end
while wait() do
if BoxDrop == true then
local drop = MyTable[math.random(1,20)]
wait(1)
local balldropheight = 20
local xPosition = math.random(-56, 133)
local zPosition = math.random(-140, 46)
local cloneofball = drop:Clone(game.Workspace)
cloneofball.Parent = game.Workspace:WaitForChild(“Arenas”).Creates.Area1
cloneofball.Position = Vector3.new(xPosition, balldropheight, zPosition)
wait()
end
if game:GetService(“ReplicatedStorage”):WaitForChild(“BoxCount1”).Value == 19 then
BoxDrop = false
else if game:GetService(“ReplicatedStorage”):WaitForChild(“BoxCount1”).Value < 20 then
BoxDrop = true
end
end
end
Let me know what makes the project be heavy/laggy, the main rules. Thank you