Code Monkey home page Code Monkey logo

kkutu's Introduction

KKuTu

한국어

글자로 놀자! 끄투 온라인

끄투는 여러분의 어휘력을 발휘할 수 있는 다양한 단어 게임들이 모여 있는 캐주얼 게임입니다. 로봇과 혼자서 게임을 할 수도 있고, 서버에 접속해 있는 다른 사람들과 함께 할 수도 있죠. 이 저장소는 여러분이 끄투를 즐기기 위해 준비해야 할 것들에 대해 알리고 있습니다.

설치 방법

Windows 환경

  1. 이 레포지토리를 내려받습니다.
  2. node.js 인스톨러를 내려받아 설치(버전 8 이상)합니다. npm과 함께 설치되어야 합니다.
  3. 명령 프롬프트에서 npm install -g grunt grunt-cli를 입력해 grunt를 설치합니다.
  4. PostgreSQL 인스톨러를 내려받아 pgAdmin(자동으로 설치됨)과 함께 설치합니다.
  5. pgAdmin을 실행시키고 SQL 파일(./db.sql)을 데이터베이스에 입력시킵니다.
  6. 배치 파일(./server-setup.bat)을 실행시킵니다.
  7. 배치 파일(./Server/run.bat)을 실행시킵니다.
    • 되도록 이 배치 파일을 직접 종료하지 말고 이를 실행시켜 나타나는 창을 종료하세요.

Linux 환경

  1. 이 레포지토리를 내려받습니다.
  2. 패키지 매니저를 이용하여 node.jsnpm을 설치(버전 8 이상)합니다.
  3. npm install -g grunt grunt-cli를 입력해 grunt를 설치합니다.
  4. 패키지 매니저를 이용하여 PostgreSQLpsql을 설치합니다.
  5. SQL 파일(./db.sql)을 데이터베이스에 입력시킵니다.
    1. 명령어를 다음 예와 같이 입력할 수 있습니다: sudo -u postgres psql --quiet main < ./db.sql
  6. 섈 스크립트 파일(./server-setup.bat)을 실행시킵니다. (Windows 전용 파일이지만 Linux에서도 작동합니다.)
  7. 경로 ./Server에서 다음 명령어들을 차례대로 실행합니다:
    1. (게임 서버) node lib/Game/cluster.js 0 1
    2. (웹 서버) node lib/Web/cluster.js 1

공통

  • PostgreSQL 데이터베이스 서버에 접속하기 위해 설정 파일(./Server/lib/sub/global.json)에서 PG_PASS 값을 반드시 수정해야 합니다.
  • 폴더 ./Server/lib/sub에 oAuth 설정 파일(auth.json)과 전역 설정 파일(global.json)을 반드시 만들어 주세요. 본 레포지토리에는 각 파일의 양식이 들어가 있습니다.
  • 본 레포지토리에는 WordNet 자료가 포함되어 있습니다. 서버를 운영할 때 반드시 사용자에게 이에 대한 라이선스를 안내해야 합니다.
  • 호스트 127.0.0.2는 웹 서버와 게임 서버 사이의 연결을 위해 예약된 주소이므로 이 주소를 사용하지 말아야 합니다.
  • 서버가 정상적으로 설치된 다음부터는 서버를 실행시키기 위해서 가장 마지막 단계만 수행하면 됩니다.
  • 서버가 성공적으로 열린 후 웹 브라우저에서 127.0.0.1(다른 사람들은 해당 컴퓨터의 외부 IP 주소)로 접속하여 끄투를 즐길 수 있습니다.
  • 랭킹 및 세션 기능 일부는 Redis 서버가 실행되어야만 작동합니다. 일단 이를 설치하지 않아도 서버가 작동할 수 있도록 조치했습니다.
  • Cloudflare를 이용하는 경우, DNS 탭의 status를 DNS only로 두세요. DNS and HTTP proxy (CDN)으로 둘 경우, 방 만들기와 방 입장이 불가합니다.

라이선스

English

Rule the words! KKuTu Online

KKuTu is a casual game containing various word games that let players use their vocabulary. Players can play alone with a robot, or play with other players who have entered to a server. This repository provides you what you have to prepare to play KKuTu.

