【正文】
square piece Abstract : In the era of highspeed development of electronic of information, puter game has enter people’s daily life, bee an amusement adapt to old and young. But game design is a bination of fastmoving technology ,the plexity of integrating design,art,audio and software into a single production,so this thechnology isn’t known by everyone .uptodate,there are few people work at game design all the same,whereas,thedevelopment of game industry more faster than traditional industry as home appliances and automobile,by the reason of this situation,the education and training of person with ablity of game design drop behind the development of game industry. The Russian square piece is a getaway drama with all proper old young ,it carry out to be constitute by four pieces of colours of exact square piece ,then save in one four chemical elements of the piece set ,random creation dissimilarity of calculator seven the square piece of the category type ,control it according to the calculator clock in certain time continuously creation , the customer is inside out according to four directions key control of the keyboard ,to left ,rightwards and get down ,(the realization of the control key is to be carry out by the event handing of the direction key of the keyboard) Then the procedure pileds according to these seven kinds of square pieces various different model. The thesis has described the game history ,has developed this game history ,has developed this game environment, development significance of game .Knowledge abiding by a software engineering ,definition begins from software problem ,proceed to carry out feasibility study ,need analysis ,essentials design,the at last has carried out a testing on the software engineering knowledge hierarchy .The puter games design and practice are designed o eclipse developing platform with C++ developing instrument ,under Microsoft Windows XP system this time.Key Words: electronic game calculate way C++ test目 錄1引言 1 1 22需求與算法分析 3 3 游戲需求 3 4 游戲形狀(方塊)需求 4 5 5 53系統(tǒng)功能實(shí)現(xiàn) 7 7 8 9 11 13 15 游戲區(qū)域繪圖的實(shí)現(xiàn) 16 游戲方塊繪制 20 煙花燃放功能 224功能測試 24 24 24 27 285總結(jié) 29[參考文獻(xiàn)] 30致謝 31┊┊┊┊┊┊┊┊┊┊┊┊┊裝┊┊┊┊┊訂┊┊┊┊┊線┊┊┊┊┊┊┊┊┊┊┊┊┊ 畢業(yè)設(shè)計俄羅斯方塊的程序設(shè)計1引言計算機(jī)游戲產(chǎn)業(yè)在隨著網(wǎng)絡(luò)的發(fā)展有了長足的發(fā)展。 俄羅斯方塊是一個老少咸宜的小游戲,它實(shí)現(xiàn)有四個正方形的色塊組成,然后存儲于一個數(shù)組的四個元素中,計算機(jī)隨機(jī)產(chǎn)生七種不同類型的方塊,根據(jù)計算機(jī)時鐘控制它在一定的時間不停的產(chǎn)生,用戶根據(jù)鍵盤的四個方向鍵進(jìn)行向左,向右,向下,翻轉(zhuǎn)操作。然后程序根據(jù)這七種方塊折疊成各種不同的類型。游戲最早起源于純文字的交互游戲MUD,MUD是英文Multiuser Dungeons的縮寫。隨著電子元器件的發(fā)展,電子產(chǎn)品迅速發(fā)展。然后程序根據(jù)這七種方塊堆疊成各種不同的模型?;贛FC的程序設(shè)計具有執(zhí)行高效的特點(diǎn),跟windows的契合比較好,但不具有跨平臺能力。游戲區(qū)域繪圖的實(shí)現(xiàn);系統(tǒng)存在的問題及錯誤處理;以及游戲的測試和改進(jìn)。如下表()為游戲功能性需求表。◆ 對本游戲有幫助說明和作者介紹等良好的用戶界面,有提示顯示和分?jǐn)?shù)顯示。右上側(cè)部分顯示下一次要產(chǎn)生的俄羅斯方塊形狀,以便用戶預(yù)先知道,增加游戲的可玩性。為了使游戲更加美觀更具可玩性,在繪制方塊的過程中不采用默認(rèn)的繪制方式,而是用經(jīng)過處理的圖片效果,這樣讓組成的方塊更加美觀,同時彩色的方塊也讓人賞心悅目,增加了游戲的可玩性。:(x0,y0)(x1,y1)(x2,y2)(x3,y3)2301(x0,y0)(x1,y1)(x2,y2)(x3,y3)0123方塊編號方塊表示方法,即四個小方塊的坐標(biāo)設(shè)定:其中一個方塊是原點(diǎn),坐標(biāo)為(0,0);右側(cè)方塊坐標(biāo)(1,0),下面的方塊坐標(biāo)(0,1),以此類推。InitInstance函數(shù)的實(shí)現(xiàn)如下,程序首先調(diào)用CreatWindow函數(shù)創(chuàng)建初始窗口句柄,然后設(shè)置窗口顯示坐標(biāo),將窗口居中,用空的位圖來初始化使界面內(nèi)都是是空的。 hInst = hInstance。 y=GetSystemMetrics(SM_CYSCREEN)。 hdccanvas=CreateCompatibleDC(hdcwindow)。 //位圖初始化 (hInstance,IDB_BITMAP_START)。 (hdccanvas,hdcmem)。 (5,22,22)。 //按鈕 (hInstance,IDB_BITMAP_BUTTON)。//時鐘 srand((unsigned)time(