# 게임 실행 연동 (2025.07.22 업데이트)

# 01. CDN 라이브러리


구분 lib Path
패키징 방식 - 패키징(런처/점검/화이트유저) lib : /libs/stove-js service/latest/launcher-pack.js
개별 방식 - 런처 lib : /libs/stove-js-service/latest/launcher.js
  • 점검 lib : /libs/stove-js-service/latest/maintenance.js
  • 화이트리스트 lib : /libs/stove-js-service/latest/white-user.js |

# 02. 라이브러리 연결하기


  • script 태그 위치
    • head 태그 또는 body 태그 가장 하단에 정의 합니다.

# 02.A. head 태그 정의


  • 예시코드
<html>
<head>
    <meta charset="UTF-8">
    <title>stove launcher</title>
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/launcher.js" defer />
    <script>
        function runLauncher() {
// 런처 실행 코드
        }
    </script>
</head>
<body onload="initLauncher">
    <button onclick="runLauncher">게임 실행</button>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 02.B. body 하단 정의


  • 예시코드
<html>
<head>
    <meta charset="UTF-8">
    <title>stove launcher</title>
    <script>
        function runLauncher() {
// 런처 실행 코드
        }
    </script>
</head>
<body>
    <button onclick="runLauncher">게임 실행</button>
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/launcher.js" defer />
</body>
</html>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# 03. 연동 방식


  • 사용 목적과 정책에 따라 패키징 방식과 개별 방식으로 연동 할 수 있습니다.

# 03.A. 패키징 방식 연결하기


  • 패키징 방식 연동은 런처실행/점검/화이트리스트 를 한번에 연동하는 방식 입니다.
<html>
<head>
    <meta charset="UTF-8">
    <title>stove launcher</title>
</head>
<body>
    // ...컨텐츠 내용 생략
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/launcher-pack.js" defer />
</body>
</html>

1
2
3
4
5
6
7
8
9
10
11

# 03.B. 개별 방식 연결하기


  • 개별 방식 연동은 사용 기능에 따라 각 기능(런처실행/점검/화이트리스트) lib 를 연결 합니다.
<html>
<head>
    <meta charset="UTF-8">
    <title>stove launcher</title>
</head>
<body>
    // ...컨텐츠 내용 생략
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/white-user.js" defer />
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/maintenance.js" defer />
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/launcher.js" defer />
</body>
</html>

1
2
3
4
5
6
7
8
9
10
11
12
13

# 04. 런처 실행


  • launcher.run({}) 메서드를 통해서 STOVE 런처를 실행 합니다.

# 04.A. Parameter


Parameter Type Requirement Default Value Description
gameId String Y - 게임 아이디 또는 게임 넘버
nation String N KR 쿠키값 NNTO 쿠키 정보가 없는 경우 defaultValue = ‘KR’
lang String N EN 쿠키값 LOCALE 쿠키 정보가 없는 경우 defaultValue = ‘EN’
inflow_path String N - 게임 아이디와 동일
isSkipMaintenance Boolean N false 점검 체크 유무 - 기본 점검 체크 함.
gameMarketName String N PC_MARKET 웹에서 런처 실행 시 defaultValue = ‘PC_MARKET’
executeWaitingTime Number N 5 실행 딜레이 만료 체크 시간(초 단위)

# 04.B. Example


  • 런처 메서드(launcher.run({}))를 호출하면 응답값으로 Promise 객체의 then 과 catch 메서드를 통해 결과값을 받을 수 있습니다.
window.stoveJsService.launcher.run({
    gameId: 'STOVE_EPIC7',
    nation: 'KR',
    lang: 'KO',
    isSkipMaintenance: true
})
.then(data => {
    console.log('런처 실행 성공시 처리', data);
})
.catch(error => {
    console.log('런처 실행 실패시 처리', error);
});
1
2
3
4
5
6
7
8
9
10
11
12
  • 사용예제
<html>
<head>
    <meta charset="UTF-8">
    <title>stove launcher</title>
    <script src="https://js-cdn.gate8.com/libs/stove-js-service/latest/launcher-pack.js" defer />
    <script>
        function initializeJsService() {
            window.stoveJsService = window.stoveJsService || {};
        }

        function startLoadingForLauncher() {
// 런처 실행 로딩 시작 UI 처리
        }

        function stopLoadingForLauncher() {
// 런처 실행 로딩 종료 UI 처리
        }

        function errorHandler( errorCode ) {
            switch (errorCode) {
                case 601:
// 런처가 설치되어 있지 않습니다. 런처를 다운로드한 다음 설치해주세요.break;
                case 602:
// 런처 URI가 없는 경우 반환합니다.break;
                case 'API 리턴 오류 코드':
// 런처, 점검 그리고 화이트유저 api 호출 시 발생한 오류에 대한 처리가 필요한 경우 case 추가 정의break;
                default:
// 기타 오류 공통 처리break;
            }
        }

        function runLauncher() {
            if (!window.stoveJsService.launcher) {
                alert('현재 런처 실행 준비가 되어 있지 않습니다!')
                return;
            }

            startLoadingForLauncher();

            window.stoveJsService.launcher.run({
                gameId: 'STOVE_EPIC7'

            }).then(() => {
// 런처 실행 성공 시 처리

            }).catch(error => {
// 런처 실행 실패시 처리errorHandler(error.code)

            }).finally(() => {
                stopLoadingForLauncher();
            });
        }
    </script>
</head>
<body onload="initializeJsService">
    <button onclick="runLauncher">게임 실행</button>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

# C. Error Code


Error Code Constant Description
601 NOT_FOUND_LAUNCHER 클라이언트 환경에 런처 설치가 안되어 있는 경우 반환
602 NOT_FOUND_PROTOCOL_URI 런처 URL이 없는 경우
503100 GAME_MAINTENANCE 실행한 게임 서비스가 점검 중일 때 반환
- - 각 API의 응답 개별 코드 else 처리 Error Status Handling List 참고
Last Updated: 2025. 7. 22. 오전 8:15:58