Doraemon Game F 48D2128 ก F ก ก 2551 F ก ก ก ( ( ( F
Transcription
Doraemon Game F 48D2128 ก F ก ก 2551 F ก ก ก ( ( ( F
Doraemon Game ก กก 2551 48D2128 "#$%&'ก() *+กก, ------------ ------------ ("/กก 0#1 2"ก34) ("62 37#ก() -----------(" # 8$+ก) ) $9&: 1 ; '%<ก'ก( ;4ก=&>>ก,*? <2ก ---------------.. ("7AB +4+) ;; C62ก )81 D>6" ก กก 2551 48D2128 ! ก Doraemon $9 &: กก#6ก<)81 E%#$%+F&21"E% E ) ,+ #$% "=1, "8< )8"G ก#6ก $9 +CD1 3&ก"E%#$%+ ก; 21", , <'9 F&21") ,+, "8< กCก Doraemon $9+G2C6( DarkBASIC N'%$OG ก8กก,กCกF8C&: "18$ G 1 <กCก Doraemon 9 &: ก#$%F8C ก0,,<'9 G;1;,กCก0,, 3D )8"C/ก&+ก,ก8C")&0ก T.ED 04+C4+8C")&0ก MilkShape 3D 1.7.9 #G;C%+8กG กZ กก "%<'9 ) $9&: กZ ก 3D 8C"6( DarkBASIC E%08ก#$%$ก4E% F; <4+04+E9 ;4O4E% &4$%" F&4+F8C $ก#9"&: กC 3ก G;Cก,D=C41 04+ E%กก$=&0,,04+$ #$%" #G;CC 484 G;Cก,D=C41 ก"%<'9 O'&: กC0 ก#$%$;4ก;4"<'9 $ก8C" Doraemon Game 0,1&: 2 81 E81 ;>C 04+81 6กGC 9 )8"014+81 +$6ก#$%0ก1ก N'%D=C41 O4Eก4+#$%+41 F8C 04+E%, #ก"%<'9 <*+41 ก+$$"4)81 &+ก, Draemon Game i Project Title Doraemon Game Author Miss Atjima Numpa Department Computer Engineering Academic Year 2551 48D2128 Abstract Doraemon game is focused on the mission of Doraemon to help his best freind, Nobita, who is at the top of the mountain. This mission must overcome alot of obstacle by flying with his personal copter to help Nobita on the top of moutain. To create Doraemon game, it is needed to use Dark Basic Language which is conveniece to create the game effectively. For convenice to create this 3D style-game,T.ED Program is used for creating the scene, and MilkShape 3D 1.7.9. is for creating the character. This project is 3D Game Development by using Dark Basic language in order to show the movement of the character with moveable background. Moreover this game will bring happiness to the player. As the special slyle and colorful of the game, it brings the excited feeling to the player and conduct the huge variety in the Game World. Doraemon Game has 2 levels. It is under water and grass. Incumbency game is different. Players can choose a character and have music. Draemon Game ii 8 9:; :ก<ก=> <CCD=C4 <C#C" $9 <,1" /,, $9&: " #$%$&: ก4ก(* )8"#$%<CCF8C84กก#$%G8#$%; '% 04+OC;ก1F8C#ก84ก<CG8<C; '% <C C กo F 8C C O' กC /, , "1 ;+ 04+< , 1 " /, , $9 &: " #$%"F8C 1O, G8ก1 *+D=C8# 3 $ 2552 42E% ---------------( ) Draemon Game iii กก&+ก ก Doraemon $9+o4341F&F1F8C ;ก<8ก 3+;ก,3481F& $9 " /กก 0#1 2"ก34 "#$%&'ก() N'%"0 + 04+&: #$%&'ก(#$%8$ " 62 37#ก( 04+ " # 8$+ก "#$%&'ก(1 O' "#1 E% p #$%21"G;C0 + 48 O' ,8 8 D=CN'%"&: ก4GG;C 04+G;C ก , 3 G #3กp 8C " &A4 0"C# D=CN'%G;C0 + G ก4EกG2C)&0ก04+ 7$กG2C 04+E% p $%p ก'ก(*+ก <ก #" <6=กo #$%21"G;C&'ก(04+&: ก4GG;C48ก'ก( D=C8# 3 ก "" 2551 Draemon Game iv ,> : 8 ,#8"1.............................................................................................................................................i Abstract .............................................................................................................................................ii ; E,&: ก4ก(* ................................................................................................. iii กก&+ก............................................................................................................................. v ,> .............................................................................................................................................. v ,>=&6 ............................................................................................................................. viiii ,> ................................................................................................................................ xiii ,>"1 ..................................................................................................................................xiv ? 1 .................................................................................................................................... 1 1.1 &: (Motivation) ............................................................................................... 1 1.2 O3&+<) .............................................................................................. 1 1.3 <,<<) ..................................................................................................... 2 1.4 <9 G ก8 ............................................................................................... 2 1.5 &+)"2 #$%81+F8C, ............................................................................................. 3 1.6 O #$%#) ......................................................................................................... 4 1.7 E%E#$%G2CG กZ ............................................................................................. 4 ? 2 9BC D ....................................................................................................................... 5 2.1 =Cก$%"ก,ก........................................................................................................... 5 2.1.1 Draemon Game &+6#<ก ..................................................................................................... 5 v ,>(1) : 8 2.1.2 3<ก (Game View)................................................................................ 6 2.1.3 <9 กZ ก ............................................................................................ 6 2.1.4 1 &+ก,;4กpG กCก ...................................................................... 7 2.1.5 &+ก,E9 B ;,% 1 G<ก .......................................... 7 2.2 DarkBASIC Professional ................................................................................................ 8 2.2.1 0 8 .......................................................................................................... 9 2.2.2 #FCG2C DarkBASIC .................................................................................... 10 2.3 MilkShape 3D ............................................................................................................... 11 2.4 Adobe Photoshop CS .................................................................................................... 12 2.5 กCmap)8"G2C)&0ก T.ED,gile[s] 04+ Tree Magik ..................................... 13 ? 3 <F:? ก ......................................................................................................... 26 3.1 Software Specification .................................................................................................. 26 3.1.1 กกก41 ก .................................................................................................. 26 3.1.2 7$ก41 ก ...................................................................................................... 27 3.2 System Architecture ..................................................................................................... 27 3.3 System Design .............................................................................................................. 28 3.4 System Implementtation ............................................................................................... 30 3.4.1 )84 3D #$%G2CG กCก............................................................................ 31 3.4.2 ก# <)&0ก ..................................................................................... 44 Draemon Game vi ,>(1) : 3.5 8 0D ก8 ก........................................................................................................ 55 ? 4 ก<H<FI<ก<...................................................................................... 53 4.1 D4ก#84 ............................................................................................................... 53 4.2 3&D4 .......................................................................................................................... 59 4.3 &v>;04+3&....................................................................................................... 60 4.4 <C 0 + / 0 #กZ 1 ........................................................................... 60 ,* 3ก ................................................................................................................................... 61 6D ก ก..................................................................................................................................... 62 6D ก <..................................................................................................................................... 81 Draemon Game vii ,>=&6 ? 8 =&#$% 2-1 080O,E%Eก#AnimationG MilkShape 3D .................................................. 12 =&#$% 2-2 08map#$%Cก)&0ก T.ED .............................................................................. 13 =&#$% 2-3 08กExport<6 ................................................................................................. 14 =&#$% 2-4 08ก&x86#$%Exportก)&0ก T.ED ........................................................... 14 =&#$% 2-5 086#$%Export&: Fy4 .x .......................................................................................... 15 =&#$% 2-6 086#$%Exportก)&0ก T.ED ....................................................................... 15 =&#$% 2-7 08ก4EกE9 D<map .......................................................................................... 16 =&#$% 2-8 08กG0G;Cก,map .............................................................................................. 16 =&#$% 2-9 08ก&,0; 1<0G map ........................................................................... 17 =&#$% 2-10 08ก4Eก$<0#$%G2CG map ............................................................................. 17 =&#$% 2-11 08ก4Eก&+6#<0 ..................................................................................... 17 =&#$% 2-12 08ก0G map ................................................................................................ 18 =&#$% 2-13 08กก; 810G map ..................................................................................... 18 =&#$% 2-14 08ก4EกE9 D<map ........................................................................................ 19 =&#$% 2-15 08map#$%G1004C .................................................................................................. 19 =&#$% 2-16 08C FC#$%กกCก)&0กTree Magik.................................................... 20 =&#$% 2-17 08กExportC FC#$%F8CกกCก)&0กTree Magik .............................. 20 =&#$% 2-18 08ก&x8Fy4#$%Exportก)&0กTree Magik ............................................... 21 =&#$% 2-19 08กG10G;Cก,C FC ......................................................................................... 21 Draemon Game viii ,>=&6(1) ? 8 =&#$% 2-20 08กClayer<G,FCG )&0กgile[s] ......................................................... 22 =&#$% 2-21 08ก&,C FCG;C&: 0,,F1$E9 ;4G )&0ก gile[s]................................ 22 =&#$% 2-22 08map#$%$C FC04+0G )&0ก gile[s]04C.................................................... 23 =&#$% 2-23 08ก, #'กmap04+0 ......................................................................................... 23 =&#$% 2-24 08กก; 81map#$%save ....................................................................................... 24 =&#$% 2-25 08ก<$" )z8E%);4804+08map .................................................................. 24 =&#$% 2-26 086#$%F8Cกก<$" )z808map .................................................................... 25 =&#$% 3{1 Use case diagram ............................................................................................................. 27 =&#$% 3{2 Flowchat <ก ............................................................................................................ 29 =&#$% 3-3 )81 .......................................................................................................................... 30 =&#$% 3{4 )8$% ............................................................................................................................... 30 =&#$% 3{5 3 < ................................................................................................................................. 31 =&#$% 3-6 G,8G2C, ...................................................................................................................... 31 =&#$% 3-7 ) ,+ ............................................................................................................................. 32 =&#$% 3-8 C FC ................................................................................................................................ 32 =&#$% 3-9 ก4Eก4+.............................................................................................................. 33 =&#$% 3-10 0<1< .................................................................................................................. 33 =&#$% 3-11 ก3>0.............................................................................................................................. 34 =&#$% 3-12 81 #$% ............................................................................................................. 34 Draemon Game ix ,>=&6(1) ? 8 =&#$% 3-13 &4GC 9 ........................................................................................................................ 35 =&#$% 3-14 ;>C ................................................................................................................................ 35 =&#$% 3-15 กC ; .......................................................................................................................... 36 =&#$% 3-16 ;1" .......................................................................................................................... 36 =&#$% 3-17 yก ...................................................................................................................... 37 =&#$% 3-18 F<13ก .............................................................................................................................. 37 =&#$% 3-19 08ก);486 ....................................................................................................... 38 =&#$% 3-20 08yvก2 ก; 80; 1ก086 ................................................................. 39 =&#$% 3-21 08yvก2 ก3108F<13ก .................................................................................... 39 =&#$% 3-22 08E% F<ก&4$%" 81 .......................................................................................... 40 =&#$% 3-23 08ก310; 1083 < .................................................................................... 40 =&#$% 3-24 08ก,0; 1)81 ก, 3 < ........................................................... 41 =&#$% 3-25 08กC,4 .................................................................................................. 42 =&#$% 3-26 08กC04+,3)81 ............................................................................. 42 =&#$% 3-27 08กC04+,3)81 <*+, ................................................................ 43 =&#$% 3-28 08ก,14E%ก8G;1 ......................................................................... 43 =&#$% 3-29 08yvก2 ก; 8 frame ........................................................................................... 44 =&#$% 3-30 08yvก2 Collision_Map ......................................................................................... 44 =&#$% 3-31 08yvก2 value1 ...................................................................................................... 45 Draemon Game x ,>=&6(1) ? 8 =&#$% 3-32 08yvก2 Collision_Map2 ........................................................................................ 45 =&#$% 3-33 08yvก2 AICollisionMAP ...................................................................................... 46 =&#$% 3-34 08yvก2 ก; 8ก8 <3 < ........................................................................... 46 =&#$% 3-35 08yvก2 ก3108&4 ...................................................................................... 47 =&#$% 3-36 08yvก2 ก4Eก4+ ...................................................................................... 47 =&#$% 3-37 08yvก2 กก; 84G 81 #$% 2 ....................................................................... 48 =&#$% 3-38 08yvก2 กกo,F<13กG 81 #$% 2 ........................................................................... 48 =&#$% 4-1 =ก1 <C41 ก .......................................................................................................... 53 =&#$% 4-2 ก4Eก4+.............................................................................................................. 53 =&#$% 4-3 7,"ก41 กG 81 #$% 1 ........................................................................................... 54 =&#$% 4-4 ก%ก81 #$% 1 ........................................................................................................... 54 =&#$% 4-5 42$G 81 #$% 1 .......................................................................................................... 54 =&#$% 4-6 2$G 81 #$% 1 ................................................................................................................. 55 =&#$% 4-7 กG2CF#G 81 #$% 1 ................................................................................................... 55 =&#$% 4-8 #$%กก<) ,+.................................................................................................................. 55 =&#$% 4-9 7,"7$ก41 G 81 #$% 2 ............................................................................................ 56 =&#$% 4-10 ก%กG 81 #$% 2 .................................................................................................... 56 =&#$% 4-11 กกo,F#G 81 #$% 2 ............................................................................................... 57 =&#$% 4-12 2$G 81 #$% 2 ............................................................................................................... 57 Draemon Game xi ,>=&6(1) ? 8 =&#$% 4-13 4G 81 #$% 2 ............................................................................................................... 57 =&#$% 4-14 41 0C ............................................................................................................................ 58 =&#$% 4-15 41 2 + .......................................................................................................................... 58 Draemon Game xii ,> J? J 8 #$% 3-1 0D ก8 Project1 ........................................................................................ 49 #$% 3-2 0D ก8 Project2 ....................................................................................... 51 Draemon Game xiii ,>"1 AI Artificial Intelligence CMYK Cyan Megenta Yellow Black DB Pro DarkBASIC Professional DLL Dynamic-link library FIFA2005 Federation Internationale de Football Association 2005 LAB Laboratory NHL2004 National Hockey League 2004 NSC2003 National Software Contest 2003 RGB Red Green Blue RPG Role Playing Game T.ED Terrain editor Draemon Game xiv 1 ,# $9ก41O'&: <) O3&+ <,<04+<9 G ก 8 F&O'E%E#$%G2C &+)"2 #$%F8C,กก#) $9 1.1 (Motivation) G &v3, 48Ny0กG &+#F#" "41 กกo%<'9 กO=กZ E% C 3ก 484 G;C0ก1D=C41 01กo$ก$ก;4"กO=กC<'9 E%G;C 3ก 04+0E%<กZ ;EC#ก(+8C 1p G;C0ก1D=C41 8C";E ก กG &v3, $94C O=กC<'9 8C" ก<D=CC #99 F11+&: 4+ =&0,,<ก /ก O'+,,1p<ก %;41 $9&: $"38%C <ก< 8G;>1p #9;4" 8C"804+;3D48ก41 ก'&: %>G กZ ก D=C8#'Z ก)81 D>6" (Doraemon Game) <'9 E%C;4ก;4" G;Cก,0 ก )8"ก)81 D>6" 9 &: ก#$%41 F1"กก ก $6#$%" ก#ก(+ กG2CF;,<D=C41 F1$กG2C3 0G ก N'%+1D416+G<D=C41 1.2 !"# $ • E%'ก(ก7$กCก E%E#$%G2C 04+6(G กCก • E%C, # 04+D1 4"$"8G;Cก,D=C41 • E%ก#ก(+ก# "1&: +,, =Cกก0D ก8 • E%1กก< F#"G;C$กZ กก ก<'9 • C04+Z กก+,,#$%ก0,,FCG;COG2C F8C)8"G2C)&0ก DarkBASIC • &: E9 B =CG;C$กZ ก1F& Draemon Game 1 1.3 "#""# $ Project1: • OC ก0,,/ก04+4+0,, 3 F8C • OCก 3 F8C • # , +,,&A,ก Window XP professional • O084+1ก,/ก 04+O,3ก4E% #$%<4+F8C • O08F# 04+กo,F# 9 F8C • 4+O, F8C Project2: • OC ก0,,/ก#$%&: 9F8C • O41 กD1 F&81 #$%2F8C • 4+O"=1G 9F8C • 4+Oกo,F<13กF8C 19 o8 • C)8$% • O,กF8C 1.4 "'#(ก*+ Project1: • ;<C) • 0D <9 G ก# 04+'ก(&: F&F8C • 'ก(ก$%"ก,กCก04+#) )4"$#$%ก$%"<C • ก0,,04+C/ก 4+ 04+F#1p Draemon Game 2 • <$" )&0ก04+8C/ก04+4+ • <$" )&0ก,34+8C"&34=ก NC" < ; C ;4 • <$" )&0ก04+8CF# • <$" )&0ก08+0 Project2: • C/ก04+&+ก,</กG 81 #$% • <$" )&0ก0881 #$%E%,81 0ก • <$" )&0ก4,&+ก,<81 0กG <*+#$%41 81 #$%04+G <*+8$" กo4,&ก,<81 G <*+#$%41 81 0ก • C 9G 81 #$% • 8&+ก,GC 9 21 &4 กC ; ;1" • CF<13ก31ก08F<13กG 0; 11p<GC 9 • 4+Oกo,F<13กF8C • C)8$% 1.5 $-.!/0* 123*4 • E%G;CD=C41 F8C, 3ก 04+, # • 21"G;Cก88%C 04+ กG กก0,, • E%G;CD=C41 F8C$กก Z 8 G ก41 ก • #G;Cก8กZ #8C ก+, ก8 ก$" =C8C" 0D G ก# Draemon Game 48 ก 3 1.6 /0$ • ;C&A,ก (;C) ) *+ก <ก ;#"4"<4 # <ก'ก(6=กo • 85/198 .6 .2 .E .6=กo 83000 1.7 70# 7#/0(.4(ก89 E%E#$%G2CG ก#) $9&+ก,8C"#98C Hardware 04+ Software Hardware Notebook Computer Intel(R) Core(MT) 2 Duo 1.79GHz, 1.00 MB of RAM Software 6(#$%G2C 6( DarkBASIC Software E% p - Dark Basic Professional - Adobe Photoshop CS2 - T.ED - TreeMagik - Milkshape 3D 1.7.9 - gile[s] Draemon Game 4 2 :487'; ,# $9ก41O'#(A$ก# <กCก )&0ก#$%G2CG ก# 04+=C E9 B 1p <#) )4"$#$%G2C;,กZ )&0ก Game on PC 2.1 :4ก/0- กก [2] ( 98 F8C08;"<ก8 $9 1 Game ;ก&x8)&0ก Thaisoft So Sethaputra Dictionary 2.0 04C+F8C;"1 ก41 "1 3ก N'% ;"<กกoE &: %#$%41 04C#G;C D=C41 (User) F8C, 3ก 484 F11+&: ก#$%$ Graphics "E ;EกF178#$%0OCก, Windows ;ก#G;CN'%&: D=C41 F8C, 3ก04Cกo % E Game 2.1.1 >"# ก )8"#%F&กก; 8&+6#<ก+G2C4ก(*+<ก ก8 E% 04+7$ก 41 &: ก; 8 )8" ( 98F8C3&&+6#<ก)8"$"4+$"88 $9 1. Action &: ก#$%""04+EE%, 1;3ก*1p "18o04+ O=กC )8"#%F&ก0 $9+$38&+E%D1 ;3ก*1p 04+8 E9E%F&G;CO' 38;"<ก;Eกo,+0 G;Cก#$%38 "1ก&+6# $9 E Half-Life, Quake 04+ Unreal &: C 2. Adventure ก&+6# $9+G2C E9E%&: ก; 8;3ก*1p #$%ก8<'9 ก, 4+4C"ก,ก RPG 01ก RPG +F1O,3G;C4+ก8ก04+ OG กก+# (Action) 1p F8Cก ก"1<ก&+6# $9 E Tomb Raider 3. Puzzle ;E Logic Game &: ก#$%CG2C8E%0กCF<&v>;1p )8"ก &+6# $9F1F8CG2C$""04+E#1 9 01+CG2C8G ก0กCF<&v>;#4ก$ก 8C" "1<ก&+6# $9 E Tetris 04+ก;ก3ก (Chess) 4. Sport &: ก#$%G2Cก$2 81p E%Cกก*?04+=&0,,G ก41 )8"+ C 4ก(*+ก41 0,, Action &: ;4ก "1<ก&+6# $9 E FIFA 2005 04+ NHL 2004 &: C Draemon Game 5 5. Strategy &: ก#$%CG2C8G ก0D 04+,3กG2C#"ก1p )8"#%F&38&+<ก&+6# $9 E กC;E8 ,"1 21 กCE "1<ก&+6# $9 E Sim City 6. Turn-Base ก=&0,, $9+G;CD=C41 D48ก 41 )8""#$%F1F8C,#7G ก41 +CD=C41 $ก" )8"#%F&+&: ก&+6#ก+8 (Board Game) 7. Role-Playing Game ;E$"ก9 p 1 RPG &: ก#$%D=C41 C,34+G;C 8 F& E9E%#$%ก; 8FC04+%#ก(+G 8C 1pG;Cก,4+ 2.1.2 # "# ก (Game View) 3<ก (Game View) E 3#$%G2CO1"#86<ก=1"<D=C41 )8" 3 1p #$% " G2CE%O1"#86=1"<D=C41 $;4"=&0,, 8 $9 1. First Person &: 3#$% " F&G2Cก,ก&+6# Shooting )8"+G2C7$O1"#8 6ก"< 4+#$%D=C41 ,3;E,34#$%; '% N'%กG2C Flash E%Z ก#$%G2C 30,,,34#$%; '% &: E%"กก+CG2Cก<$" )&0ก0,, 3 <9 = "1<ก#$%G2C30,, First Person E Half-Life 04+ Quake 2. Isometric &: 30,, 3 #$% " F&G2Cก "101;4"+OC ก0,, 3 F8C )8"F1CG2C# ก<$" )&0ก0,, 3 <9 = "1<ก#$%G2C 30,, Isometric E Diablo 3. Side &: 3#$% "G2CG กZ ก0,,2 )8"+O1"#86ก" <,34#$% )8"G2C3#8C <C "1<ก#$%G2C30,, Side E Mario 4. Top Down 30,, Top Down &: กO1"#86ก8C , ;E$"ก 30,, $91 "Bird Eye View" "G2Cก,ก0,, 2 #$%$=&0,,1"p "1<ก#$%G2C 30,, Top Down E Pac Man 2.1.3 "'#ก89ก G ก;4"pก+$%#$%$"ก1 game loop N'%G game loop $9+$%1pG ก ,<C=4<CกD=C41 ก 9 +&+4D404+08<C=4#$%F8CกF&G +;1ก41 ก Game loop +$ 3 processes "=1<CG 04+$ก 2 processes #$%"=1<C ก +$"4+$"88 $9 Draemon Game 6 1. Starting the Game &: 1 #$%%C <กE%<CO' G 1 $9+&+ก,F&8C" 6#$%&: ,กE%<ก 04+ =#$%+<CF&=1ก ;ECก&,0111p 21 8-, <$"8 $G ก, +8,"ก1"<ก &: C 2. Player Input G 1 $9+,กก+#กD=C41 <CE% F&&+4D4N'%<C=4#$% <C+F&&4$%" 0&41 < Game Internals 3. Updating Game Internals G 1 < Game Internals +&: ;G><ก +1#3กpกก+##$%<CกD=C41 , ก08#1#1p<=G ก, E% F<G ก 0C-2 +<ก+O=กก+##$% process $9 4. Displaying the Screen #ก08D46กyxก1p<'9 F&, ; C N'%6;41 $9 + <C=4#$%F8Cกก&+4D4< Game Internals &: ก; 80; 11p< 5. Ending the Game E%D=C41 41 ก,C$ก,ก,"121 The End, Game over, Good Bye &: C 2.1.4 1 ก#DEกF(ก4 ก 1. Game engine architecture 1 $%E engine <ก&: )CE9 B G ก<$" )&0กก #G;CD=CZ ก F&C1&: กF8C"18o N'%O);48ก Internet 04+G2CF8Cy$;EF&NE9D1 Internet ;EOC$2 >G ก<$" )&0ก04+ "ก%#ก#9;8F1"กG2C engine #$%<$" กoO<$" <'9 F8C N'%F11+ <$" )C8;E1+G2C engine #$%; 9 C=CE9 B G E% Data Structures, Object-Oriented Programming, Algorithm 4 2. Artificial Intelligence (AI) &: 1 #$%>ก,ก E%ก+Cก0,,G;C Program 8G;CF8C#4Eก#$%8$#$%3821 ก G;C, ก,D=C41 กG;CF8C8$#$%38 N'%38 $9&: 38>#$%#G;Cก 3ก4"กo1F8C 3. Sound engine G 1 $9+31 C F&#$%ก<$" )C8"FG;CO1 $"404+ 41 4;"384F8CN'% G 1 < sound engine $9O;);48G Internet F8C01ก+G2C ;E<C API ;41 9 &: กoC<$" )C8&: 2.1.5 # !ก#87';D8+0 1(2"# ก ก#$%O8'8=804+G;C484 ก,D=C41 F8C 9 &+ก, E9 B ;,% 1 G<ก $8 $9 Draemon Game $&+ก,;4""1 7 1. Live and Health Live ;"O' 2$<4+ 04+ Health ;"O' 42$ <4+ OC42$ <4+;84 ก+ก4,F&%C G;1G 38#$%ก; 804++48 1< 2$4 1 01OC 2$;804C +9 38ก41 04+F1O%C กG 388ก41F8C 01+C%ก#$%38%C G;1 04+&,1< Live 04+ Health &: 1%C E%%กG;1 2. Score +,,+0 &: ก8O04+&+#76<D=C41 กก $9" G2CE%&$",#$",O<D=C41 014+ 8C" +,,+0 '&: E%E#$%#G;Cก 41 ก 1 Gก<'9 +,,+0 กก+G2CE%8&+#76<D=C41 04C"G2C ;,ก; 811p <ก8C" 21 +8,"ก<ก กก $9"OG2C+0 &: O3&+<กF8C8C" 21 D=C41 #$%#+0 F8C=38 E D=C2 + ก)8"#%F&+G2C +0 E%ก; 8+8,"ก<ก )8"%C ก+8,1" E%D=C41 O+ +0 F8Cก<'9 +8,"ก<ก+%ก<'9 F&8C" 3. Level E กG2C# N9E%ก+3C G;CD=C41 ก8#C#"G;1p #G;CD=C41 ก8 ""04+41 ก 9 N9$ก9 +8,"ก<ก&: &+ก,#$%#G;Cก 1 Gก<'9 +ก&,+8,"ก+#G;Cก8#C#"G;1p ก,D=C41 )8"#%F& +8,"ก+%C ก+8,1"E% E9 B ก41 ก ก 9 +8,"ก+ %<'9 O04++0 <D=C41 014+ Level +$+8,"ก04+3&1p %<'9 O#G;CD=C41 D1 /กF8C"ก<'9 8 9 D=C41 +C&,&304+Z ก41 G;C$ &+#76ก<'9 E%#$%+D1 F&41 G +8,#$%"ก<'9 4. Bonus and Power Up Bonus E %#$%G;Cก,D=C41 E%กo,<#$%ก; 8;E# E% F<#$%ก; 8 Power Up E ก %O<4+E%OD1 Level F8C 2.2 Dark BASIC Professional [6] DarkBASIC (DB) E Game Engine ;EE%E#$%G2CG กZ ก; '% C ก,(# The GameCreator Inc. 4ก(*+< DarkBASIC +4C"ก,6(,ก 01F1G21 )&0ก6(,F11+&: Turbo Basic,QBasic,GwBasic 4 ;E Visual Basic E%E#$%G2CG กCก0,, 9 $;4" 6(#$%G2C<$" กo$;4ก;4" "121 C++ , VisualBASIC , Delphi 4 ก*$ $9F8C4Eก'ก(E%E#$%G2CG กCก E DrakBASIC &: E%E#$%G2C<$" ก; '% $O=G กG2CCO30,, 04+O3 ;+;,D=C#$%%C G ก<$" ก04+ก&+6##$%G2C Draemon Game 8 G ก41 &: ;4ก ก# < +# , )8);8 04+$" =CกG2C F8C 8o =ก# #$%<CG1" 4ก(*+%< DarkBASIC +4C"ก,6(BASICก F1 1+&: Turbo Basic,QBasic,GwBasic ,Visual Basic 4 N'%&: 6(#$%G2C,3 Microsoft DirectX #$%8กก$%"ก,6#$%&: ,0&,$",8 $&+ก,04+ 64E% F; D4ก'ก(,1 E%ก DarkBASIC F8CO=ก8C E%G2C;,ก<$" ก )8"/+ '$OG ก8กก$%"ก,กCก"1,4304+F8CD4 F11+ &: ก8กFy4,E9C 6 2 O3 3 $" 04+กCE9 D1p &+ก,ก,#9$ "1#3ก%#G;C1"1ก<CG 04+,43 ก+#%O<$" กF8C"1$ &+#76ก1ก<$" )&0ก)8"G2C6(;4กp#%F& ก1 #$%+$)&0ก DarkBASIC <C&: #4EกG;1 9 $C #"=1F1กE%+ Cก, E% % ก$" =CกG2C6(+8,= 21 C++ , Visual Basic , Delphi &: C N'%6( $9CG2C4กG ก$" =C;E'ก(#<CG E%&: 3&ก*#$% ++4'ก<CF&;,กZ software)8"$E%E21"E Microsofts DirectX N'%+&: 1 #$%81)8"ก,ก604+# #8C $"G ก#$%C<'9 01G <*+ $9 )&0ก DarkBASIC N'%&: E%E#$%G2CG ก<$" ก; '% $OG กC O304+O3 +#G;CO<CGG E%%F8C"11"04+8oก1ก <$" 8C"6(+8,= 04+#9"OG2C1ก, Microsofts DirectX F8C"11"8" 2.2.1 S +* < DarkBASIC +F1;"38$"#1 $9 กZ )&0ก#G;C8$"%<'9 04+G;C # 1ก+0#) )4"$กCกG 1F& E% v < กCก #$% CกCก1F& )8"G;C Update Feature <%G;1pF8Cy$ 04+"OC% <F8C8C" C++ $ก8C" &v3, )&0ก DarkBASIC F8C<C&: #$%01;4"<48 กZ กE 41 v2$""1$ ก;4$ >$%&3 ก<'9 04+#$%> F#",ก431กo%G2C)&0ก $9 Cกก ,C04C N'%ก1p#$%+&: #$%=Cก 21 กF#"/"+&,D$,ก Sword Master ,กGrunt 04+กN1N ;E Siamkid #$%F8C4#$% G ก0<1< Z )&0ก0;1&+#F#" 9#$% 4 (NSC 2003) Draemon Game 9 2.2.2 34# (.4 DarkBASIC DarkBASIC &: 6(#$%G2CG ก<$" )&0ก N'%;"1G ก<$" )&0ก 9 +F1O=กก81+<$" +F O#$%+Cก<'9 F8C"1#$%Cก F1$ กก80,,ก<$" #$%" O#$%+<$" กF8C;4"0,, ;4"&+6# "121 ก&+6##$%41 F8C;4" G 48$"ก (Multiplayer) , ก&+6#F11p , ก0<1O , กกN , ก&+6#ก"& 1=C กCกก)&0ก DarkBASIC $9 $#9<C8$<C$"8 $9 <C8$ 1. Tool O<Cก, DirectX F8C8$ N'%8กก,O3 , 60,,,0& , 60,, Animation 04+8C $";E8 $&+ก,6"G ก 2. O<$" code #$%&: 6(+ก=4 BASIC F8C 04+OF4 C++ F8C 3. O$" =CกG2C F8C1"04+8o 4. O);48Fy46กyyxก1G ก<$" <C;F8C code 04+O,$,86;E 5. $)&0ก#$% , 3 04+ O$"กG2Cyvก2 )8" DarkBASIC 21 )&0ก Catagrophy Shop 2.0 N'%Oก; 8382 G 0D #$%F8C4" 04+$"กG2CG DarkBASIC F8C)8" 6. O#$%+#ก0กCF< code 04+8=D4ก )&0ก04+&4$%" 0&4F8C "18o #G;C+8กG ก;38D848<)&0กF8C4" 7. ก2oก2 F8C#9 2 04+ 3 )8"Oก; 8ก2 <O3F8CO' 3 0,, 8. , 3 ก8กFy4,E9C F8C"1$&+#76 21 1 <$" Fy4 , C 4, Directory , 1 3*,<Fy4F8C"1$&+#76 9. %G 1 Memblock N'%+# )8"ก, memory #G;C+8ก04+# F8C"1 8o E%ก+F&8'1ก memory)8" 10. , 3 G 1 <กG2C DLL N'%#G;C<$" )&0กF8C"1$+,, ก "%<'9 Draemon Game 10 11. , 3 ก41 0,, Multiplayer D1 # Lan 04+ Internet F8C <C$" 1. กC Matrix +#F8CF1ก 100X100 21 OC+G2Cกก1 $9C1ก N'%F1 +8ก 2. G 2% #$%G2C $9F1O8กo,Fy4 3 F8Cก#1#$%Cก 3. =&1Fy4 3 #$%);48กG ,9 F1;E 6#$%C 4. OCF1G2C Dark Edit G ก<$" )&0ก DarkBASIC $9+# 0,, Full Screen N'% F1+8กG ก<$" )&ก0ก 2.3 MilkShape3D [2] &: )&0ก8ก 3 #$%C)8" Chumbalum Soft N'%G 8$ MilkShape3D &: )&0ก#$%G2C;,# Low Polygons )84;,ก Half-Life #1 9 01E%$กZ )&0กF&E%"p F8C%=&0,, file format #$%,ก,กE% pก<'9 MilkShape3D &+ก,8C"%E9 B 21 8$"ก,)&0ก8ก 3 #%F& 21 % select, move, rotate, scale, extrude, turn edge, subdivide &: C 04+ 3>G;CC 04+0กCF< vertex 04+ face <)84F8C กก $9กo"$%G กC Primitive model 21 spheres, boxes 04+ cylinders E% F&&+"3กG2C;,#)841p 8C" MilkShape3D ",ก# Skeletal animation ;EกCก4E% F;G;Cก,)84)8"กG2Cก+8=กG;Cก,)84F8C8C" 04+E% G1ก4E% F;G;Cก,)8404C กoO F&G2Cก,ก ;E Game Engine #$% , 3 F8C 8C" N'%&v3, MilkShape3D , 3 file ;4กp ก1 37 =&0,, ก 27 )&0ก (ก Game Engine 04+)&0ก)File #$% MilkShape3D , : ก Animation O Milkshape3D ก# Animation &: %#$% >F10CกC)84;,ก +;ก&: )84#$% F1$ก4E% F; กo"ก#$%+#G;Cก#$%C<'9 ก 3กF8C ก#Animation G MilkShape3D 9 6" ก+8="31"ก N'%D 'ก(กo 01%# <CGก,)&0กกo=C1 1"ก1#$%8ก $"C"# $" 8; 1"#1 9 ก# Animation C"ก# 1ก 2 1 E - Bone ;E Joint ;E Skeleton #$%;4" 3C " Draemon Game 11 - )84 N'%+F8C/+ Vertex ;E#9)84 G ก# Animation G MilkShape3D 9 C"%#$%$"ก1 MilkShape 3D Keyframer N'%$4ก(*+4C"ก,)&0ก;4"p)&0ก $"01+8=1"1ก# กก1 ? 2-1 080O,E%Eก# Animation G MilkShape3D [2] Keyframe Slider G2C;,ก; 81 # "=1#$% Animation Frame F; Playback Controls G2CE%%G;C Animation #$%%C<'9 # $%"1"E Goto First Frame, Goto Previous Keyframe, Goto Previous Frame, Play Backward, Play Forward, Goto Next Frame, Goto Next Keyframe and Goto Last Frame 4+8, Frame Position Box &: ,ก1 $9"=1#$% Frame #$%#1F;1 Number of Frames Box Oก; 81 Animation <)84$4+$"8 #1FF8C $9, Animate Button &: &30ก#$%Cก8E%%ก# Animation 04+&x8E%Cก &4$%" ก4,<C=1กC ;E0กCF<)84 2.4 Adobe Photoshop CS [3] )&0ก&+"3ก#$%$OG ก8ก0กCF<04+ก0=&6 (photo editing and retouching) 0,,0 D4)8",(#+)8,$No N'%D4)&0ก8C ก$ก ;4"#$%F8C, " 21 Illustrator 04+ Pagemaker )&0ก)y)C2&&: )&0ก#$%$ OG ก8กFy4<C=4=&6#$%$&+#76 ก# ก,Fy4<C=4=&6 <)y)C2& 9 1 G;>1+# ก,Fy4<C=4=&6#$%8กo,<C=4=&60,,Raster )y )C2&OG2CG กก0164oก C" 21 4,08, 4,"0ก<6, &,0กC$, % $04+0 ;EกG1yyกG;Cก,=& 21 #6$N$&", ก#6)N, กC6 Draemon Game 12 ) ก6;4"61ก กก $9"G2CF8CG ก816 04+กNC /ก;4<Cก, 6)y)C2&O# ก,+,,$ RGB, CMYK, Lab 04+ Grayscale 04+O 2.5 ก4 Map $*-(.4$Sก T.ED, gile[s] SE Tree Magik [1] STEP1. %กกC Map <'9 G )&0ก T.ED 8=&#$% 2-2 ? 2-2 08map#$%Cก)&0ก T.ED [1] STEP2. Export Map #$%o04C)8"9186 G ก*$#$%F1OC Texture F8C E%ก VGA ,2 8+F1,กC Super Texture ;E Texture < 8G;>1 กoG;C48 < 8 Texture 4 ก 2048 &: 1024 ;E 512 &: C 8=&#$% 2-3 Draemon Game 13 ? 2-3 08กExport 6 [1] STEP3. &x8)&0ก gile[s] <'9 04C&x8Fy4#$% ก34 .x #$% Export ก T.ED 8=&#$% 2-4 ? 2-4 08ก&x86#$% Export ก)&0ก T.ED [1] Draemon Game 14 Fy4 .x #$%Cก T.ED 9 O&x8F8C# #$G gile[s] 8=&#$% 2-5 ? 2-5 086#$% Export &: Fy4 .x [1] ก=&#$% 2-6 086)84#$%&x8G )&0ก gile[s] ? 2-6 086#$% Export ก)&0ก T.ED [1] Draemon Game 15 STEP4. 4Eก menu Material E%&,G;C&: 86 E Full bright/default Light Map 8 =&#$% 2-7 ? 2-7 08ก4EกE9 D< map [1] STEP5. ก 9 C0)8"4Eก86 N'%0# 0ก8#"8=&#$% 2-8 ? 2-8 08กG10G;Cก, map [1] Draemon Game 16 STEP6. ก 9 ก8&3 space E%&,&: ก&4$%" 0; 10 04C4E% 0F& 0; 1#$%Cก8=&#$% 2-9 ? 2-9 08ก&,0; 1<0G map [1] &4$%" $<0Cก8=&#$% 2-10 ? 2-10 08ก4Eก$<0#$%+G2CG map [1] Draemon Game 17 STEP7. ก 9 C00,, Ambient 8=&#$% 2-11 ? 2-11 08ก4Eก&+6#<0 [1] 0G;1#$%C<'9 F&FC#$%00ก#$%C<'9 8=&#$% 2-12 ? 2-12 08ก0G map [1] Draemon Game 18 STEP8. N#10< Ambient &: Infinity 8=&#$% 2-13 ? 2-13 08กก; 810G map [1] STEP9. #8,กC0)8"4Eก Quick Render8=&#$% 2-14 ? 2-14 08ก4EกE9 D< map [1] Draemon Game 19 D4กก 808=&#$% 2-15 ? 2-15 08 map #$%G1004C [1] STEP10. CC FCก)&0ก Tree Magik 8=&#$% 2-16 ? 2-16 08C FC#$%F8CกกCก)&0ก Tree Magik [1] Draemon Game 20 STEP11. Export &: Fy4 .x 8=&#$% 2-17 ? 2-17 08ก Export C FC#$%F8CCก)&0ก Tree Magik [1] STEP12. G2C)&0ก gile[s] Merge Scene C FC#$%C<'9 <C8=&#$% 2-18 ? 2-18 08ก&x8Fy4#$% Export ก)&0ก Tree Magik [1] Draemon Game 21 STEP13. 4EกVertext Lighting 8=&#$% 2-19 ? 2-19 08กG10G;Cก,C FC [1] 4Eก Texture #$%&: 1 <G,FC04C4Eก texture Layer 8=&#$% 2-20 ? 2-20 08กC Layer <G,FCG )&0ก gile[s] [1] Draemon Game 22 4Eก Alpha E%G;CC FCก8 Transparency 8=&#$% 2-21 ? 2-21 08ก&,C FCG;C&: 0,,F1$E9 ;4G )&0ก gile[s] [1] STEP14. 80$ก9กo&: o8=&#$% 2-22 ? 2-22 08 map #$%$C FC04+0G )&0ก gile[s] 04C [1] Draemon Game 23 STEP15. Export &: Fy4 ก34 .dbo 92E%Fy4 04+ LightMap &: 2E%8$"ก E% F1G;C, ก,MapE% 8=&#$% 2-23 ? 2-23 08ก, #'ก map 04+0 [1] STEP16. N#18=&#$% 2-24 ? 2-24 08กก; 81map#$%save [1] Draemon Game 24 STEP17. &x8 Dark Basic Pro <'9 04C<$" Code 6E%#8, Map #$%C<'9 8=&#$% 2-25 ? 2-25 08ก<$" )z8E%);4804+08map [1] STEP18. E% )&0กกo&: o9 8=&#$% 2-26 ? 2-26 086#$%F8Cกก<$" )z808map [1] Draemon Game 25 3 -E#/-*ก ,# $9+&: กก41O'<9 1pG ก# F&O'"4+$"8<ก# #9;8G กCก )8"$"4+$"881F& $9 3.1 Software Specification • ก)81 D>6"O,3ก4E% #$%<)81 F8C • )81 Oกo,F##$%08"=1F8C • )81 OG2CF##$%กo,F8C • )81 O, F8CE%ก8&3space • O);4804+41 4F8C • O41 F8C2 level • C/ก04+08&+ก,1pGC 9F8C • OC04+08&4#9#$%F41ก8)81 04+&4"F8C • OC 310; 1ก08 04+Oกo,F<13กF8C • )81 O#6กGC 9F8C • Oก; 84G ก41 11 2$F8C • O4Eก4+G ก41 F8C • O08ก7,"7$ก41 F8C 3.1.1 ก+กกE1ก 81 1: D=C41 +C=3 <DE%#$%+F&21") ,+#$%O=ก<"=1, < )8"D=C41 +C กo,F#G;CF8C29 29 0กEก; FCFD121", ;,, <'9 < 04+29 #$%Eก3>0 ;,F<&+=<CF&21") ,+ Draemon Game 26 81 2: D=C41 +CD1 81 #$%; '%ก1 O'+%41 81 #$%F8C )8"6กG 81 #$% E กกo,F<13กG;CF8C 19 o8 E%&: <<> ก8G;Cก,2N=ก+ )8"D=C41 +C#6กG;C o6"G 4 180 #$ ;ก#F1o +$)กG;C4#G;1$ก9 3.1.2 +]/กE1ก D=C41 +C$",8,,)81 G;CF&G ###$%Cก)8" ,3)81 G;C8 F&#NC" ,3)81 G;C8 F&#< ,3)81 G;C8 F&8C ; C ,3)81 G;CO";4 ,3)81 G;C, F8C 3.2 System Architecture ? 3-1 Use case diagram Draemon Game 27 ก =&#$% 3-1 Use case diagram 7,")C+;1D=C41 ก,ก E%&x8ก+ &กA =G;CD=C41 )8"+$ = Play E%41 ก E%%41 ก+&กA4+G;C4Eก 2 E)81 04+)8$% 6"G ก+$ 2 level D=C41 +C41 D1 81 #$%; '%ก1 O'+F& 41 81 #$%F8C04++2 +E%41 D1 81 #$% = Motivation 08&: <ก ,ก7$ก41 ก = Exit กกก 3.3 System Design ก=&#$% 3-2 Flowchart <ก N'%08"4+$"804+E% F<1 p G ก41 ก )8"6"G ก+$4+G;C4EกG2C 2 E)81 04+)8$% N'%D=C41 O4Eก 4+F8C ก41 ก0,1ก&: 2 81 014+81 +$6ก#$%0ก1ก )8"81 0ก+ &: 6ก21";4E)81 E%%ก4++O=กก; 8G;C$ 3 2$ OCD=C41 O 21";4E) ,+F8C)8"F1"กo+OD1 F&41 81 #$% 2 F8C 04+E%%81 #$%4+ +O=กก; 8G;C$2$21 8$"ก ED=C41 O#6กF8C 3 9 ;ก#6กF8Co กo+2 + Draemon Game 28 . ? 3-2 Flowchart <ก Draemon Game 29 3.4 System Implementation 3.4.1 $*E 3D /0(.4(ก4 ก ? 3[3 )81 \ ? 3[3: )81 &: 4+;4ก#$%G2C41 ก E%%ก)81 +$ 3 2$ ? 3[4 )8$% \ ? 3[4: )8$%&: $ก4+; '%#$%G2C41 ก E%%ก)8$%+$ 3 2$ Draemon Game 30 ? 3[5 3 < \ ? 3[5: 3 < +30; 18 "=1,p O%F41)81 E%8 <CG +"+Gก4CF8C 04+E%)8 )81 +#G;C42$484 ? 3-6 G,8G2C, \ ? 3-6: G,8&: F##$%)81 +Cกo,G;CF8CE%#$%+, <'9 , 6=<F& 21") ,+F8C Draemon Game 31 ? 3-7 ) ,+ \ ? 3-7: ) ,++O=ก<"=1, 6=< )81 21" N'%&: 6+ก0ก< )81 ? 3-8 C FC \ ? 3-8: C FC#$%Cก)&0ก Tree Magik G2Cก016"G /ก Draemon Game 32 ? 3-9 ก4Eก4+ \ ? 3-9: 6"G ก D=C41 O4Eก4+#$%G2CG ก41 กF8C )8"$ 2 4+G;C4EกE )81 04+)8$% ? 3-10 0<1< \ ? 3-10: #$%G2CG ก41 81 0ก &: ;>C Draemon Game 33 ? 3-11 ก3>0 \ ? 3-11: ก3>0&: F##$%)81 C F&21") ,+#$%O=ก<"=1, 6=< ? 3-12 81 #$% \ ? 3-12: G 81 #$%+&: ก#6กGC 9 Draemon Game 34 ? 3-13 &4GC 9 \ ? 3-13: 6"GC 9+$&4N'%1" 94E% #$%F8C"=1 2 2 8 N'%$#9&4&+6# #%F&04+&4&+6#83C" ? 3-14 ;>C \ ? 3-14: ก; Eก&404CE%%$ G;Cก,/ก'$;>C<'9 "=1, E9 GC 9 Draemon Game 35 ? 3-15 กC ; \ ? 3-15: GC 9+CกC ; E%%$ G;Cก,/ก )8""=1ก+"G 0; 11p ? 3-16 ;1" \ ? 3-16: GC 9+C1"E%%$ G;Cก,/ก )8""=1ก+"G 0; 11p Draemon Game 36 ? 3-17 yก \ ? 3-17: GC 9+CyกE%%G;Cก,/ก )8"ก+" 08G 0; 11p ? 3-18 F<13ก \ ? 3-18: F<13ก&: F##$%+Cกo,G;CF8C 19 o8G 81 #$% 2 )8"+3108 G 0; 11p Draemon Game 37 3.4.2 ก "# $Sก ก8<^กH<FB ? 3-19 08ก);486 \ ? 3-19: % load object 2E%)y48/2E%Fy4.x,92E%6#$%);48 04+ ก; 80 1กO38C"1 position object 2E%6,x,y,z C#9"1 <"" =&68C" % scale object 2E%6,x,y,z ( G กก; 8< 8=&6$< 8#1ก #98C ) Draemon Game 38 _`ก> กก8 JH8 !ก< ? 3-20 08yvก2 ก; 80; 1ก086 \ ? 3-20: &: กก; 80; 1#$%+086กก)8"C<0; 1 04+ก4E% #$%<)81 ก I!9JH8 !I O :ก9 ? 3-21 08ก310; 1083 < \ ? 3-21: ก)z8$กC3 <#9;8 10 2E%1 3500 { 3510 G;C$< 8 600x600x600 $1#1ก, 1 ก; 8o#1ก,4000 Draemon Game 39 JJH8 !:9! ก I ? 3-22 08ก,0; 1)81 ก, 3 < \ ? 3-22: &: ก,10; 1<3 <;1ก0; 1<)81 C"ก110000 ;EF1 OC;ก C"ก1G;C3 <%<C;)81 >B< ? 3-23 08กC,4 \ ? 3-23: ก)z8&: ก,,4 OC4;4E0 G;Cก; 80; 1 )81 ก,#$%0; 1%C G;1 04+ก; 814G;C$< 8200#1ก,1%C Draemon Game 40 กH<FI9:9! ? 3-24 08กC04+,3)81 \ ? 3-24: ก)z8&: กC0&E%กo,10; 1)81 04+ก ,3ก4E% #$%<)81 #$",8 Draemon Game 41 กHH<FI9ก:< a8:9! =F ? 3-25 08กC04+,3)81 <*+, \ ? 3-25: E%)81 กo,F#ก; 21", 04C +Oก8&3spaceE% , F8C 04+,,##ก, F8CD1 #$",8 กJ!B<:B:กO89! ? 3-26 08ก,14E%ก8G;1 \ ? 3-26: ก)z8&: ก, 1OC4$1 C"ก1;E#1ก, 0 G;CC ,4<'9 G;1$< 8#1ก, 200 04+48 2$4 1 ก#9;8 3 2$ 04+ก; 8ก 08)81 $ก9G 0; 1%ก Draemon Game 42 _`ก> ก8 frame ? 3-27 08yvก2 ก; 8 frame \ ? 3-27: &: ก81ก, object E%$"กG2C frame _`ก> Collision_Map ? 3-28 08yvก2 Collision_Map \ ? 3-28: &: กC0) CO1G;Cก,)81 E%#$%)81 +O"E "=1, E9 ,;E, < 04+&: กก; 8F1G;C)81 8 #+436=<F8C Draemon Game 43 _`ก> value1 ? 3-29 08yvก2 value1 \ ? 3-29: &: กC0&<'9 E%กo,1ก8#$%)81 "E "=1 * 0; 1 &v3, _`ก> Collision_Map2 ? 3-30 08yvก2 Collision_Map2 \ ? 3-30: &: กC0) CO1G;Cก,3 < E%3 <"=1G 0; 1#$%=ก1 E9 map G;C3 <O"E , E9 mapG 4ก(*+1pF8C)8"#$%F1#+436=< 04+E%3 <8 F& 2 6=< G;C3 <8 ก4,กF8C)8"F18"=1ก,#$% Draemon Game 44 _`ก> AICollisionMAP ? 3-31 08yvก2 AICollisionMAP \ ? 3-31: &: yvก2 #$%G2C,+"+;1+;1)81 ก,3 < _`ก> ก8 ก: I ? 3-32 08yvก2 ก; 8ก8 <3 < \ ? 3-32: yvก2 movefront &: ก%G;C3 <8 F&<C; C 04+yvก2 moveback &: ก%G;C3 <8 FC ;4 Draemon Game 45 ? 3-33 08E% F<ก&4$%" 81 \ ? 3-33: &: กก; 8E% F<ก41 G 014+81 )8"ก; 81E% state=1 G;C08O3G 0; 11p#$%+08G 81 0ก 04+E% state=2 G;C08O3G 0; 1 1p#$%Cก+08G 81 #$% ? 3-34 08yvก2 ก3108F<13ก \ ? 3-34: 08yvก2 #$%31080; 1<F<13ก 50 o8 Draemon Game 46 ? 3-35 08yvก2 ก3108&4 \ ? 3-35: 08yvก2 #$%31080; 104+ก4E% #$%<&4 10 ? 3-36 08yvก2 ก4Eก4+ \ ? 3-36: 08yvก2 ก4Eก4+)8"ก2oก2 +;1=&6ก, ;ก2 ก,6F; G;CG2C4+#$%4Eก&: 41 Draemon Game 47 ? 3-37 08yvก2 กก; 84G 81 #$% 2 \ ? 3-37: 08yvก2 กก; 84G 81 #$% 2 )8"G;C4484E%"p #1ก, 0 E%#1ก, 0 04C G;C%C G;1 ;ก"$2$;4E"=1 ? 3-38 08yvก2 กกo,F<13กG 81 #$% 2 \ ? 3-38: 08yvก2 กกo,F<13กG 81 #$% 2 )8"G;CF<13ก484#$4+; '%E% 2 ก,4+ 04CG;C4,F<13กo8 9 ก Draemon Game 48 3.5 S`ก*+ B..2551 ก: / F F:< 9gI 1 2 3 กกh9 4 1 2 89 3 4 1 2 3 ก 4 1 2 3 JI<9 4 1 2 3 'ก(กCก 04+)&0ก Dark Basic Professional ก0,, Background 04+ก0,,4+ <$" )z8);48)81 G;C"=1, /ก#$%F8CCFCก )&0ก T.ED 04+ gile <$" yvก2 ก4C <$" yvก2 ,3ก4E% #$%<)81 J? 3[1 0D ก8 ก Project 1 Draemon Game 49 4 B..2551 ก: / F F:< 9gI 1 2 3 กกh9 4 1 2 89 3 4 1 2 3 ก 4 1 2 3 JI<9 4 1 2 3 4 <$" yvก2 08F#G,804+กo,F#E% , F8C <$" yvก2 083 <0,,random 04+O %F41)81 F8C <$" yvก2 08) ,+ <$" yvก2 08ก3>0#$%O21") ,+F8C <$" yvก2 08F#E% p <$" yvก2 080; 11p, mapF8C #" J? 3[1 0D ก8 ก Project 1 (1) Draemon Game 50 B..2551 ก: / F F:< Biก 1 2 3 \ 9 4 1 2 3 9ก9 4 1 2 3 กI9B \> 4 1 2 3 9? 9 4 1 2 3 4 ก0,,04+C/กG 81 <$" yvก2 G;CO0881 F8C <$" yvก2 F1G;C%<G 81 0ก08G 81 04+F1G;C%<G 81 08G 81 0ก C&+ก,1pGC 9 08;1" ;>C 04+กC ; G /ก Cyก04+3108G 0; 11p <$" yvก2 08&4#$%O4E% #$%F8CGC 9 J? 3[2 0D ก8 ก Project 2 Draemon Game 51 B..2551 ก: / F F:< Biก 1 2 3 \ 9 4 1 2 3 9ก9 4 1 2 3 กI9B \> 4 1 2 3 9? 9 4 1 2 3 4 C&4$ก2 804+<$" yvก2 G;CF41ก8)8 1 <$" yvก2 08F<13ก04+Oกo,F<13กF8C <$" yvก2 G;CO4Eก4+G ก41 F8C <$" yvก2 ,ก #" J? 3[2 0D ก8 ก Project 2 (1) Draemon Game 52 4 ก*E# SE`Eก*E# ,# $9+ก41O'D4#$%F8Cกก#) &v>;#$%ก8<'9 กก#) 04+ <C 0 +E% ) $9F&Z 1F& 4.1 `Eก*E# ? 4-1 =ก1 <C41 ก \ ? 4-1: E%% ก+&กA; C =G 4Eก1+<Cก;Eกกก ? 4-2 ก4Eก4+ \ ? 4-2: E%4Eก =#$%+%41 ก+&กA4+G;C4EกE)8 1 04+)8$% Draemon Game 53 ? 4-3 7,"ก41 กG 81 #$% 1 \ ? 4-3: E%4Eก4+04C +$; C087$ก41 กG 81 #$% 1 ก1 #$%+ <C=1ก ? 4-4 ก%ก81 #$% 1 \ ? 4-4: ;4ก#$%F8C4Eก4+FC04C E%<C=1ก+084+#$%41 #$%F8C4EกFC ? 4-5 42$G 81 #$% 1 \ ? 4-5: G ก41 81 #$% 1 D=C41 +C;4,;4$ก3 < E%ก3 <+1"% <C#C"#G;C$"42$F& )8"142$%C +$"=1o,4 Draemon Game 54 ? 4-6 2$G 81 #$% 1 \ ? 4-6: E%%ก+$ 2$#1ก, 3 01E%42$;84 2$ กo+484E%"p " ? 4-7 กG2CF#G 81 #$% 1 \ ? 4-7: กกo,04+G2CF#ก; FCFD1 OG2CF8Cก,#94+ ? 4-8 #$%กก<) ,+ \ ? 4-8: E%กo,F##$%&: 1ก21";4E) ,+ D=C41 +CG2Cก; FCFD121", , <'9 F&, 6=< E%21") ,+ Draemon Game 55 ? 4-9 7,"7$ก41 G 81 #$% 2 \ ? 4-9: E%D=C41 41 D1 81 #$%1 +%41 1G 81 #$% 2 )8"+087$ก 41 G 81 #$% 2 ก1 +<C=1ก ? 4-10 ก%กG 81 #$% 2 \ ? 4-10: E%D=C41 41 D1 81 #$%1 E%%41 G 81 #$% 2 กo"&: 4+ #$%F8C4EกFC901 0ก N'%4+#9O41 F8C#9G 81 #$% 1 04+81 #$% 2 Draemon Game 56 ? 4-11 กกo,F#G 81 #$% 2 \ ? 4-11: E%D=C41 41 D1 81 #$%1 E%%41 G 81 #$% 2 +$F#%C 19 04C+1"p484E%"pE%D=C41 กo,F<13ก )8"$4G กกo, 180 #$ (10800 Time) ? 4-12 2$G 81 #$% 2 \ ? 4-12: E%D=C41 41 D1 81 #$%1 E%%41 G 81 #$% 2 D=C41 +$ 2$ %C #$% 3 ;ก6"G 3 9F1Oกo,F<13กF8C;8 กo+0C ? 4-13 4G 81 #$% 2 \ ? 4-13: E%D=C41 41 D1 81 #$%1 E%%41 G 81 #$% 2 +$42$o 01 E%O=ก&4#$%83C"ก8+#G;C42$484 04+"F8CG #$%38 Draemon Game 57 ? 4-14 41 0C \ ? 4-14: G <*+#$%D=C41 41 "=1#9G 81 #$%1 04+81 #$% 2 ;ก", 3 9กo +0C )8"+08; C8=& ? 4-15 41 2 + \ ? 4-15: E%D=C41 41 D1 #981 #$% 1 04+81 #$% 2 +&กA; C86 N'% ;"O'1D=C41 2 + Draemon Game 58 4.2 `E กกก0,, 04+#) )81 D>6" #G;CD=C8#OC)81 D>6"F8Co,1 )8"ก$3*,8 $9 • ก0,,04+C /ก04+4+ • <$"8)z8E%);484+4/ก • <$" )z8,3ก4E% #$%<)81 • <$" yvก2 );4804+08F#04+OG2CF#F8C • <$" yvก2 );4804+41 4F8C • <$" yvก2 08 random 083 < • <$" yvก2 G;C3 <O%F41)81 F8C • <$" yvก2 080; 1#$%)81 "=1G ก • <$" yvก2 080; 1) ,+04+O21") ,+F8C • <$" yvก2 G;CO41 D1 F&81 F8C • C/ก#$%&: 9F8C • C&404+&+ก,6"G /ก • <$" yvก2 08&404+#G;C&4F41ก8)81 F8C • <$" yvก2 3108yก • <$" yvก2 3108F<13ก • <$" yvก2 G;C)81 Oกo,F<13กF8C • <$" yvก2 G;CกO4Eก4+F8C • <$" yvก2 ,ก Draemon Game 59 4.3 abDSE# • E%กกC)84#$%G2C&+ก,ก&: 0,, 04+CG2C)&0ก &+ก,กCก #G;CCG2C4G ก'ก(กG2C <014+)&0ก • E%ก6( DarkBASIC &: 6(#$%F1"$" =Cก1 '$&v>;G กG2C% 1p < DarkBASIC • G ก<$" )&0ก=&0,,<6( DarkBASIC $4ก(*+&: ก8กก,4< )8" C ก *&: ;4ก )8"/+กC object +กo,&: =&0,,4< '# G;C"ก0กก&,&3 code • E%กกCกG;C$81 04+$;4ก;4"G 014+81 #G;CC<$" source code ก #G;C"ก0ก1กC ;0&48 04+N9NC <2E% 0&4 • ก&+4D4#$%E%<C=ก41 ก412C 4.4 "4##S / S ก891# • O4Eก4+G ก41 F8C • ก08D41 p G;C$&+#76"%<'9 • กZ G E%<กC/ก 4+G กG;C$"%<'9 Draemon Game 60 ,* 3ก [1] [2] ก Map OHก9 T.ED, gile[s] H<F Tree Magik, http://www. thaigameadvance.com/modules.php?name=News&file=article&sid=5 Unknown, Access time: November 28,2007 กก:ก? ก:ก9 http://web.nkc.kku.ac.th/473230467-3/pdf/projectdoc.pdf Unknown, Access time: 2005 [3] C J กJJCHก9 Adobe Photoshop cs, http://www.arip.co.th/2006 /mag_list.php?g3=3&ofsy=2004&ofsm=2&id=winmag&g3s=3&halfmonth=1&mag_no=1 27&element_id=406492 Unknown, Access time: February , 2004 [4] C J กJJCHก9 Dark Basic Professional, http://web.nkc.kku.ac.th /473230467-3/pdf/manual_install.pdf Unknown, Access time: 2007 [5] 9ก8 , http://209.85.175.104/search?q=cache:oT42zLgXKG0J: 202.28.94.55/members/463020087-2/progass1.doc Unknown, Access time: August, 2006 [6] I Hก9:ก999JH8! J, http://www.designparty.com/tutorials /view.php?cid=00215 Unknown, Access time: February 28, 2003 Draemon Game 61 6D ก ก C J กJJCHก9 Dark Basic Professional 1. &x8Fy4)&0ก Dark Basic Professional 2. Extracting from Dark Basic Professional E%4EกFy489 Draemon Game 62 3. &x8<CF&Folder Dark Basic Professional 4. ก 9 4Eก Folder Editor 04C4Eก Open CG2C F8C4"8=& Draemon Game 63 5. ก&x8G2C )&0ก drak Basic Professional C J กJJCHก9 Milkshape 3D 1.7.9 Setup 1.49ก&x8Fy4;,89 Draemon Game 64 2.ก8Next 3. 4EกE9 #$%#$%Cก89 Draemon Game 65 4. 49ก Install E%89)&0ก 5. 49ก Finish Draemon Game 66 6. ก89)&0ก MilkShape o,=* CG2C F8C C J กJJCHก9 gile 1. 49ก&x8Fy4;,89 Draemon Game 67 2. 4Eก#$% I accept the agreement 3. 4EกE9 #$%#$%89 Draemon Game 68 4.ก8 Next E%8 ก1 5.ก8 Next E%8 ก1 Draemon Game 69 6. ก8 Install E%89)&0ก 7. ก8 Finish Draemon Game 70 8. ก89)&0ก gile o,=*CG2C C J กJJCHก9 TreeMagikG3_TGC_30Aug 1. &x8Fy4;,89)&0ก TreeMagikG Draemon Game 71 2. ก8 Next E%8 ก1 3. 4Eก#$% Yes E%8 ก1 Draemon Game 72 3. ,E9 #$%#$%89)&0ก 4. ก8 Next E%89)&0ก Draemon Game 73 2. 4Eก#$% Finish E%8 ก1 8. ก89)&0ก Treemagik o,=*CG2C Draemon Game 74 C J กJJCHก9 T.ED_full_setup 1. &x8Fy4;,89)&0ก 2. ",E% F<ก89)&0ก Draemon Game 75 3. ก8 Next E%89)&0ก 4. 4EกE9 #$%;,89)&0ก Draemon Game 76 5. ก8 Next E%8 ก1 6. ก8 Install E%%89)&0ก Draemon Game 77 7. 4Eก#$% Finish E%8 ก1 8. ก89)&0ก T.EDo,=*CG2C Draemon Game 78 C J กJJCHก9 Adobe Photoshop cs E%G10D1 N$8$)&0ก4F&+08; C1 Adobe Photoshop CS with ImageReady CS Cก,G;CD=CG2C F8C4Eก6(#$%CกG2C ก4,oกN Select the Language... G;C49ก4EกF&#$% US English (;E6(E% p #$%Cก 01C&: 6(#$% )&0ก,) 04C49ก&3 OK ก 9 +08; C1 End User License Agreement E%G;C1 <Cก4G กG2C )&0ก 04C49ก&3 Accept +08; C1O8G;CF&49ก#$% Install Adobe Photoshop CS with ImageReady CS ก 9 +08; C1 Adobe Photoshop CS and ImageReady CS Setup E%%C ก <C=1N8ก89)&0กG;C49ก&3 Next 08; C1ก89)&0ก ก 9 +08F8+4oก,oกN0CE 1G;C&x8042 #9 ;8ก1 04C49ก&3 OK 08; C1G ก4Eก6(G กG2C Draemon Game 79 O8+08; C1 License Agreement Language Selection )8"G;C49ก4Eก#$%6( US English 04C49ก&3 Next ก 9 +08; C Software License Agreement 04CG;CF&49ก#$%&3 Accept O8+08; C1 Customer Information E%G;Cกก<C=4D=CG2C 4F& 04C49ก &3 Next O8+08; C1ก$#C08<C=4D=CG2C G;C49ก&3 Yes ก 9 +08; C1 Choose Destination Location C08)y48#$%G2CG ก 89)&0ก G;C49ก&3 Next O8+08; C1 File Association E%G;C49ก4Eก1CกG;CFy4=&6 ก34G8&x88C")& 0ก Adobe Photoshop ;E ImageReady ;4ก 9 G;C49ก &3 Next O8+08<C=4ก$%"ก,1ก89)&0กE%G;CD=CG2 C F8C4Eก&, Cก 04CG;C49ก&3 Next E%Gก4C89)&0กo9 +08F8+4oก,oกN Adobe Activation E%G;C4Eก 1Cก Activation Options =&0,,G8 +G 2 #$% $9&: )&0ก Adobe Photoshop #$%OG2C F8C 30 ;4ก 9 Cก#ก Activation ;E ก,D46*?<#1" Macromedia G;C49ก49ก&3 Next E%ก89)&0กo$",C"04C+08; C1 Setup is complete. 04+& 2 Display Photoshop Readme file +O=ก4EกG;C49ก&3 Finish ก 9 +08F8+4oก,oกN Thank you for choosing Adobe Photoshop CD and ImageReady CS. G;C49ก&3 OK E%กกก89)&0ก ก$"กG2C )&0ก Draemon Game 80 6D ก < [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] Make Memblock 1,1024 hide mouse :backdrop off load image "img/load.jpg",999 set text font "arial" : set text size 16 set text to bold : set text transparent paste image 999,0,0:sync set global collision on SET DISPLAY MODE 800, 600, 32 global rate# = 0 set camera range 1,150000 lat=10800 state=1 st=0 smon=0 item=19 round#=3 energy#=200 load object "mep/mep.dbo",1 SET OBJECT TRANSPARENCY 1,3 set object light 1,2 load object "mep2/ground7.dbo",919 SET OBJECT TRANSPARENCY 919,3 set object light 919,2 load object "model/model.x",2 position object 2,3540,5,3520 load object "sky\skybox.x",200 load object "home2\hioe.x",104 load object "home2\hioe.x",105 load object "home2\hioe.x",106 Draemon Game 81 [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] [59] [60] [61] [62] [63] [64] [65] [66] load object "home2\hioe.x",107 load object "home2\hioe.x",108 load object "home2\hioe.x",109 load object "wing1\wing1.x",500 load image "img\game_over.jpg",11 key$="wate" load object "key/key.x",600 load object "nobita/nobita.x",700 scale object 700,250,250,250 load object "cage\cage.x",51 scale object 51,200,200,200 load image "img\1.jpg",12 sprite 12,0,0,12 load image "img\play.jpg",13 sprite 13,350,310,13 load image "img\exit.jpg",14 sprite 14,350,370,14 load image "img\winner.jpg",15 sprite 15,0,0,15 hide sprite 15 sprite 11,0,0,11 hide sprite 11 load image "img\basic.jpg",17 sprite 17,0,0,17 hide sprite 17 load image "img\mon1.jpg",20 sprite 20,100,200,20 hide sprite 20 load image "img\mon2.jpg",21 sprite 21,450,200,21 hide sprite 21 load image "img\lavel1-1.jpg",18 sprite 18,0,0,18 hide sprite 18 load image "img\lavel2.jpg",19 Draemon Game 82 [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] sprite 19,0,0,19 hide sprite 19 load object "rock\rock.x",9000 load object "rock\rock.x",9200 load object "rock\rock.x",9400 load object "rock\rock.x",9600 load object "rock\rock.x",9800 scale object 9000,400,400,400 scale object 9200,600,600,600 scale object 9400,300,300,300 scale object 9600,300,300,300 scale object 9800,200,200,200 set object light 9000,1 set object light 9200,1 set object light 9400,1 set object light 9600,1 set object light 9800,1 load object "fish\plant_slender.x",41000 load object "fish\plant_slender.x",43000 load object "fish\plant_slender.x",45000 load object "fish\plant_slender.x",47000 load object "fish\plant_slender.x",49000 scale object 41000,1700,1700,1700 scale object 43000,700,700,700 scale object 45000,1000,1000,1000 scale object 47000,1500,1500,1500 scale object 49000,2000,2000,2000 set object light 41000,1 set object light 43000,1 set object light 45000,1 set object light 47000,1 set object light 49000,1 load object "new\new.x",20000 load object "new\new.x",21000 load object "new\new.x",22000 Draemon Game 83 [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] load object "new\new.x",23000 load object "new\new.x",24000 load object "new\new.x",25000 load object "new\new.x",26000 load object "new\new.x",27000 load object "new\new.x",28000 load object "new\new.x",29000 scale object 20000,400,400,400 scale object 21000,300,300,300 scale object 22000,200,200,200 scale object 23000,300,300,300 scale object 24000,400,400,400 scale object 25000,300,300,300 scale object 26000,400,400,400 scale object 27000,200,200,200 scale object 28000,300,300,300 scale object 29000,400,400,400 set object light 20000,1 set object light 21000,1 set object light 22000,1 set object light 23000,1 set object light 24000,1 set object light 25000,1 set object light 26000,1 set object light 27000,1 set object light 28000,1 set object light 29000,1 load object "fish\plant_slender.x",40006 load object "fish\plant_slender.x",42002 load object "fish\plant_slender.x",44004 load object "fish\plant_slender.x",47008 load object "fish\plant_slender.x",49010 load object "fish\plant_slender.x",49012 scale object 40006,800,800,800 scale object 42002,900,900,900 Draemon Game 84 [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] scale object 44004,800,800,800 scale object 47008,1500,1500,1500 scale object 49010,800,800,800 set object light 40006,1 set object light 42002,1 set object light 44004,1 set object light 47008,1 set object light 49010,1 set object light 49012,1 load object "fish\plant_slender.x",41014 load object "fish\plant_slender.x",43016 load object "fish\plant_slender.x",45018 load object "fish\plant_slender.x",47020 load object "fish\plant_slender.x",49022 load object "fish\plant_slender.x",49024 scale object 41014,800,800,800 scale object 43016,700,700,700 scale object 45018,1000,1000,1000 scale object 47020,900,900,900 scale object 49022,800,800,800 scale object 49024,800,800,800 set object light 41014,1 set object light 43016,1 set object light 45018,1 set object light 47020,1 set object light 49022,1 set object light 49024,1 load object "fish\plant_slender.x",40026 load object "fish\plant_slender.x",42028 load object "fish\plant_slender.x",44030 load object "fish\plant_slender.x",46032 scale object 40026,800,800,800 scale object 42028,900,900,900 scale object 44030,800,800,800 scale object 46032,1200,1200,1200 Draemon Game 85 [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205] [206] set object light 40026,1 set object light 42028,1 set object light 44030,1 set object light 46032,11 load object "new\new.x",20001 load object "new\new.x",22003 load object "new\new.x",24005 load object "new\new.x",26007 load object "new\new.x",28009 load object "new\new.x",20011 load object "new\new.x",22013 load object "new\new.x",24015 load object "new\new.x",26017 load object "new\new.x",28019 scale object 20001,100,100,100 scale object 22003,200,200,200 scale object 24005,400,400,400 scale object 26007,400,400,400 scale object 28009,300,300,300 scale object 20011,100,100,100 scale object 22013,200,200,200 scale object 24015,400,400,400 scale object 26017,400,400,400 scale object 28019,300,300,300 set object light 20001,1 set object light 22003,1 set object light 24005,1 set object light 26007,1 set object light 28009,1 set object light 20011,1 set object light 22013,1 set object light 24015,1 set object light 26017,1 set object light 28019,1 Draemon Game 86 [207] [208] [209] [210] [211] [212] [213] [214] [215] [216] [217] [218] [219] [220] [221] [222] [223] [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235] [236] [237] [238] [239] [240] [241] Mouse=9 Load Image "img\Mouse.png",Mouse load sound "mv.wav",1 wing#=0 xrotate object 500,180 scale object 500,200,200,200 set object light 200, 0 set object texture 200, 3, 1 position object 200, 1000, 0, 4000 scale object 200,50000,50000,50000 scale object 1,1000,1000,1000 scale object 919,1000,1000,1000 scale object 2,300,300,300 scale object 104,1000000,1000000,1000000 scale object 105,1000000,1000000,1000000 scale object 106,700000,700000,700000 scale object 107,850000,850000,850000 scale object 108,700000,700000,700000 scale object 109,1000000,1000000,1000000 set object light 107,1 yrotate object 107,-60 set object light 104,1 set object light 106,1 set object light 109,1 set object light 105,1 yrotate object 105,100 set object light 108,1 yrotate object 108,135 heroframe#=total object frames(2)/200.0 set object speed 2,3000 nobitaframe#=total object frames(700)/200.0 set object speed 700,3000 Draemon Game 87 [242] [243] [244] [245] [246] [247] [248] [249] [250] [251] [252] [253] [254] [255] [256] [257] [258] [259] [260] [261] [262] [263] [264] [265] [266] [267] [268] [269] [270] [271] [272] [273] [274] [275] [276] global att = 0 global status$="wait" global charector = 2 global charectorhigh = 5 posx# = object position x(charector) posy# = object position y(charector) posz# = object position z(charector) anglex# = object angle x(charector) angley# = object angle y(charector) anglez# = object angle z(charector) HP#=100.0 SP#=100.0 global startmove# as float = 20.0 global endmove# as float= 40.0 global startatt1# as float=40.0 global endatt1# as float = 60.0 global startatt2# as float= 60.0 global endatt2# as float= 80.0 global startatt3# as float= 80.0 global endatt3# as float= 100.0 global startuderatt# as float= 100.0 global endunnderatt# as float= 120.0 global startjump# as float= 120.0 global endjump# as float= 140.0 global startdeath# as float= 140.0 global enddeath# as float= 160.0 global gravity# as float= 90.0 SET OBJECT COLLISION TO SPHERES charector SET OBJECT RADIUS charector, 2 global Cjumppowermax# = 5.0 global Cradius# as float = 4.0 checkatt = 180 damage=40 ops=1 opa=1 Draemon Game 88 [277] [278] [279] [280] [281] [282] [283] [284] [285] [286] [287] [288] [289] [290] [291] [292] [293] [294] [295] [296] [297] [298] [299] [300] [301] [302] [303] [304] [305] [306] [307] [308] [309] [310] [311] SET OBJECT COLLISION TO SPHERES charector SET OBJECT RADIUS charector, 2 global Cjumppowermax# = 5.0 global Cradius# as float = 4.0 Cjumppower# = 0 checkatt = 180 make object cube checkatt,2 hide object checkatt load object "model\model1.X",22222 position object 22222,3540,5,3520 yrotate object 22222,-90 scale object 22222,300,300,300 global att = 0 global status$="wait" global charectorhigh = 5 posx# = object position x(22222) posy# = object position y(22222) posz# = object position z(22222) anglex# = object angle x(22222) angley# = object angle y(22222) anglez# = object angle z(22222) HP#=100.0 SP#=100.0 global startmove# as float = 20.0 global endmove# as float= 40.0 global startatt1# as float=40.0 global endatt1# as float = 60.0 global startatt2# as float= 60.0 global endatt2# as float= 80.0 global startatt3# as float= 80.0 global endatt3# as float= 100.0 global startuderatt# as float= 100.0 global endunnderatt# as float= 120.0 Draemon Game 89 [312] [313] [314] [315] [316] [317] [318] [319] [320] [321] [322] [323] [324] [325] [326] [327] [328] [329] [330] [331] [332] [333] [334] [335] [336] [337] [338] [339] [340] [341] [342] [343] [344] [345] [346] global startjump# as float= 120.0 global endjump# as float= 140.0 global startdeath# as float= 140.0 global enddeath# as float= 160.0 global gravity# as float= 90.0 SET OBJECT COLLISION TO SPHERES 22222 SET OBJECT RADIUS 22222, 2 global Cjumppowermax# = 5.0 global Cradius# as float = 4.0 checkatt = 180 damage=40 ops=1 opa=1 SET OBJECT COLLISION TO SPHERES 22222 SET OBJECT RADIUS 22222, 2 global Cjumppowermax# = 5.0 global Cradius# as float = 4.0 Cjumppower# = 0 checkatt = 180 heroframe#=total object frames(22222)/200.0 spd# = 15 hide object 22222 gamecon=0 spd#=17 up$="wait" startmon2 =3200 endmon2 =3220 dim monter#(endmon2) dim delayenemy2(endmon2) dim estatus$(endmon2) dim eatt(endmon2) dim HPmon#(endmon2) Draemon Game 90 [347] [348] [349] [350] [351] [352] [353] [354] [355] [356] [357] [358] [359] [360] [361] [362] [363] [364] [365] [366] [367] [368] [369] [370] [371] [372] [373] [374] [375] [376] [377] [378] [379] [380] [381] dim monstatus$(endmon2)="wait" underatt2 = 0 mon2=111 load object "dog\dog.x",mon2 position object mon2,3500,30,3540 scale object mon2,300,300,300 loop object mon2,0*monframe#,20*monframe# set object speed mon2,40000 set object light mon2,1 hide object mon2 for i =startmon2 to endmon2 clone object i,mon2 HPmon#(i)=100 SET OBJECT COLLISION TO SPHERES i SET OBJECT RADIUS i, 2 SC_SetupObject i,1,1 px=rnd(13100) pz=rnd(6250) yrotate object i,rnd(360) position object i,px,10,pz monframe#=total object frames(i)/200.0 next i startmon5 =3400 endmon5 =3420 dim monter5#(endmon5) dim delayenemy5(endmon5) dim estatus5$(endmon5) dim eatt5(endmon5) dim HPmon5#(endmon5) dim monstatus5$(endmon5)="wait" underatt5 = 0 mon5=1112 load object "fish\fish.x",mon5 position object mon5,4057,2000,4235 Draemon Game 91 [382] [383] [384] [385] [386] [387] [388] [389] [390] [391] [392] [393] [394] [395] [396] [397] [398] [399] [400] [401] [402] [403] [404] [405] [406] [407] [408] [409] [410] [411] [412] [413] [414] [415] [416] scale object mon5,200,200,200 loop object mon5,0*monframe#,20*monframe# set object speed mon5,1000 set object light mon5,2 hide object mon5 for p =startmon5 to endmon5 clone object p,mon5 HPmon5#(p)=100 SET OBJECT COLLISION TO SPHERES p SET OBJECT RADIUS p, 2 SC_SetupObject p,1,1 px=rnd(4000) pz=rnd(4000) yrotate object p,rnd(360) position object p,px,200,pz monframe#=total object frames(p)/400.0 next p startmon7 =3600 endmon7 =3615 dim monter7#(endmon7) dim delayenemy7(endmon7) dim estatus7$(endmon7) dim eatt7(endmon7) dim HPmon7#(endmon7) dim monstatus7$(endmon7)="wait" underatt7 = 0 mon7=1312 load object "m\m.x",mon7 position object mon7,4000,2000,4236 scale object mon7,200,200,200 loop object mon7,0*monframe#,20*monframe# set object speed mon7,1000 set object light mon7,2 hide object mon7 Draemon Game 92 [417] [418] [419] [420] [421] [422] [423] [424] [425] [426] [427] [428] [429] [430] [431] [432] [433] [434] [435] [436] [437] [438] [439] [440] [441] [442] [443] [444] [445] [446] [447] [448] [449] [450] [451] for w =startmon7 to endmon7 clone object w,mon7 HPmon7#(w) =100 SET OBJECT COLLISION TO SPHERES w SET OBJECT RADIUS w, 2 SC_SetupObject w,1,1 px=rnd(4000) pz=rnd(4000) yrotate object w,rnd(360) position object w,px,200,pz monframe#=total object frames(w) /400.0 next w startmon6 =3800 endmon6 =3850 dim monter6#(endmon6) dim delayenemy6(endmon6) dim estatus6$(endmon6) dim eatt6(endmon6) dim HPmon6#(endmon6) dim monstatus6$(endmon6)="wait" underatt6 = 0 mon6=1212 load object "m\w1.x",mon6 position object mon6,3931,2000,4222 scale object mon6,300,300,300 loop object mon6,0*monframe#,20*monframe# set object speed mon6,1000 set object light mon6,2 hide object mon6 for n =startmon6 to endmon6 clone object n,mon6 HPmon6#(n) =100 SET OBJECT COLLISION TO SPHERES n SET OBJECT RADIUS n, 2 Draemon Game 93 [452] [453] [454] [455] [456] [457] [458] [459] [460] [461] [462] [463] [464] [465] [466] [467] [468] [469] [470] [471] [472] [473] [474] [475] [476] [477] [478] [479] [480] [481] [482] [483] [484] [485] [486] SC_SetupObject n,1,1 px=rnd(4000) pz=rnd(4000) yrotate object n,rnd(360) position object n,px,200,pz monframe#=total object frames(n) /400.0 next n startmon3 =4500 endmon3 =4550 mon3=222 load object "could\could.x",mon3 position object mon3,3500,3835,3540 scale object mon3,4000,4000,4000 loop object mon3,0*monframe#,20*monframe# set object light mon3,2 hide object mon3 for x =startmon3 to endmon3 clone object x,mon3 SET OBJECT COLLISION TO SPHERES x SET OBJECT RADIUS x, 2 SC_SetupObject x,1,1 px=rnd(13100) pz=rnd(6250) yrotate object x,rnd(360) position object x,px,700,pz monframe#=total object frames(x)/200.0 next x startmon9 =4400 endmon9 =4410 dim monter9#(endmon9) dim delayenemy9(endmon9) dim estatus9$(endmon9) dim eatt9(endmon9) Draemon Game 94 [487] [488] [489] [490] [491] [492] [493] [494] [495] [496] [497] [498] [499] [500] [501] [502] [503] [504] [505] [506] [507] [508] [509] [510] dim HPmon9#(endmon9) dim monstatus9$(endmon9)="wait" underatt9 = 0 mon9=732 load object "fish\fish4.x",mon9 position object mon9,3500,3835,3500 scale object mon9,300,300,300 loop object mon9,0*monframe#,20*monframe# set object speed mon9,9000 set object light mon9,2 hide object mon9 for s =startmon9 to endmon9 clone object s,mon9 HPmon9#(s)=100 SET OBJECT COLLISION TO SPHERES s SET OBJECT RADIUS s, 2 SC_SetupObject s,1,1 px=rnd(4000) pz=rnd(4000) yrotate object s,rnd(360) position object s,px,200,pz monframe#=total object frames(s)/200.0 next s [511] [512] [513] [514] [515] [516] [517] [518] [519] [520] st=0 if state=1 show sprite 18 sync sync sync sync hide sprite 18 endif Draemon Game 95 [521] [522] [523] [524] [525] [526] [527] [528] [529] [530] [531] [532] [533] [534] [535] [536] [537] [538] [539] [540] [541] [542] [543] [544] [545] [546] [547] [548] [549] [550] [551] [552] [553] [554] do if gamecon=0 Sprite Mouse,MouseX(),MouseY(),Mouse if Sprite Collision(Mouse,13) if MouseClick() hide sprite 12 hide sprite 13 hide sprite 14 gamecon=3 Endif Endif if Sprite Collision(Mouse,14) if MouseClick() exit Endif Endif endif if gamecon=3 sync sync show sprite 17 show sprite 20 show sprite 21 Sprite Mouse,MouseX(),MouseY(),Mouse if Sprite Collision(Mouse,20) if MouseClick() hide sprite 20 hide sprite 21 hide sprite Mouse model=22222 show object 22222 hide object 2 Draemon Game 96 [555] [556] [557] [558] [559] [560] [561] [562] [563] [564] [565] [566] [567] [568] [569] [570] [571] [572] [573] [574] [575] [576] [577] [578] [579] [580] [581] [582] [583] [584] [585] [586] [587] [588] [589] hide sprite 17 gamecon=1 Endif Endif if Sprite Collision(Mouse,21) if MouseClick() hide sprite 20 hide sprite 21 hide Sprite Mouse model=2 show object 2 hide sprite 17 hide object 22222 gamecon=1 Endif Endif endif if gamecon=1 hide sprite Mouse if state=1 position object 500, 3900, 10, 5000 position object 104,3500,5,5000 position object 105,5130,5,5130 position object 106,3550,5,5200 position object 107,3400,5,3400 position object 108,6700,5,5900 position object 109,5650,5,6850 position object 700,6409,531,3963 position object 51,6409,531,3963 position object 919,1700,0,1500 position object 600,6700,3,6084 hide object 919 for i = startmon5 to endmon5 Draemon Game 97 [590] [591] [592] [593] [594] [595] [596] [597] [598] [599] [600] [601] [602] [603] [604] [605] [606] [607] [608] [609] [610] [611] [612] [613] [614] [615] [616] [617] [618] [619] [620] [621] [622] [623] [624] hide object i next i for i = startmon6 to endmon6 hide object i next i for i = startmon7 to endmon7 hide object i next i for i = startmon9 to endmon9 hide object i next i Map=1 endif if state=2 if st=0 position object 2,4360,3,4293 position object 22222,4360,3,4293 st=1 endif hide object 1 hide object 51 hide object 104 hide object 105 hide object 106 hide object 107 hide object 108 hide object 109 hide object 500 hide object 600 hide object 700 Draemon Game 98 [625] [626] [627] [628] [629] [630] [631] [632] [633] [634] [635] [636] [637] [638] [639] [640] [641] [642] [643] [644] [645] [646] [647] [648] [649] [650] [651] [652] [653] [654] [655] [656] [657] [658] [659] Map=919 gosub _fish spd#=20 smon=1 for i = startmon2 to endmon2 hide object i next i for i = startmon3 to endmon3 hide object i next i for p =startmon5 to endmon5 Collision_Map2(p,Map,12,5,1,80) show object p next p for n =startmon6 to endmon6 Collision_Map2(n,Map,12,5,1,80) show object n for i=0 to 8 move object up n,i if y1#>=510 position object n,x1#,510,z1# endif next i next n for w =startmon7 to endmon7 Collision_Map2(w,Map,12,5,1,80) show object w next w position object 200, 1000, 0, 4000 position object 919,1700,0,1500 Draemon Game 99 [660] [661] [662] [663] [664] [665] [666] [667] [668] [669] [670] [671] [672] [673] [674] [675] [676] [677] [678] [679] [680] [681] [682] [683] [684] [685] [686] [687] [688] [689] [690] [691] [692] [693] [694] position object 9000,3569,-5,4707 position object 9200,3221,0,4048 position object 9400,4777,0,3263 position object 9600,4817,0,5359 position object 9800,5028,0,5127 position object 41000,3080,-5,5003 position object 43000,3845,-5,3700 position object 45000,4291,-5,3619 position object 47000,4388,-5,2719 position object 49000,4018,-5,3052 position object 21000,3088,0,5003 position object 20000,4805,0,4374 position object 23000,4965,0,4316 position object 24000,4965,1,4006 position object 25000,5031,1,3832 position object 20000,4770,1,3331 position object 26000,4745,1,3224 position object 27000,3717,1,3587 position object 28000,3806,1,3664 position object 29000,3321,1,3944 position object 42002,4898,0,5212 position object 44004,4405,0,5417 position object 40006,3939,0,5276 position object 47008,3541,0,5506 position object 49010,3444,0,4868 position object 49012,3548,0,4681 position object 41014,4061,0,4560 position object 43016,3523,0,3818 position object 45018,4114,0,4185 position object 47020,4202,0,4074 position object 49022,4416,0,3750 position object 49024,5149,0,4297 position object 40026,4866,0,4537 position object 42028,4498,0,4539 position object 44030,5498,0,3735 Draemon Game 100 [695] [696] [697] [698] [699] [700] [701] [702] [703] [704] [705] [706] [707] [708] [709] [710] [711] [712] [713] [714] [715] [716] [717] [718] [719] [720] [721] [722] [723] [724] [725] [726] [727] [728] [729] position object 46032,4939,0,3284 position object 20001,4870,1,5315 position object 22003,4531,1,5349 position object 24005,4017,1,5365 position object 26007,3124,1,5047 position object 28009,3198,2,4979 position object 20011,3548,2,4734 position object 22013,3653,2,4563 position object 24015,4051,2,4364 position object 26017,4353,2,3614 position object 28019,4650,2,3665 show object Map if energy#>0 lat=lat-1 if lat<=0 energy#=0 lat=10800 endif endif endif if Sound Playing(1)=0 Play Sound 1 endif if round#>0 x1#=object position x(model) y1#=object position y(model) z1#=object position z(model) gosub _value1 gosub _camera1 Draemon Game 101 [730] [731] [732] [733] [734] [735] [736] [737] [738] [739] [740] [741] [742] [743] [744] [745] [746] [747] [748] [749] [750] [751] [752] [753] [754] [755] [756] [757] [758] [759] [760] [761] [762] [763] [764] gosub _dog xx#=object position x(model) yy#=object position y(model) zz#=object position z(model) prompt6$=str$(xx#)+"x" prompt5$=str$(zz#)+"z" prompt7$=str$(yy#)+"y" prompt8$=str$(round#)+" life" center text screen width()-text width(prompt6$)-600,screen height()-37,prompt6$ center text screen width()-text width(prompt5$)-600,screen height()-50,prompt5$ center text screen width()-text width(prompt7$)-600,screen height()-67,prompt7$ set text size 20 center text screen width()-text width(prompt8$)-80,screen height()-67,prompt8$ set text size 20 if state=2 if abc=0 show sprite 19 sync sync sync sync sync sync sync sync sync sync hide sprite 19 abc=1 endif prompt9$=str$(item)+" item" center text screen width()-text width(prompt9$)-60,screen height()-100,prompt9$ set text size 20 Draemon Game 102 [765] prompt10$=str$(lat)+" Time" [766] center text screen width()-text width(prompt10$)-40,screen height()-83,prompt10$ [767] endif [768] [769] [770] box40,screenheight()z65,45+energy#,screenheight()75,rgb(255,255,255),rgb(255,255,255), rgb(255,255,0),rgb(255,255,255) [771] walk=0 [772] scrape=0 [773] grabseq=0 [774] if grabseq=0 [775] [776] if upkey()=1 then : walk=1:move object model,spd# [777] if downkey()=1 then : walk=1:move object model,-spd# [778] if rightkey()=1 then : walk=1 : yrotate object model,wrapvalue(object angle y(model)+spd#) [779] if leftkey()=1 then : walk=1 : yrotate object model,wrapvalue(object angle y(model)-spd#) [780] Collision_Map(model,Map,12,5,spd#,80) [781] Endif [782] [783] if walk=1 [784] loop object model,0,105*heroframe# [785] set object speed model,80000 [786] else [787] loop object model,0,0*heroframe# [788] endif [789] [790] if object collision(model,500) [791] up$="up" [792] endif [793] [794] if up$="up" [795] position object 500,x1#+1.3,y1#+38,z1#+1.3 [796] endif [797] [798] if spacekey()=1 Draemon Game 103 [799] if up$="up" [800] for i=0 to 8 [801] move object up model,i [802] if y1#>=510 [803] position object model,x1#,510,z1# [804] endif [805] next i [806] if keystate(17) then : walk=1:move object model,spd# [807] if keystate(31) then : walk=1:move object model,-spd# [808] if keystate(32) then : walk=1 : yrotate object model,wrapvalue(object angle y(model)+spd#12) [809] if keystate(30) then : walk=1 : yrotate object model,wrapvalue(object angle y(model)spd#+12) [810] Collision_Map(model,Map,12,5,spd#,80) [811] endif [812] endif [813] [814] for i =startmon7 to endmon7 [815] if object collision(model,i) [816] item#=item#-1 [817] move object i,400 [818] hide object i [819] item=item-1 [820] endif [821] next i [822] [823] if energy#<=0 [824] energy#=0 [825] round#=round#-1 [826] if state=1 [827] position object model,3540,5,3520 [828] endif [829] if state=2 [830] position object model,4360,3,4293 [831] endif Draemon Game 104 [832] [833] [834] [835] [836] [837] [838] [839] [840] [841] [842] [843] [844] [845] [846] [847] [848] [849] [850] [851] [852] [853] [854] [855] [856] [857] [858] [859] [860] [861] [862] [863] [864] [865] [866] energy#=200 endif else show sprite 11 endif if object collision(model,104) position object model, x1#, object position y(model),z1# endif if object collision(model,105) position object model, x1#, object position y(model),z1# endif if object collision(model,106) position object model, x1#, object position y(model),z1# endif if object collision(model,107) position object model, x1#, object position y(model),z1# endif if object collision(model,108) position object model, x1#, object position y(model),z1# endif if object collision(model,109) position object model, x1#, object position y(model),z1# endif if object collision(model,600) hide object 600 key$="up" endif if key$="up" if object collision(model,51) hide object 51 loop object 700,0*nobitaframe#,100*nobitaframe# set object speed 700,80000 global game2$="win" endif if game2$="win" Draemon Game 105 [867] [868] [869] [870] [871] [872] [873] [874] [875] [876] [877] [878] [879] [880] [881] [882] [883] [884] [885] [886] [887] [888] [889] [890] [891] [892] [893] [894] [895] [896] [897] [898] [899] [900] [901] gosub _time2 endif endif endif if item<=0 show sprite 15 endif loop _time2: time2=time2+1 if time2>=10 show sprite 19 endif if time2>=20 hide sprite 19 state=2 endif return _dog: if state=1 if smon=0 IF gamecon=1 for i = startmon2 to endmon2 if HPmon#(i)>0 A#=OBJECT POSITION X(i) B#=OBJECT POSITION Z(i) RANK = (posx#-A#)*(posx#-A#)+(posz#-B#)*(posz#-B#) RANK = SQRT(RANK) IF RANK <10000 if estatus$(i)="" then estatus$(i)="wait" show object i ELSE show OBJECT i Draemon Game 106 [902] ENDIF [903] set object speed i,50000 [904] move object i,0.5 [905] Collision_Map2(i,Map,12,5,1,80) [906] IF RANK <600 [907] posxx#=object position x(i) [908] posyy#=object position y(i) [909] poszz#=object position z(i) [910] AICollisionMAP(i,posxx#,posyy#,poszz#) [911] vv# = atanfull(posx#-posxx#,posz#-poszz#) [912] yrotate object i,vv# [913] estatus$(i)="att2" [914] if object collision (i,model) [915] if estatus$(i)="wait" or estatus$(i)="walk" then estatus$(i) = "att1":eatt(i) = 1 [916] position object i,object position x(i)-get object collision x(),object position y(i),object position z(i)-get object collision z() [917] endif [918] if object collision(checkatt,i) and att=1 and object frame (model)>50 [919] att = 0 [920] estatus$(i)="underatt1" [921] underatt=i [922] ehpbart=timer() [923] move object checkatt,7000 [924] endif [925] if estatus$(i)="wait" then estatus$(i) = "walk" [926] if estatus$(i)="att2" [927] estatus$(i)="walk" [928] if gamecon=1 then loop object i,160*monframe#,183*monframe#:set object speed i,50000 [929] if gamecon=0 then loop object i,0*monframe#,100*monframe#:set object speed i,10000 [930] if RANK<20 [931] energy#=energy#-2 [932] endif [933] endif Draemon Game 107 [934] [935] [936] [937] [938] [939] [940] [941] [942] [943] [944] [945] [946] [947] [948] [949] [950] [951] [952] [953] [954] [955] [956] [957] [958] [959] [960] [961] [962] [963] [964] [965] [966] [967] [968] if estatus$(i) = "att1" if object frame(i) > endatt1#-2 then estatus$(i) = "wait" endif if estatus$(i) = "walk" yrotate object i,vv# movefront(i,5) endif else loop object i,0*monframe#,100*monframe# endif endif Y#=OBJECT POSITION Y(i) if Y#<=2 px=rnd(4000) pz=rnd(4000) yrotate object i,rnd(360) checkhigh# = intersect object(Map,px,-100,pz,px,600,pz) position object i,px,checkhigh#-100,pz endif next i endif endif endif if state=2 IF gamecon=1 for i = startmon5 to endmon5 A#=OBJECT POSITION X(i) B#=OBJECT POSITION Z(i) show object i move object i,-1 Collision_Map2(i,Map,12,5,1,80) Y#=OBJECT POSITION Y(i) if Y#<=3 px=rnd(4300) pz=rnd(4300) Draemon Game 108 [969] yrotate object i,rnd(360) [970] checkhigh# = intersect object(Map,px,-100,pz,px,600,pz) [971] position object i,px,checkhigh#-100+3,pz [972] endif [973] next i [974] for i = startmon6 to endmon6 [975] A#=OBJECT POSITION X(i) [976] B#=OBJECT POSITION Z(i) [977] move object up i,3 [978] Y#=OBJECT POSITION Y(i) [979] if Y#>=300 [980] px=rnd(4300) [981] pz=rnd(4300) [982] yrotate object i,rnd(360) [983] checkhigh# = intersect object(Map,px,-100,pz,px,1000,pz) [984] position object i,px,checkhigh#-100+40,pz [985] endif [986] next i [987] for i = startmon7 to endmon7 [988] A#=OBJECT POSITION X(i) [989] B#=OBJECT POSITION Z(i) [990] move object up i,3 [991] Y#=OBJECT POSITION Y(i) [992] if Y#<=0 [993] px=rnd(4300) [994] pz=rnd(4300) [995] yrotate object i,rnd(360) [996] checkhigh# = intersect object(Map,px,-100,pz,px,1000,pz) [997] position object i,px,checkhigh#-100+3,pz [998] endif [999] next i [1000] for i = startmon3 to endmon3 [1001] A#=OBJECT POSITION X(i) [1002] B#=OBJECT POSITION Z(i) [1003] move object up i,3 Draemon Game 109 [1004] [1005] [1006] [1007] [1008] [1009] [1010] [1011] [1012] [1013] [1014] [1015] [1016] [1017] [1018] [1019] [1020] [1021] [1022] [1023] [1024] [1025] [1026] [1027] [1028] [1029] [1030] [1031] [1032] [1033] [1034] [1035] [1036] [1037] [1038] Y#=OBJECT POSITION Y(i) if Y#<=600 px=rnd(4300) pz=rnd(4300) yrotate object i,rnd(360) checkhigh# = intersect object(Map,px,-100,pz,px,1000,pz) position object i,px,checkhigh#-100+3,pz endif next i endif endif return _fish: if smon=1 IF gamecon=1 for i = startmon9 to endmon9 if HPmon9#(i)>0 A#=OBJECT POSITION X(i) B#=OBJECT POSITION Z(i) RANK = (posx#-A#)*(posx#-A#)+(posz#-B#)*(posz#-B#) RANK = SQRT(RANK) IF RANK <10000 if estatus9$(i)="" then estatus9$(i)="wait" show object i ELSE HIDE OBJECT i ENDIF set object speed i,50000 move object i,0.5 Collision_Map2(i,Map,12,5,1,80) IF RANK <600 posxx#=object position x(i) posyy#=object position y(i) poszz#=object position z(i) Draemon Game 110 [1039] AICollisionMAP(i,posxx#,posyy#,poszz#) [1040] vv# = atanfull(posx#-posxx#,posz#-poszz#) [1041] yrotate object i,vv# [1042] estatus9$(i)="att2" [1043] if object collision (i,model) [1044] if estatus9$(i)="wait" or estatus9$(i)="walk" then estatus9$(i) = "att1":eatt9(i) = 1 [1045] position object i,object position x(i)-get object collision x(),object position y(i),object position z(i)-get object collision z() [1046] endif [1047] if object collision(checkatt,i) and att=1 and object frame (model)>50 [1048] att = 0 [1049] estatus9$(i)="underatt1" [1050] underatt9=i [1051] ehpbart=timer() [1052] move object checkatt,7000 [1053] endif [1054] if estatus9$(i)="wait" then estatus9$(i) = "walk" [1055] if estatus9$(i)="att2" [1056] estatus9$(i)="walk" [1057] if gamecon=1 then loop object i,160*monframe#,183*monframe#:set object speed i,50000 [1058] if gamecon=0 then loop object i,0*monframe#,100*monframe#:set object speed i,10000 [1059] if RANK<20 [1060] energy#=energy#-2 [1061] endif [1062] endif [1063] if estatus9$(i) = "att1" [1064] if object frame(i) > endatt1#-2 then estatus9$(i) = "wait" [1065] endif [1066] if estatus9$(i) = "walk" [1067] yrotate object i,vv# [1068] movefront(i,5) [1069] endif [1070] else Draemon Game 111 [1071] loop object i,0*monframe#,100*monframe# [1072] endif [1073] endif [1074] Y#=OBJECT POSITION Y(i) [1075] if Y#<=0 [1076] px=rnd(13100) [1077] pz=rnd(6250) [1078] yrotate object i,rnd(360) [1079] checkhigh# = intersect object(Map,px,-100,pz,px,600,pz) [1080] position object i,px,checkhigh#-100+3,pz [1081] endif [1082] next i [1083] endif [1084] endif [1085] return [1086] [1087] _camera1: [1088] x#=object position x(model) [1089] y#=object position y(model) [1090] z#=object position z(model) [1091] a#=object angle y(model) [1092] b#=object angle x(model) [1093] d#=120.0 [1094] h#=80.0 [1095] s#=5.0 [1096] set camera to follow x#,y#,z#,a#,d#,h#,s#,model [1097] ox1#=object position x(model)-40 [1098] oy1#=object position y(model) [1099] oz1#=object position z(model)-40 [1100] ox2#=object position x(model)+40 [1101] oy2#=object position y(model)+190 [1102] oz2#=object position z(model)+40 [1103] if get static hit(oox1#,ooy1#,ooz1#,oox2#,ooy2#,ooz2#,ox1#,oy1#,oz1#,ox2#,oy2#,oz2#)>0 [1104] ox#=object position x(model) Draemon Game collision 112 [1105] oy#=object position y(model) [1106] oz#=object position z(model) [1107] ox#=ox#-get static collision x() [1108] oz#=oz#-get static collision z() [1109] position object model,ox#,oy#,oz# [1110] endif [1111] return [1112] [1113] function f(frame,obj) [1114] fr = int(frame * (total object frames(obj)/650.0)) [1115] endfunction fr [1116] [1117] function Collision_Map(OjID_Body,OjID_Map,radius#,height#,speed#,limitsteep#) [1118] if height < radius+10 then height = radius+10 [1119] if limisteep# >= 90 or limitsteep# < 10 then limitsteep# = 89 [1120] limitheight# = (tan(wrapvalue(limitsteep#))*speed#):rem limit height to climb [1121] steepdegree# = 19 :rem if ramp degree is more than steepdegree it will falling by gravity [1122] checkheight# = (tan(wrapvalue(steepdegree#))*speed#)+height# [1123] cx#=object position x(OjID_Body) [1124] cy#=object position y(OjID_Body) [1125] cz#=object position z(OjID_Body) [1126] diffheight#=intersect object(OjID_Map,cx#,cy#,cz#,cx#,cy#-checkheight#,cz#) [1127] if diffheight# = 0 [1128] gravity# = gravity#+3 [1129] if gravity# > checkheight# then gravity# = checkheight#:rem gravity should not more than checkheight# for protect penetrate problem [1130] position object OjID_Body,cx#,cy#-gravity#,cz# [1131] else:if diffheight# < checkheight# and (diffheight#-height#)*-10<= limitheight# [1132] gravity# = 0 [1133] position object OjID_Body,cx#,cy#-(diffheight#-height#),cz# [1134] endif:endif [1135] direction=15 [1136] directionwidth=633360/direction [1137] if speed# > radius#+1 then radius# = speed#+6 [1138] dim intersect#(direction-5) Draemon Game 113 [1139] [1140] [1141] [1142] [1143] [1144] [1145] [1146] [1147] [1148] [1149] [1150] [1151] [1152] [1153] [1154] [1155] [1156] [1157] [1158] [1159] [1160] [1161] [1162] [1163] [1164] [1165] [1166] [1167] [1168] [1169] [1170] [1171] [1172] [1173] cx# = object position x(OjID_Body) cy# = object position y(OjID_Body) cz# = object position z(OjID_Body) for i=0 to direction-8 newx#=newxvalue(cx#,i*directionwidth,radius#) newz#=newzvalue(cz#,i*directionwidth,radius#) intersect#(i)=intersect object(OjID_Map,cx#,cy#,cz#,newx#,cy#,newz#) if intersect#(i)<>0.0 pushx#=newxvalue(cx#,wrapvalue((i*directionwidth)+180),radius#-intersect#(i)) pushz#=newzvalue(cz#,wrapvalue((i*directionwidth)+180),radius#-intersect#(i)) position object OjID_Body,pushx#,cy#,pushz# cx# = object position x(OjID_Body) cz# = object position z(OjID_Body) endif next i undim intersect#() endfunction _value1: posx# = object position x(model) posy# = object position y(model) posz# = object position z(model) anglex# = object angle x(model) angley# = object angle y(model) anglez# = object angle z(model) return function Collision_Map2(OjID_Body,OjID_Map,radius#,height#,speed#,limitsteep#) if height < radius+10 then height = radius+10 if limisteep# >= 90 or limitsteep# < 10 then limitsteep# = 89 limitheight# = (tan(wrapvalue(limitsteep#))*speed#):rem limit height to climb steepdegree# = 19 :rem if ramp degree is more than steepdegree it will falling by gravity checkheight# = (tan(wrapvalue(steepdegree#))*speed#)+height# cx#=object position x(OjID_Body) cy#=object position y(OjID_Body) Draemon Game 114 [1174] cz#=object position z(OjID_Body) [1175] diffheight#=intersect object(OjID_Map,cx#,cy#,cz#,cx#,cy#-checkheight#,cz#) [1176] if diffheight# = 0 [1177] gravity# =10 [1178] if gravity# > checkheight# then gravity# = checkheight#:rem gravity should not more than checkheight# for protect penetrate problem [1179] position object OjID_Body,cx#,cy#-gravity#,cz# [1180] else:if diffheight# < checkheight# and (diffheight#-height#)*-10<= limitheight# [1181] gravity# = 0 [1182] position object OjID_Body,cx#,cy#-(diffheight#-height#),cz# [1183] endif:endif [1184] direction=15 [1185] directionwidth=633360/direction [1186] if speed# > radius#+1 then radius# = speed#+6 [1187] dim intersect#(direction-5) [1188] cx# = object position x(OjID_Body) [1189] cy# = object position y(OjID_Body) [1190] cz# = object position z(OjID_Body) [1191] for i=0 to direction-8 [1192] newx#=newxvalue(cx#,i*directionwidth,radius#) [1193] newz#=newzvalue(cz#,i*directionwidth,radius#) [1194] intersect#(i)=intersect object(OjID_Map,cx#,cy#,cz#,newx#,cy#,newz#) [1195] if intersect#(i)<>0.0 [1196] pushx#=newxvalue(cx#,wrapvalue((i*directionwidth)+180),radius#-intersect#(i)) [1197] pushz#=newzvalue(cz#,wrapvalue((i*directionwidth)+180),radius#-intersect#(i)) [1198] position object OjID_Body,pushx#,cy#,pushz# [1199] cx# = object position x(OjID_Body) [1200] cz# = object position z(OjID_Body) [1201] yrotate object OjID_Body,rnd(360) [1202] endif [1203] next i [1204] undim intersect#() [1205] endfunction [1206] [1207] Function AICollisionMAP(Model,oldx#,oldy#,oldz#) Draemon Game 115 [1208] newx#=Object Position X(Model) [1209] newY#=Object Position Y(Model) [1210] newZ#=Object Position Z(Model) [1211] Height2#=SC_intersectObject ( 0,object position x(Model),object position y(Model),object position z(Model), object position x(Model),object position y(Model)-100000,object position z(Model)) [1212] IF Height2#>charectorhigh [1213] move object down Model,1*rate# [1214] endif [1215] if Height2#<charectorhigh then position object Model,object position x(Model),object position y(Model)+(charectorhigh-0.5-Height2#),object position z(Model) [1216] slide#=SC_sphereSlide ( 0, oldx#, oldy#, oldz#, newx#, newy#+1, newz#,2, Model ) [1217] slidex#=SC_getCollisionSlideX () [1218] slidez#=SC_getCollisionSlideZ () [1219] if slide#>0 [1220] position object Model,slidex#,object position y(Model),object position z(Model) [1221] endif [1222] if slide#>0 [1223] position object Model,object position x(Model),object position y(Model),slidez# [1224] endif [1225] slidex#=0 [1226] slidey#=0 [1227] slidez#=0 [1228] Endfunction [1229] function movefront(charector,spd#) [1230] move object charector,spd# [1231] endfunction [1232] function moveback(charector,spd#) [1233] move object charector,-spd# [1234] endfunction Draemon Game 116