How to Install

For Windows

  1. Download or clone this repository to your machine.
  2. Install node.js and npm(this will be installed automatically). The version should be ≥8.
  3. Open cmd and run npm install -g grunt grunt-cli to install grunt.
  4. Install PostgreSQL database server and pgAdmin(this will be installed automatically).
  5. Run pgAdmin and put the SQL file(./db.sql) into your database.
    • For further details, visit my blog.
  6. Run the batch file(./server-setup.bat).
  7. Run the batch file(./Server/run.bat).
    • If you want to close the server, it is recommended that closing not the command prompt window, but the window generated by the command.

For Linux

  1. Download or clone this repository to your machine.
  2. Install node.js and npm via a package manager. The version should be ≥8.
  3. Run npm install -g grunt grunt-cli to install grunt.
  4. Install PostgreSQL database server via a package manager.
  5. Put the SQL file(./db.sql) into your database.
    1. Run a command like: sudo -u postgres psql --quiet main < ./db.sql
  6. Run the shell script file(./server-setup.bat). (It is a batch file for Windows but it will also work on Linux.)
  7. Run these on working directory ./Server in order:
    1. (Game server) node lib/Game/cluster.js 0 1
    2. (Web server) node lib/Web/cluster.js 1

Common

  • You MUST edit the file(./Server/lib/sub/global.json) to connect to your PostgreSQL database server.
  • You MUST create two files(./Server/lib/sub/auth.json, ./Server/lib/sub/global.json) to turn on this server.
  • This repository contains some data from WordNet. Please provide users the license of WordNet when you operate this server.
  • The host 127.0.0.2 is reserved for connections between your web server and game server.
  • Once the server is successfully installed, you can do just the last step of above-mentioned guideline whenever you want to run the server.
  • You can open a browser and go to 127.0.0.1(or external IP address for other people) to play KKuTu.
  • Ranking and some session features require Redis server. This is optional.
  • If you use Cloudflare, you should set status of DNS Tab to 'DNS only'. The status 'DNS and HTTP proxy (CDN)' could disable to open and enter to a room.

License

kkutu's People

Contributors

chuhyeonjin avatar dalbodeule avatar ddalpange avatar dependabot[bot] avatar hatty163 avatar horyu1234 avatar jjoriping avatar kdhkr avatar kdwkr avatar kjsman avatar lshqqytiger avatar skylightqp avatar sunho avatar whskr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kkutu's Issues

예전 배경음악 파일을 얻을 수 있을까요?

2017년 1월 말(25~30일 사이)에 한시적으로 끄투 공식 서버의 대기실에서 사용되었던 통통 튀는 느낌의 BGM이 너무나도 마음에 들어서 그러는데 예전 배경음악 파일도 갖고 계신다면 그 BGM도 배포해주시면 좋겠습니다.

소셜 로그인을 사용하고자 합니다

Google과 네이버 아이디로 로그인 기능을 사용하려 하는데 어느어느 파일을 수정해야 하나요? 이전 글에서 나온 ./Server/lib/Web/lib/in_login.js.Server/lib/sub/jauth.js에만 Client ID와 Client Secret를 입력했더니 작동을 안 하는 것 같습니다.

서버 접속시 에러가 발생하고 종료됩니다..

events.js:160 throw er; // Unhandled 'error' event ^ Error: bind EACCES null:80 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at cb (net.js:1324:16) at rr (cluster.js:625:14) at Worker. (cluster.js:594:9) at process. (cluster.js:765:8) at emitTwo (events.js:111:20) at process.emit (events.js:191:7) at process.nextTick (internal/child_process.js:744:12) at _combinedTickCallback (internal/process/next_tick.js:67:7)
[2017-02-17 13:35:49] Exit web server #1
Worker 6092 died
W: CLOSED WITH CODE 0
를 내뿜고 웹브라우저 상에서는 404가 발생합니다.
주소는이곳입니다

맥에서 서버가 열리지 않습니다 (ws부분인것 같은대..)

맥에서 끄투 서버를 열려고 하면 게임 서버는 잘 열리지만 왭서버에서는

/Users/helloyunho/Downloads/KKuTu-master/Server/lib/node_modules/ws/lib/WebSocket.js:219
    else throw new Error('not opened');
         ^

