Tetris2-stlp2016 | Computer Keyboard

Please download to get full document.

View again

of 48
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Documents

Published:

Views: 6 | Pages: 48

Extension: PDF | Download: 0

Share
Related documents
Description
tetris game
Transcript
  GAME MAKER TUTORIAL: TETRIS(GameMaker Studio)  Joe Weisbrod Februar!A ri# $%&'Fau#t Adisor: *r+ J+ W+ Jarom,k*e artme-t o. /om uter Sie-esU-iersit o. Ke-tuk Abstrat  T0is tutoria# is re ared as a- i-trodutio- to 1ame dee#o me-t 2it0 GameMaker+ It i-#udes a 2a#kt0rou10 1uide .or reati-1 a Tetris 1ame i- GameMaker Studio3 2it0 a## t0e -eessar s rites a-d ima1es+ I- additio-3 a 4s5uare o-e6 starti-1 oi-t) ersio- o. t0e 1ame is roided+ T0e dee#o me-t a-d testi-1 0as bee- do-eo- Wi-do2s sstem 2it0 GameMaker Studio (Wi-do2s Free ersio-) t0at a- be do2-#oaded .rom 0tt :!!222+oo1ames+om!1et + Oerie2  T0ere are seera# basi e#eme-ts 20i0 make u a ideo 1ame: ob7ets3 s rites3 a-drooms+ Objects  are t0e atua# 4t0i-1s6 t0at are i- our 1ame+ T0ese ou#d be a-t0i-1 .rom our 0arater3 a b#ok3 bu##ets3 door2as3 et+ Sprites are t0e ima1es t0at re rese-t ob7ets+ So 20i#e ou mi10t 0ae a 0araterob7et i- our 1ame3 it is t0e s rite assi1-ed to it t0at determi-es 20at t0e 0arater 2ou#d #ook #ike+ Rooms  are t0e areas 20ere t0e ob7ets 1et #aed a-d stu8 atua## 0a e-s+ T0e 1ame a- o-# be i- o-e room at a time3 but mu#ti #e instances  o. ea0 ob7et a- e9ist i- a room+ T0is mea-s t0at ou ma 0ae a sta-dard b#ok ob7et3 but ou a- #ae ma- o ies o. t0at b#ok (i-sta-es) i- t0e room to desi1- our #ee#s+  Ee-ts  0o2 2e make stu8 0a e- Ee-ts are de;-ed i-side a- ob7et3 a-d t0e are esse-tia## 1rou i-1s o. i-strutio-s t0at are .o##o2ed 20e-eer ertai- t0i-1s our+ Create Event:  T0is ee-t is e9euted 20e-eer a- ob7et is reated+ <ote t0at ob7ets t0at are ut i- a room be.ore t0e 1ame is ru- tri11er t0eir reate ee-t 20e- t0e room starts+ Step:  T0is ee-t is e9euted atre1u#ar i-tera#s eer so ma-.ratio-s o. a seo-d+ Just #ike amoie is 0as a ertai- .rame rate3so ideo 1ames 0ae ste s+ T0isee-t is used 20e- t0i-1s -eed tobe o-sta-t# a#u#ated3es eia## .or moeme-t+ Collision:  T0is ee-t is e9euted20e-eer o-e ob7et=s s riteoer#a s 2it0 a-ot0er ob7et=ss rite+ T0is is use.u# .or kee i-1ertai- ob7ets .rom assi-1t0rou10 ot0er ob7ets (#ike a #aert0rou10 a 2a##)+ Alarm:  T0is ee-t is esse-tia## a timer+ It is set to a ertai- -umber o. ste s t0at it 2i## 2ait .or3 a-d t0e- at t0e e-d o. its 2aiti-13 2i## e9eute its ode+ Draw:  T0e dra2 ee-t is 20ere t0e ob7et de;-es 0o2 it dra2s its s rite a-d!or a-ot0er 1ra 0ia# stu8 o- t0e sree-+ Keyboard Input:  T0ese ee-ts our 20e-eer t0e user resses kes o- t0e keboard+ T0ese are use.u# .or 1ii-1 t0e #aer o-tro# oer t0e iees (i+e+3 a##o2i-1 ou to atua## #a t0e 1ame)+  Tetris  A >asi Im #eme-tatio- For t0is tutoria#3 2e 2i## be im #eme-ti-1 a basi ersio- o. t0e #assi 1ame Tetris.  A## t0e s rites -eessar .or t0e 1ame 0ae a#read bee- reated3 so a## ou 0ae todo is reate t0e ob7ets3 rooms3 a-d 2rite t0e ode+ I- bui#di-1 t0is 1ame3 2e are 1oi-1 start b desi1-i-1 somet0i-1 sim #e a-d t0e- addi-1 t0i-1s to it u-ti# it 0as a## t0e .eatures 2e 2a-t it to 0ae+Let=s 1et started?   T0e Lee# *esi1-  T0e ;rst t0i-1 2e 2a-t to do is sim #e: #et=s 0ae b#oks .a## .rom t0e to o. t0e sree- a-d sto 20e- t0e 0it t0e bottom+ I- order to do t0is3 2e 2i## ;rst -eed a room 2it0 t0e #ai-1 area de;-ed+ /reate a room b ri10t@#iki-1 t0e 4Rooms6 .o#der a-d se#eti-1 4/reate room6: T0is is 20at t0e room 2i## #ook #ike 20e- ou ;rst reate it+ ou a- a## t0e room 20ateer ou #ike3 but 2e are 7ust 1oi-1 to #eae ours as room%+<ote t0at to make t0e 1ame #a smoot0er3 2e 0a-1ed t0e room 4S eed6 .rom B% to '%+ T0is mea-s t0at t0e 1ame 2i## e9eute '% ste ee-ts er seo-d3 rat0er t0a- 7ust B%+ To de;-e t0e #ai-1 area3 #et=s reate some 2a## ob7ets+ Ri10t@#ik o- t0e 4Ob7ets6 .o#der a-d se#et 4/reate ob7et6:  <ote t0at 2e -amed t0e ob7et 4ob7C2a##63 set t0e s rite to 4maskCb#ok63 a-d 0eked t0e bo9 t0at sas 4So#id6+ So#id ob7ets are 1oi-1 to be t0e o-es t0at t0e  Tetris iees a-=t .a## t0rou10+<e9t3 2e a#so -eed to reate a are-t 4b#ok6 ob7et+ T0is ob7et 2i## re rese-t a## ob7ets t0at t0e Tetris s0a es a--ot moe t0rou10+ /a## t0e ob7et 4ob7Cb#ok6 a-d make sure t0at ou set t0e 4So#id6 0ekbo9+<o2 1o bak i-to 4ob7C2a##6 a-d 0a-1e t0e are-t to 4ob7Cb#ok6+ T0is 2i## 0e# us #ater o- 2it0 o##isio- ee-ts+
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks