완전 바닐라에서 실험 진행함





기본세트를 만들고 테스트를 진행한다

확인해보고 싶은것은

1. 벨트를 2000개 썼을 때의 UPS

2. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (1개의 surface에서)

2. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (2개의 surface에서)

2. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (1000개의 surface에서)



0. 우선 아무것도 안 했을 때 UPS

약 72000가량의 UPS가 나오는 중


1. 벨트를 2000개 썼을 때의 UPS

벨트를 2000개 설치하긴 상당히 귀찮으니 스크립트를 사용한다

function create_belt(i)

local input = game.surfaces[1].create_entity{name='transport-belt', direction=defines.direction.east, force='player', position={i*2 ,0}}

local output = game.surfaces[1].create_entity{name='transport-belt', direction=defines.direction.east, force='player', position={i*2+1,0}}


end


for i=1,1000 do create_belt(i,0) end

local input = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={1001*2,0}}

local output = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={0 ,1}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

벨트를 오른쪽으로 쭈우욱 깔아준다


2000 좌표에서 벨트가 끝나고 연결된 벨트 한쌍을 사용해서 처음위치 (0,1)로 돌아간다



45000대의 UPS가 나오는 것을 볼 수 있었다.



2. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (1개의 surface에서)

연결된 벨트를 1000쌍이나 손으로 설치하는건 미친짓이다 마찬가지로 스크립트를 사용해서 설치한다

사실 연결된 벨트 한쌍 페어 맞추려면 원래 스크립트 써야함

function create_linked_belt(i)

local input = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={i*2 ,0}}

local output = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={i*2+1,0}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

end


for i=1,1000 do create_linked_belt(i,0) end

local input = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={1001*2,0}}

local output = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={0 ,1}}

output.linked_belt_type="output"

input.connect_linked_belts(output)




벨트를 싹다 연결된 벨트로 바꿨는데도 여전히 45000근처를 오가고 있다

벨트와 유의미한 차이가 없는듯?


그럼 여러개의 surface를 오가면 어떻게 될까?



3. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (2개의 surface에서)

game.create_surface("1",{height=1,width=1})

function create_linked_belt(i)

local input = game.surfaces[(i+1)%2+1].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={i*2 ,0}}

local output = game.surfaces[(i )%2+1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={i*2+1,0}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

end

for i=1,1000 do create_linked_belt(i,0) end

local input = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={1001*2,0}}

local output = game.surfaces[1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={0 ,1}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

새로운 surface를 하나 생성했고 다른 영향을 최소화하기 위해 지도의 너비와 높이는 1로 설정이 되었다


두개의 surface를 연결된 벨트가 와리가리 타는 모습


여전히 45000대의 UPS가 나온다

surface를 건너뛰더라도 성능에는 문제가 없는 모양


2개보다 많은 surface를 사용해도 괜찮을까...?



4. 연결된 벨트를 2000개(1000쌍) 썼을 때의 UPS (1000개의 surface에서)

function create_linked_belt(i)

game.create_surface(""..i,{height=1,width=1})

local input = game.surfaces[i] .create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={i*2 ,0}}

local output = game.surfaces[i+1].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={i*2+1,0}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

end



for i=1,1000 do create_linked_belt(i,0) end

local input = game.surfaces[1001].create_entity{name='linked-belt', direction=defines.direction.east, force='player', position={1001*2,0}}

local output = game.surfaces[1 ].create_entity{name='linked-belt', direction=defines.direction.west, force='player', position={0 ,1}}

output.linked_belt_type="output"

input.connect_linked_belts(output)

연결된 벨트가 모두 각자 개인의 surface에 위치에 있게 했다


UPS가 상당히 떡락하며 1000대를 유지하는 모습

이건 연결된 벨트의 문제인걸까?


사실 이건 확인해본 결과 연결된 벨트의 문제는 아니였다

연결된 벨트를 설치하지 않고 단지 1000개의 1x1 크기 surface를 생성하기만 할 때도 이와 비슷한 UPS가 나오는 것을 확인할 수 있었다

연결된 벨트가 surface를 건너 뛰는건 UPS에 지장을 주지 않지만

여러개의 surface는 UPS에 꽤 큰 지장을 준다



번외. 풀벨트가 아니라면?

풀벨트라서 UPS드랍이 안일어나는건가 해서 풀벨 아닌경우도 만들어봄

케이스3을 반만 채운 벨트로 해봤는데 여전히 UPS 45000대가 나오는 것을 확인할 수 있음






연결된 벨트 도배가 UPS에 주는 영향을 확인해보고 싶어서 테스트 해본건데 꽤나 만족스러운 결과를 얻을 수 있었음

나중에 관련된 모드만들 때 연결된벨트 도배해서 만들꺼다 ㅋㅋ



3줄 요약

1. 벨트와 연결된 벨트의 UPS 성능은 거의 동등하다

2. 연결된 벨트는 출발지와 목적지가 서로 다른 surface이더라도 UPS에 영향을 미치지 않는다.

3. surface자체가 많은 것은 UPS에 영향을 준다