Error: not opened
    at WebSocket.send (/Users/helloyunho/Downloads/KKuTu-master/Server/lib/node_modules/ws/lib/WebSocket.js:219:16)
    at /Users/helloyunho/Downloads/KKuTu-master/Server/lib/Web/main.js:94:26
    at Array.forEach (native)
    at Timeout._onTimeout (/Users/helloyunho/Downloads/KKuTu-master/Server/lib/Web/main.js:93:15)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
Worker 10980 died

이러면서 안열립니다.

리눅스로 가상머신 했을때는 잘 되었지만 가상머신 내에서만 접속이 가능해서 포기했습니다...

방을 새로 만들면 서버에서 연결이 끊어집니다.

http://0xbof.me/

[2017-02-17 22:08:15] Chan @0 Msg #O0xA0J5ZNw2c35buTWuxhYgaLVnkD4QA: {"type":"enter","title":"회원님의 방","password":"","limit":"8","mode":"3","round":"5","time":"60","opts":{"injpick":[],"manner":false,"injeong":true,"mission":false,"loanword":false,"proverb":false,"strict":false,"sami":false,"no2":false}}
// 연결이 끊어졌다고 나옴
[2017-02-17 22:09:55] Exit #O0xA0J5ZNw2c35buTWuxhYgaLVnkD4QA

GM설정을 어떻게 하나요?

끄투 공식 서버에서는 GM은 [GM] 이라고 닉네임 앞에 붙은 걸 본 적이 있는데, 그것을 어떻게 설정하는지 궁금합니다. 단순하게 /server/lib/sub.global.json 파일을 수정하는 것만으로는 설정이 안 되네요.

데이터 베이스에 단어 추가하는 방법

  1. 만약, 플레이어들에게 단어 건의를 받았을 경우, 데이터 베이스에 단어를 추가하는 방법을 알고 싶습니다.

  2. 만약, 국립국어원에서 허가를 받고 국어표준어대사전에서 데이터 베이스를 받으면, 어떤식으로 등록하여야 하나요?

노란색 팝업창 띄우는 방법...

제목 그대로 입니다. 저번에, 끄투 공식서버가 잠시 닫힐 때 노란색 팝업을 띄었는데, 그것을 프리 서버에서 띄우는 방법을 알려주시면 감사하겠습니다.

셧다운제

셧다운제를 적용할려는데 ajae.js 파일을 올려주실 수 있을까요?

끄투는 어떤 포트를 사용하나요?

웹서버인 IIS하고 끄투를 동시에 돌리다보니
끄투 웹서버에 다른 포트를 활당해서 쓰고 있습니다. 그리고 게임서버를 2개 운영 중인데
여기까지해서 총 6개에 포트를 쓰더군요.
게임서버 2개 운영 시 허용이 필요한 포트가 더 있나요?

웹서버 포트와 게임서버 2개 포트 그리고 나머지 3개는 어디에 쓰이는지 모르겠네요.
10000번대 2개와 9000번대 포트입니다.

관리자(GM) 이 방에서 추방되는 것에 관련하여

관리자(GM) 을 방에서 추방하지 못하도록 하는 등의 조취를 취하여 합니다.

notice(getKickText($target.profile, data.kickVote));

이부분에서 아이디가 관리자 목록에 추가되어 있지 않을 경우에만 실행하도록 수정하려 하는데,
위 방법대로 수정을 하면 가능할지 조언좀 부탁드립니다 ㅠㅠ..

감사합니다.

셧다운제 로그인

셧다운제 주석을 해제하고 ajae.js를 넣고 로그인 해보니
Bad Request라 뜨네요. 해결 방법이 없을까요?

소셜 로그인에 대해 문의 드립니다.

게임 실행 이슈는 node.js 업데이트(제 버전이 4.x더라구요;;)를 통해 해결했습니다. 감사드립니다!
다만 소셜 로그인에서 ./Server/lib/sub/jauth.js를 수정하고 또 해야할 작업이 있나요? OAuth 인증용 키를 입력했습니다만 인증 요청이 제대로 가지 않네요. (client_id=????????????????)
또한 트위터 OAuth 인증 부분이 주석처리 되어있는 것 같은데, 활성화 하거나 추가해야 할 코드가 있는지 알려주시면 감사드리겠습니다.

