1 / 17

07 C Project 3DOT team

07 C Project 3DOT team. 쥬키퍼류 블럭 게임 제작. 2007.12.18 07 서동민 , 김서희 , 권효준. 차례. 3DOT 팀 소개 Project 소개 Project 진행 과정 게임 시연 Project 내용 설명 후기 정리 및 질문. 1. 3DOT 팀 소개. 3DOT( 쩜쩜쩜 ) 팀 의미 없음 || 아무 의미 // 쩜쩜쩜 팀장 07 서동민 팀원 07 김서희 07 권효준. 2. Project 소개. 쥬키퍼 류의 블록게임 블록 위치를 움직여서

lelia
Download Presentation

07 C Project 3DOT team

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 07 C Project 3DOTteam 쥬키퍼류블럭 게임 제작 2007.12.18 07 서동민,김서희,권효준

  2. 차례 • 3DOT팀 소개 • Project 소개 • Project 진행 과정 • 게임 시연 • Project 내용 설명 • 후기 • 정리 및 질문

  3. 1. 3DOT팀 소개 • 3DOT(쩜쩜쩜) 팀 • 의미 없음 || 아무 의미 //쩜쩜쩜 • 팀장 • 07 서동민 • 팀원 • 07 김서희 • 07 권효준

  4. 2. Project 소개 • 쥬키퍼 류의 블록게임 • 블록 위치를 움직여서 • 같은 모양의 블록 연결 • 일정 조건에 따라 점수+ • 연결된 블록은 삭제 • 새로운 블록 생성 • 시간 제한 • 비슷한 게임 • 작은형의 넘버쓰리, 헥사,

  5. 2. Project 소개 • Development Tool • Microsoft Visual C++ 6.0 • Win32 Console Application • Future plans • 랜덤 블록 • 블록 이동 & 체인지 • 블록 삭제 • 조건에 따른 점수 • 제한시간 • 다양한 Color로 인터페이스 보충 • 점수,시간 +아이템

  6. 3. Project 진행 과정 • 진행 과정 • 2007-11-10공식적으로 Project 시작! • 2007-11-16 첫 회의(기획) 및 스터디 • ~18 블록 움직이기 • ~20 블록 색 입히기 및 기타 함수구현 • ~22 소스 캡슐화 및 함수 구현 • -12-01 중간 회의 및 스터디 • ~05 블록 바꾸기 함수 구현 • -12-13 마지막 회의 및 정리 • -12-18 최종 정리 및 발표자료 작성

  7. 4. 게임 시연 • 쩜키퍼

  8. 5. Project 내용 설명 • 3dot.h /* std include */ #include <stdio.h> #include <windows.h> // gotoxy() #include <time.h> // time(), time_t #include <dos.h> // gettime() #include <conio.h> // kbhit(),getch() /* #define */ /// Game #define PFORM(B) B*B*B/2 // 파괴 블럭당 점수 계산공식 B 파괴 블록 겟수 #define TFORM(B) B // 제한시간 공식 #define INITP 10 // 초기 제한시간 #define TIMEA 180 // 시간 가중치 // 키값 #define KU 72 // 위로 버튼 … #define ENTER 13 // ENTER 버튼 // 색상값 #define RED (FOREGROUND_RED | FOREGROUND_INTENSITY) … #define WHITE_BG (RED_BG | GREEN_BG | BLUE_BG) /* dd */ #include "3dotlib.h"

  9. 5. Project 내용 설명 • 3dotlib.h - 구조체 /* Struct lib */ typedef struct{ int px; // 이전칸 위치 int py; // int x; int y; int s; }S_P; typedef struct{ unsigned char i; int head_x; int head_y; int tail_x; int tail_y; }S_M; typedef struct{ time_t time_t_s; // 시작시간 time_t time_t_p; // 현재 시간 time_t time_t_g; // 게임내 시간제한용 time_t time_t_t; // temp 시간 int limit_time; // 제한시간 int rpoint; int hi_score; }S_G;

  10. 5. Project 내용 설명 • 3dotlib.h - 함수 /* 3dot project lib */ int Playgame(int array[8][8],S_P *p,S_G *g); void Nocursor(); // 커서없애기 void Gotoxy(int x, int y); // gotoxy 커서이동 void Setcolor(int color); // 커서색 변경 void Printboxtile(int x, int y,int tiletype); // 박스 그리기. void Initdraw(int arr[8][8], S_P *p,S_G *g); // 초기화후 출력 void Printtile(int x, int y,int tiletype); // 타일 그리기 void Dpdata(int array[8][8], S_P *p); // 정보출력 int Changeblock(int array[8][8], S_P *p); // 블럭 바꾸기 int Inputkey(int arr[8][8],int key, S_P *p, S_G *g); // key 입력 int Secprog(S_G *g); // 초당 실행 코드. int Pointprog(unsigned char b,S_G *g); // 점수처리 void Printdata(S_G *g); // 게임정보 출력 int Itemprog(int array[8][8],S_P *p,S_G *g); // 아이템 /* 블럭 체크 관련 함수 */ S_M Masscheck(int arr[8][8],S_G *g); S_M Masscheck_col(int arr[8][8],int col,S_G *g); S_M Masscheck_row(int arr[8][8],int row,S_G *g); S_M Downblock(int arr[8][8],S_M m);

  11. 5. Project 내용 설명 • 3dot.cpp #include "3dot.h" int main() { Nocursor(); int array[8][8]; S_P p; S_G g; g.hi_score = 0; … case ENTER: if(y==5) Playgame(array,&p,&g); // 게임 시작 //if(y==8) exitv=1; if(y==11) return 0; // 프로그램 종료 break; } Gotoxy(16,y); printf("☞"); input_key=0; Sleep(100); } return 0; }

  12. 5. Project 내용 설명 • 3dotlib.cpp – Playgame() /* ===================== Playgame 게임 시작. ------------------------------------ */ int Playgame(int array[8][8],S_P *p,S_G *g) { Initdraw(array,p,g); // 게임시작 , 초기화 while(1) { if(kbhit()) { Inputkey(array,(getch()),p); } Masscheck(array,g); if(!Secprog(g)) // 제한시간, 초당 실행 { system("CLS"); return 1; } } return 0; }

  13. 5. Project 내용 설명 • 3dotlib.cpp – Initdraw() /* ==================================== Initdraw 게임시작,변수 초기화후 화면출력 -------------------------------------------------------------- */ void Initdraw(int arr[8][8], S_P *p,S_G *g) { g->time_t_s = g->time_t_g = time(&g->time_t_s); // 시간 초기화 g->time_t_t = g->time_t_s+1; g->limit_time = INITP; // 초기 제한시간 30초 g->rpoint = 0; // 초기 점수 초기화 srand(time(0)); Setcolor(WHITE_BG|FOREGROUND_INTENSITY); // color 초기화 int x,y; for(y=0; y<8; y++) { for(x=0; x<8; x++) { arr[y][x]=rand()%8; Printboxtile(x,y,0); Printtile(x,y,arr[y][x]); } } …

  14. 5. Project 내용 설명 • 3dotlib.cpp – Initdraw() /* ==================================== 초마다 해당 코드 실행!!?? -------------------------------------------------------------- */ int Secprog(S_G *g) { if(time(0)-g->time_t_t==1){ // 이곳에 시간에 따른 내용 ㄱㄱ g->limit_time -= g->rpoint/TIMEA+1; // 제한시간 1초씩 감소,가중치 추가 Printdata(g); // 게임정보 출력 if(g->limit_time<=0){ Gotoxy(28,10); printf("┌───────┒"); Gotoxy(28,11); printf("│-Game Over ┃"); Gotoxy(28,12); printf("┕━━━━━━━┛"); g->hi_score=g->hi_score>g->rpoint?g->hi_score:g->rpoint; Sleep(5000); return 0; } // 여까지 g->time_t_t++; } return 1; } …

  15. 6. 후기 • 서동민 • 1년동안 배운 C언어로 팀을 이뤄 작업하면서 좋은 경험을 한것 같습니다. • 김서희 • 다양한 문법 공부와 새로운 경험을 할수 있어 뿌듯했습니다. • 권효준 • ㅇㅇㅇㅇㅇ

  16. 7. 정리 및 질문 • Project Board - 진행과정,내용 등등 • http://chocoss2.ibbun.net/bbs/zboard.php?id=3dot • 도움이 된 곳 • WinAPI - http://www.winapi.co.kr • Naver - http://www.naver.com

  17. 7. 정리 및 질문

More Related