코드 검증 서비스 사용

Travis같은 코드 검증 서비스를 이용하는게 어떨까요?

미처 발견하지 못한 오류를 막을수도 있고 코딩 스타일 단일화를 위해서는 있었으면 좋겠다고 생각합니다.

서버 구축중 궁금한점 있어서 이슈 남겨봅니다.

일단 끄투 소스 공개에 매우 감사드립니다.
끄투 서버 구축중 궁금한점 두가지 있어서 이슈 한번 남겨봅니다.

  1. 끄투서버 구동후 들어가보니 서버 목록에 감자서버밖에 없더군요, 끄투 본서버처럼 서버를 감자, 냉이... 등등으로 어떻게 나누는지 궁금합니다.

  2. 웹 클라이언트에서 끄투 관리자 페이지에 들어가는 법과 끄투 DB에 단어를 추가하는 방법이 궁금합니다.

단어 데이터베이스

로그인 후 봇끼리 대전을 시켜봤는데 첫 턴을 계속 못넘기네요.
사전 메뉴에서 검색을 해도 결과가 안나옵니다.
현재 DB 상태는 다음과 같은데 이유가 뭘까요?

schemaname |     relname     | n_live_tup
------------+-----------------+------------
public     | kkutu_ko        |     431399
public     | kkutu_en        |     147023
public     | kkutu_manner_ko |       1983
public     | kkutu_manner_en |       1496
public     | kkutu_cw_ko     |        462
public     | kkutu_shop_desc |         80
public     | kkutu_shop      |         80
public     | session         |          3
public     | users           |          1
public     | kkutu_injeong   |          0

네이버 소셜 로그인

질문하겠습니다.

  1. jauth.js 40-41번째 줄에 클린트 아이디랑 시크릿 아이디 작어야 하는게 맞죠?

그리고 또 19-20 줄에도 아이디랑 시크릿 적어야 하죠?

  1. in_iogin.js에 몇번째 줄을 수정해야 네이버 소셜 로그인이 정상적으로 작동할까요?

  2. 그외에 수정할게 있나요?

끄투 meta tag 추가 건의

쪼리핑님께서도 그렇고 다른 개발자분도 끄투 리스트 같은 것을 만드시는 분이 많습니다.

끄투 리스트를 만든다면 그 끄투 리스트 안에서 플레이어가 얼마나 접속해있는지 같은 정보를 파악하려면 서버 상태를 표시하는 부분을 해석하여 표시해주어야 합니다.

하지만 쉽게 파싱해올 수 있는 부분을 만든다면 어떨까요?

메인 페이지에

이런식으로 파싱해올 수 있는 기반을 만들어 놓는 것입니다.

type 는 어떤 소스를 기반으로 제작되었는가. 를 나타내는 tag, playeramount 는 페이지가 로드될 때를 기준으로 플레이어가 얼마나 접속해있는지 를 나타내는 tag 입니다.

한번 좋다고 떠오른 아이디어를 이슈에 남겨 건의해봅니다.

관리자 관련 기능, 단어 뜻 관련 질문

  1. 특정 사용자 또는 아이피를 블록하거나 생성된 비밀 방에 강제로 들어가는 등의 기능이 있는지 여부가 궁금합니다.
  2. 현재 프리 서버는 기본적으로 단어 뜻이 데이터베이스에서 빠져있는데, 이것을 따로 저작권관련 요청 등을 하여, 추가할 수 있는지 여부가 궁금합니다.

감사합니다.

끄투를 모바일로 제작하려고 합니다만,

db.sql, 시/청각 리소스 및 데이터 (모드, 결과 계수, 스코어 계수등등)

만을 사용하고, 그 외에는 직접 개발해도 GPL 라이센스를 적용하여 서버 및 클라이언트 소스를 모두 공개해야하나요?

뭐가 문제일까요...

제가 소셜 로그인쪽을 건들였습니다. 또 제가 뭘 건들였는지 에러가 뜨네요.

환영합니다.
[2017-02-21 11:06:38] << KKuTu Server:8496 >>
C:\KKuTu-master\Server\lib\sub\jauth.js:40 client_id: 0U_0Ji4MrXXXXXXXXX, ^^^^^^^^^^^^^^^^^^^ SyntaxError: Unexpected identifier at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\KKuTu-master\Server\lib\Web\main.js:28:14) at Module._compile (module.js:570:32)
Worker 8160 died
W: CLOSED WITH CODE 0
[2017-02-21 11:06:39] Master DB is ready. [2017-02-21 11:06:39] DB is ready.

클린트 아이디는 보안상 가리겠습니다. 해결방법 까지 알려주시면 좋겠어요.

서버 포트/소셜 로그인

소스 공개 먼저 감사드립니다.

문서에 서버 포트 변경 방법과 소셜 로그인 관련 수정이 필요한 곳 설명이 있었으면 좋겠습니다.

round_start.mp3에 관련해서...

round_start.mp3를 교체하려고 합니다만, 기존 음원보다 약 1초정도 더 깁니다.
그래서인지, 뒷부분이 잘리면서 게임이 바로 시작되네요.
round_start 재생시간을 늘리고 싶습니다. 어떻게 해야하나요?

'불러오는 중... 앞으로 1'에서 클라이언트가 멈춥니다.

원본 node.js 웹서버로 접속하면 문제가 없는데, 100번 포트로 설정을 하고 Nginx를 Reverse Proxy로 두고 원본 웹서버로 연결을 하니 서버 선택 후 '불러오는 중... 앞으로 1'에서 멈추는 문제가 발생합니다.
로그를 뜯어보니 게임 서버에는 접속이 되지 않았고, 웹서버 로그에선 127.0.0.1로 연결되어 Nginx가 제대로 Reverse Proxy로서 작동을 하고 있는 것 같습니다.
웹서버와 게임 서버 사이에서 연결 문제가 일어난 것 같은데, 어떤 문제일까요?

끄투 위키

Github 위키 기능을 사용하는게 어떨까 싶습니다. 사용법이나 설치법, 문제 해결 등등의 공유가 좀 더 체계화 될거라고 생각합니다.

끄투 이미지 사용 질문

서버와 함께 배포된 파일 안에 이미지를 써도 될까요?
(카페, 옐로아이디 등)

쓰게된다면 GPL 라이센스를 지키면되나요?

게임 서버의 master.js 부분에 대해 문의를 남기려고 합니다.

라즈베리파이 모델 3B에서 운영하기 위하여 삽질을 하고 있습니다.
로비까지는 문제가 없는데, 방을 만드려고 시도하면 /Server/lib/Game/master.js의 139라인(확실한지는 모르겠습니다.), Cluster.on('mes~', function(worker, msg) {} 부분의 msg 인자가 선언되지 않은걸로 나옵니다. (TypeError: Cannot read property 'type' of undefined 혹은 비슷한 에러 문구)
인자를 제대로 함수로 넘겨주지 못하여 발생한 에러로 추정하고 있습니다만, 혹시 이에 대한 해결 방법이나 원인을 알 수 있을까요? 없다면 다른 오류를 고치기 위해 임의로 코드를 수정한 것이 문제였을 수 있을까요?

서버 관리자 관련

default

서버 관리자로 서버닫기 명령을 입력 하면 이런오류가 발생합니다.
끄투 게임내에서 소모품류 아이템 사용시에도 이런 비슷한 오류가 가끔 나더군요.
계속 놔뒀지만 저 혼자 힘으론 안될것 같아서 다시한번 이슈 열어봅니다.

한글 도메인을 http://jjo.kr/kkutu 서버리스트에 추가할 수 없는 문제

서버 리스트 추가시 http://끄투.한국 으로는 인증 파일 자체를 못찾아, 소유권 인증이 정상적으로 안됩니다.
인식이 안되는 인증 파일: http://끄투.한국/kkutu-dHA6Ly/rqY.html

현재는 변환된 주소인 http://xn--vz0b065d.xn--3e0b707e 로 서버 리스트에 등록해둔 상태입니다.
현재 올려둔 인증 파일: http://xn--vz0b065d.xn--3e0b707e/kkutu-dHA6Ly94bi.html

감사합니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.