From 455322ac79c17bb42ace2840cbb373ce47cd1d7f Mon Sep 17 00:00:00 2001 From: Lenz Wiechers <> Date: Mon, 17 Feb 2020 16:29:50 +0100 Subject: [PATCH] Initial upload --- README.txt | 3 + assets/Blinky.png | Bin 0 -> 638 bytes assets/Clyde.png | Bin 0 -> 404 bytes assets/Inky.png | Bin 0 -> 456 bytes assets/Map.txt | 35 ++++++ assets/Pacman_Down.png | Bin 0 -> 280 bytes assets/Pacman_Left.png | Bin 0 -> 285 bytes assets/Pacman_Original.png | Bin 0 -> 32251 bytes assets/Pacman_Right.png | Bin 0 -> 296 bytes assets/Pacman_Up.png | Bin 0 -> 282 bytes assets/Pinky.png | Bin 0 -> 825 bytes assets/brick.png | Bin 0 -> 236 bytes bin/Brick.class | Bin 0 -> 450 bytes bin/Game.class | Bin 0 -> 3615 bytes bin/Ghost.class | Bin 0 -> 884 bytes bin/Main.class | Bin 0 -> 558 bytes bin/Map.class | Bin 0 -> 1968 bytes bin/Picture.class | Bin 0 -> 1415 bytes bin/Player.class | Bin 0 -> 3510 bytes src/Brick.class | Bin 0 -> 336 bytes src/Brick.java | 21 ++++ src/Game.class | Bin 0 -> 2085 bytes src/Game.java | 154 +++++++++++++++++++++++ src/Ghost.class | Bin 0 -> 336 bytes src/Ghost.java | 43 +++++++ src/Main.class | Bin 0 -> 558 bytes src/Main.java | 19 +++ src/Map.class | Bin 0 -> 801 bytes src/Map.java | 67 ++++++++++ src/Picture.class | Bin 0 -> 1413 bytes src/Picture.java | 57 +++++++++ src/Player.class | Bin 0 -> 1741 bytes src/Player.java | 246 +++++++++++++++++++++++++++++++++++++ 33 files changed, 645 insertions(+) create mode 100644 README.txt create mode 100644 assets/Blinky.png create mode 100644 assets/Clyde.png create mode 100644 assets/Inky.png create mode 100644 assets/Map.txt create mode 100644 assets/Pacman_Down.png create mode 100644 assets/Pacman_Left.png create mode 100644 assets/Pacman_Original.png create mode 100644 assets/Pacman_Right.png create mode 100644 assets/Pacman_Up.png create mode 100644 assets/Pinky.png create mode 100644 assets/brick.png create mode 100644 bin/Brick.class create mode 100644 bin/Game.class create mode 100644 bin/Ghost.class create mode 100644 bin/Main.class create mode 100644 bin/Map.class create mode 100644 bin/Picture.class create mode 100644 bin/Player.class create mode 100644 src/Brick.class create mode 100644 src/Brick.java create mode 100644 src/Game.class create mode 100644 src/Game.java create mode 100644 src/Ghost.class create mode 100644 src/Ghost.java create mode 100644 src/Main.class create mode 100644 src/Main.java create mode 100644 src/Map.class create mode 100644 src/Map.java create mode 100644 src/Picture.class create mode 100644 src/Picture.java create mode 100644 src/Player.class create mode 100644 src/Player.java diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..397865a --- /dev/null +++ b/README.txt @@ -0,0 +1,3 @@ +A simple Pac-Man clone. +So far. +About to add Path finding for the Ghosts and an A.I. that controls Pac-Man. \ No newline at end of file diff --git a/assets/Blinky.png b/assets/Blinky.png new file mode 100644 index 0000000000000000000000000000000000000000..6d2affa234fa888d574b9c70e3a4b5a68bbf25cc GIT binary patch literal 638 zcmV-^0)hRBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0uxC@K~y+TwUfV7@S+D1^iaGA-o&F20ue!L z!GlmxtcMga2TN}H#t*V&y(nvJd0gFlAZnP=yjdFP!O9os_#jHp3TElH^F zA55S?4Bf&RF6hW>=v}RUWfS@_?8zWG&6bqZA*bnsux7a5QbHI`j6=xIv0tjQ8F>eb zo#0j2Vn0PK4Datw!CMOjq-0x#J*wfMvG<_v$S$rw#ih8@_kxdp!;{4I`sGpd+{J0y|%wcU_sV9L$RtmSehn{OZ5^(3pGQ$wGui zRGoE8wNzs%GlqfCd;+;A?2G)}rP<=}fUL+yM5+zXf(2v0+&x zEhi>ky-ltg>I};k9;c&8H!*KjcA0ePhG+y9Y%9u?Fh64p(LDdgmJee){2#N(Yn@}Z zjrjm;BvPpKUSj6SM&Yb8^o@tkHK5eSxQC*fD6hljp?`(2(}CBSC}w^@-(O?76u<@? zj!FRWEL`w=z9AmBIMzxV4d7<;fHDZ=QT5_mD5o(NU0P9%Ysu*}o+pRpEgk^wB=!-* YZ@H@kY8<*Hg8%>k07*qoM6N<$f~9UEga7~l literal 0 HcmV?d00001 diff --git a/assets/Clyde.png b/assets/Clyde.png new file mode 100644 index 0000000000000000000000000000000000000000..4f26aa3aa0fcc5800247525074f069ae42dd35be GIT binary patch literal 404 zcmV;F0c-w=P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0VzpDK~y+T-IKje z!!Q(uPg_w05=e|lyax-9K?l0eMcae8P+2bl9g=|{n0BjvsYqLaCiZeKnnb@2jvxqn+z2DF9v!MRB$ zD5gfuo0#YM_)QiF=9P0xrI5bsV=QS3Y+c~AbYlZ_S_#gair`FH;O-okdoIvM>qERe z<7kcHVm5QGx(`gogA)vHcP%9w+qgf(!;P|BlVB(Ics7sARk+8BPp>QIhL literal 0 HcmV?d00001 diff --git a/assets/Inky.png b/assets/Inky.png new file mode 100644 index 0000000000000000000000000000000000000000..754a0fa50d21087e0076cf8720601e773a8fd568 GIT binary patch literal 456 zcmV;(0XP1MP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0bNN%K~y+TV`d-@ zFfuT(f*Jq8Bm@8jae|OF$SN7ugn$$SZTk!1V`}DPVEzu4Mbilf5F;P}i_N&SK>$!Q zP!B`}R5Q>&zX@rB1Gwb~n~`1R~z1)67+kD?Nf-z4+aLPW`yfuV9J&^ zM#XnDJ6=QiKNuO5l>afYXtjQNeC`@h;5%INKL~{cZoT;RqEF>xr6`mS28{pzf0(9u zx=Rbfg=)qO=Wjnz4P^Vn@Z-n7e<;eJ?nToK_3E#$p_{qEED!*O^WNMa3>+MxYoQ|8 zHRAz5Bj8a8bvE$;Ir2%?j0^^kX5<_P1RFybw}zk;7(0;^plAl_WJeMKa)DXxJHtO@ y6Tc!^fT9#g{zO#@1jwAVA&kJJ!v*0mFaQ7!H*r8;$4zMf0000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law1hZ;?jm}fU>ON*ue?#3UN zRJN?>c;a?yb&y~a?T8QA=vO#j$i6v>8Sb6`Gh{8sU0AEuq1B#9?*9oigRiUrmwr3s zZJp!29MxDN{uS|?t2e_o*zz}s&>gY|n|h|(s`Z?U^NZVayAoTgA2)MUzT}#qXstbF zhGBOWGqSFW@t(YfzyieSFQtspSk%tK(acyy?2sv(d`Ja(s33Bg;8~02`q06XblOQS zP}=&$Mh4S;@g{9FAl?h9(+I?SnH&M_m+7^Pb1V8=u{eTG+?8Zvs?6zfsP9|zRtd4m?Sm)o$3xrmX7%$(klyjwRu^_D!GhZ)R+8broh7z(%(mJs z<7u1|r0&s*Ri~4`P)$iJCul>VUY~h9LffWcqzSq!;gTzEPk~jo73Zba$`%Br!tp!77mZGBSrKJ_eg*bJjNporwb50=2es%BNi29mvGF|YLDR*k@pqwx`40* zPdt*LP%R?fnbz6=a1QWlnY-S}oBF6bVlQ8JEw)9}nyvAN(J;;V)KKcKpmYbFnAEga>Tz7daD#9ARcbSWbVboF zmaS>1@NGuU^XKYbTATv^u*q0+k~P@V)cCXt+DFji8v~5;;s`MP-Ptn#^7~~-b6kSS zm~(fxzu2>~gFq5xQwP+!VzZu;PDt8|0#AYjCH}4ufUqfnvM zH5MeUf#$>qt$d&pL_U*PVCHZqqysJeZEM;;(f2}tf?(_CoI$$-nG2ig1=- zEUejSsntd2!GdmT8o)yqSfo)U6AkEM);N)Y6*PfFL*PeVU8DzEvnVHPo$ajt4?p$% E1NyaFyZ`_I literal 0 HcmV?d00001 diff --git a/assets/Pacman_Right.png b/assets/Pacman_Right.png new file mode 100644 index 0000000000000000000000000000000000000000..98c86a82198424f21e6469fc31de7073a2060dbf GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv-!3HGrL)l7z6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(K&H|6fVg?4jBOuH;Rhv&5C@4|l8c`CQpH@(AjB@qp%4zS&%t~vVec<$Zx7NEQ zfo5|y3+|OnzLMGJa%S2r&a9hjjxC#|IAh!Vs}J}kGOHL@KUQ2aYpt956t*>7KkKgg nt`2x-x_F`Jqo2L|a~H9*R+*JAWLe__bR>hPtDnm{r-UW|Tz+gW literal 0 HcmV?d00001 diff --git a/assets/Pacman_Up.png b/assets/Pacman_Up.png new file mode 100644 index 0000000000000000000000000000000000000000..a87d7e6b3739526f8a853b543f59a6ce11a1f791 GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz6!3HEJ^yqE{QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`ISV`@iy0XBj({-ZRBb+KprAyFYeY$Kep*R+Vo@qXL1JcJiC$i6iGqoq zfu3>Cv*`gqHQk;rjv*HQSEm^A9Z=wKy|_{Q)!*ZBD^`atVhh=#CHre~+mSlCgb-$i zbM=w$tPEy-KBnRM>83>BNt4A!>ddF*Z7a@qJ816QYWHc=MAMX|UD{l065F>tnEmM3 z>>C?zPW>l$Y{fEp2KVwZx5lq$Pe{e8xxFi3_bR@5Li>Wz@>_=`GfqeEy%BQh?$mB3 Zn?p&)))p;2hk?#w@O1TaS?83{1OS$AXN3R& literal 0 HcmV?d00001 diff --git a/assets/Pinky.png b/assets/Pinky.png new file mode 100644 index 0000000000000000000000000000000000000000..0b6a1cd9196a27f254678ea6dc829c3162df7a82 GIT binary patch literal 825 zcmV-91IGM`P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0?tW9K~y+Tt&~eh zRACgyf8%JQmKm8@^nk*Qo{L&kU@HTug;1stwrLdwLD8l~FIrTK7J)%QU~LL2D+r}P zL5-jnr6pNf7!;|YnfMr=Gq?Y_GdFb{k)Z!@=AQ4Id;Z_~&N<)p0gmLqVMf9dR#D6f z1_`8i^ZCUv7uiA)Yh)dZI2GbB%5rXzsW36Mu$yrwu zPP3VvI?O_5Yt;v53L$R;Y+ME}KgyOUu^dKVTMit~gZxd*X=o=D4AP>QNf|mE*Z+XT z8lWAW+h&Gtk!M&5?3e~+c5XMEDu^t%U#9%oBh|XbT^gY)4o4&h94Gg@6Bk*>aH1G46qy&cXi#3Ys-20EvB_pG`~Ths3or?&R_gBKM!5SH8ark4#zxOR z&0$j;RDFP2)o(DYVRGVSI1%1Dy1^va=3et=NfI<@qmdd;54#;Ev1A6z*7J|k%s}|> zh(nkpiOtB4Y`4TDc67})ZHB43&(GOQg><{m1|Mze-x98~k}|IHUN$4Oe)?6tQu*z} zV2Mm3OyWKt)ST};rJZ}IyDoexbyz_`zUuNDxe>O|%}ttI-wm2+(3l0Z!34s9GOOY> zo%#)F>Z_x6pL<{res|^9hOPQ)*SWTnin_!*rIg4Y@G=QbzIhKX00000NkvXXu0mjf DNS%G}c0*}aI1_r((Aj~*bn@<`j*y!ov7-Hd{oRX06*QmJoCha zrcW!`+<2GB^hkMFE?Cvr<8$VU>4*RO_b;C4#OiRADXb;&y;=ezcS>*^D+8mlGWX&0 c^7;}CrmY(D+ZPGU1v-Yo)78&qol`;+0H3T)T>t<8 literal 0 HcmV?d00001 diff --git a/bin/Brick.class b/bin/Brick.class new file mode 100644 index 0000000000000000000000000000000000000000..98f1c69aeacb64cc67c5adfd0911ce8b54b732c9 GIT binary patch literal 450 zcmXYtOHaZ;6ot=}N0Em>5nrIf4p_*>9ma(k6HGNEXw|qXb%LYVCZ+Z916=wa+`Do? zOkDT_{87f!>gLXOZtt9XI^RE^UjVky)S(Hac75gC>PQOc1LXvvF9k|d=_`9;Nq?$5 z_q4w+APxlzd!9QDY&Wp%NhniC_2;v<*YHIk`8e>VoaqyvVoYxC;t z$%P3%QUa?;Ax))IX~>Y6hb*Er@yTbwJav)kk~7i0a>por!06OwsCMczEWNX-VTIK| klC?n75)I0%6)pi9e-}|hor)G%<989$I!PmMP-$rV0v|h>lT0!kU<#o{f;2p8lHn0d2_m885g;XIaT7gpgkXj8@+De)X2m;mzYSornUu(Hmb-7$i{pIp6RPfvP-h@d@f6P7m z?Dy;JbLNdJr_TXchCc^kCtr+)v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=Gf;zHN_ zO&-sPXN$QlNQ6fm&xOCul2UIPhgewr>q?p86F%7f$Eyo->xp-%IS^*WzSf9E6UpXfBEz%pjRHs+z*sDxuI!cJp3 zb{Q>57(3Bp3?gYfhm>&)Y2zFoFfJftyo0RqZ{&>sqSv^BKC=wF&DrQTt1)1%#vZc~ zj@g24vjdNq+p*W&gF*8U_L;+Y)O-_;iFy`UjSKIAejT^Py^0=~2yXy!TxR{DPWRV8&G%FoM(t zTt>rXY7ebw6?woV)chB!T2Y&te@e{y(+zUey2t6G-V=s)LK)7QW-o!Np z(qq%L^ij`r$ChKiYCRSZ#{!9_V~;)E_ImngVumih|9;ka{U#+4oOYZsH7$lS8LAH~ z+wvYVue7Q?ewt3-j9`<%j%AGq(}^<2vy994S}>w zCJ;3o$L(9T?vW>&0!rUw1LMo9auBL*evq}IU1#DN<`c{J7nK$c{W0J=iw5`$1&~Jw zDzh*%1rfev%9uo{pjRZRNHP1!bA{h}EtCF+jP?ofS|b8OTy z1!kXRnIhL41c0rmNE5TkHG>?sP{cOM$l^A$YgFtkAt=$P|I~RiMhiC?rx5tdD@qtb z0EsBK_prb6cgBlBigH?dI!C1T1?7d7o-M=5LRs)EK%9>Van)$0z|y-kQ{-Mr;!AQi zxivnA8g7xmy0oa0;Ts7;iTU(84p(%SC;n9Pk{+uSE>J#4a%F&7<#H5D{vNCClV9cl c4*1`z{>RU+`S~?Jj|SCie$waPAyL8If924K?EnA( literal 0 HcmV?d00001 diff --git a/bin/Main.class b/bin/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..499b059c0b7781e79d85659a18b0816eb03dbb97 GIT binary patch literal 558 zcmZuuO-lk%6g|(c@mojB%D!u(Efk_fV6+KpGge?2(dwy>X+*~u$H1S}$|&du^rNEl z#z4Y0_rCja&bjx#ukZIy04F#!5E6(qrQ;fi2;}?nMb-z>wd*&XzUuk{u`|bY{BwbD zrP^li#i*x}2qTe36fuFE<+$p4GVCbtPId-LpkR%&vETWwH=2kV2&qlO&5=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{@z+L|{ zK*f_qlFeY#JcEi`o597(|AIjaAe(j-^nYS-a3Mf0=v51BdP}@(76PoW0rr0wfQrFD zwnP_W`RD){bf*gX-;`+h5`bK=OD*Ux@m9Gpm_{RJ(1fG76(_MB-#`nVLn}^W2hO1#-$Ms}fNs2s z9=wiT{1mt0=jg*5=*Qa_#6?~!4unNM?~`R15_K3B9T*Y4)D3XX#F!Z8J&;07?8CS? zz(aouad8L<@c@$I5v0Upm=H%XDUM^Wcm`?lEcS`#ai_@OF7YzcX5yS z1E$3LxL2;keX<7k%Z<24Zoxs>j3crgUy?m|K=$K7Ie;%q0}shjJS<~)L?$sU)A))! zfJfy)d{y3$$K(;r$cON_d=yW}C-I~_iDUAII4;lQg!~Ck%3t7Vc@baNmg5<%7$>xA zaa>!AXSHg~Y8&vJwh7dHz#f{u}nVvl_<@R=m}1M>ZA&mwXb z@%f8J-Hl)ox$&9>yT~@o!R8H`M2c<%3pD5MMy^n+#Jn3P4Zs>y_mk~H%()PAE+#MU z;%Ap}u@`9@l<@M3}zCEm2{sC$v4K-Lir1Gb~iMUHaw{E!j@hiBz1@-1sA-{1cxS of9BieFMQ#?zaR?VTok^!D11Dy)J9NII3Sl4@Y|oKEOGZg0C<}1h5!Hn literal 0 HcmV?d00001 diff --git a/src/Brick.class b/src/Brick.class new file mode 100644 index 0000000000000000000000000000000000000000..28bba176771ff4b2d2b255e9233c14aa912389d5 GIT binary patch literal 336 zcmXYsJx;?w5QX13{)vo3f+2tq4P8P(8mNLO2tooGgcLCK+N{EYvzFFtZa~Q$=&7iX zC^!IzLW~2=n|W`(nbm&(e0~Ag$7UO=AzZ8l=m%IQ^eSnTC{k%ERqC6w69SzRI+IdY zR%n}wqL$vp_VexAYyCp-50zH-h|n4gQ-V7w?axm)Hg P`oqvgj~!u!)j|9Va=t=V literal 0 HcmV?d00001 diff --git a/src/Brick.java b/src/Brick.java new file mode 100644 index 0000000..90f945c --- /dev/null +++ b/src/Brick.java @@ -0,0 +1,21 @@ +// Diese Klasse stellt die einzelnen Bicks (Wände) auf der Map dar. + +public class Brick extends Picture { // Die übergeordnete Klasse ist Picture + + private static final long serialVersionUID = 5556462651856418189L; + + public int xPos; // Position auf dem Frame in x-Richtung + public int yPos; // Position auf dem Frame in y-Richtung + + public Brick(int newXPos, int newYPos) { // Erstellen des Konstruktors mit den Koordinaten, an denen sich der Brick + // beefinden soll. + + super("brick"); // Aufrufen der übergeordneten Klasse + + // Setzen der Positionen: + xPos = newXPos; + yPos = newYPos; + + } + +} diff --git a/src/Game.class b/src/Game.class new file mode 100644 index 0000000000000000000000000000000000000000..d04c8a9130616d89aea44c4edc899561598209e1 GIT binary patch literal 2085 zcmZuyTX0il5dKcm=H&7>gqEu<_ls#%q7@ZvL2011Z3>mva;YMx$)P=Ma!yQ6DXk)2 z0PlCycYNT%H--eq3okm3nG}+XA`dfy6PObB=?FtxQOsaAiUNvqqAkRcV@g71 zb-bjbtfBct*(jPCmSty*lg6oZW!|!<(t~}X?dEpLu+73f+asdocBoV^7EFc-XGc6q zbW_t##jQ{`k?j|ex?s^LF<5rkC~+0YyBf4XDhfu$9n%owp?PP1)LJwTb7$ZV%@GZ8 zFUhQvGhEBDX>zB67NH)?w%px3DcL!$p(*3!d8s8?%QpAV6(`N|m@!$Prd5Iz#*MNi z>$+02c<2nh+-Zw>hqC?tA_B(cyC=59>9Zl?|3CucnI5A7q4y#kD!Y;Vgd?}VmmYQi>#2w!wMC+3UfHA zFppCT3s_WmS;#9mEw)CkXxIv`;*7#;IIZwH-cWcGXLX!YIFGk|JuyEpsfq zu!<%J&5E_?18NnQd(9KZT*1v0oQip%WR^XYvQ|m&)cDk0DX&Q0QIFd>*8x#4U0q9% z@qnzc;LNec?G2apb;E{jOw}(O_nP8YzTn7g_h$EGhS;sf@^gnH*utp21ou?gnX}oq zwuZ}0U4tU>}!!lwGG=DvjjJs zPL6$u6&Z2p)||`?b`D?zpQaR_)EIx93{uD(c$`T0I7h+boCETJK+@yHr^h*Z9_RFV zoCD}_&LBDGTPBqBDLNnKlNqFPCUq5BYN>X;ih$38sYJetCXY6!zC-B9Rp?cODMlzp ztB9raAE2sep(;+*k}47umr`u4qAhiW7FW<#!?Hu}jXea_u4_XEp88t?Tu@ zSPd)cVt_nY!^--yiM+XnRkCcVVYTqq`)ZIlVcK;F57n?ncnxc{8rD&aUB>zvHt@XA zMGOUZb&&18jE(JG9bG?Tn{VN*B*XefBAV!GpFS?EgRCpjRl}yU0p|Immu)Te4K`P? zMHnM&F{{{mTgAIl)s{F#y0wP;y~RR(;fG3Iy7dct5X94@=he?X|BN9*7lyb(LJB=%@&?A5xlPwPb=_ArYSvzWya^wLMeU(7EHxR#x x wird größer + // nach unten --> y wird größer + + public Game() { // Erstellen des Konstruktors (Was soll passieren, sobald dieses Klasse + // aufgerufen wird?) + + frame = new JFrame(); // Fenster + + panel = new JPanel(); // darauf werden alle sichtbaren Elemente gespeichert + + ghosts = new Ghost[4]; // 4 Geister + + player = new Player(); // Pac-Man + + panel.add(player); // Pac-Man wird dem Panel hinzugefügt + frame.addKeyListener(player); // KeyListener wird hinzugefügt, man kann nun Pac-Maan mit der tastatur steuern + + // Einstellen des Frame bezüglich Größe und Position + frame.setSize(windowSizeX, windowSizeY); + frame.setLocation(frameLocationX, frameLocationY); + + frame.setVisible(false); + frame.setTitle("Pac-Man"); // Der Titel des Frame wird auf "Pac-Man" gesetzt + frame.setResizable(false); // Man kann die Größe des Frame nicht verändern + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Wenn der Frame geschlossen wird, wird auch das Programm + // beendet + + // Der Inhalt des Panels wird auf dem Frame angezeigt: + frame.setContentPane(panel); + frame.getContentPane().setLayout(null); + + panel.setBackground(Color.BLACK); // Der Hintergrund ist schwarz + + for (int i = 0; i < ghosts.length; i++) { // für jeden Geist: + ghosts[i] = new Ghost(i); // Erstellen des jeweiligen Geistes + panel.add(ghosts[i]); // Hinzufügen zum Panel des jeiligen Geistes + ghosts[i].setBounds(ghosts[i].getPos('x', 0), ghosts[i].getPos('y', 0), 20, 20); + } + + map = new Map(player, ghosts); // Map auf der gespielt wird + map.mapping(); + + player.setBounds(player.getPos('x', 0), player.getPos('y', 0), 20, 20); // Pac-Man wird das erste Mal gerendert + + for (int i = 0; i < 35; i++) { // für jeden Brick + for (int j = 0; j < 35; j++) { // für jeden Brick + if (Map.bricks[j][i] != null) { // Damit kein Fehler auftritt wegen nicht vorhandenen Bricks + panel.add(Map.bricks[j][i]); // Der jeweilige Brick wird zum panel hinzugefügt + Map.bricks[j][i].setBounds(Map.bricks[j][i].xPos, Map.bricks[j][i].yPos, 20, 20); // Rendern des + + } + } + } + + frame.setVisible(true); + + lastT = System.nanoTime(); // delta time + + while (true) { // Hauptschleife + + dt = System.nanoTime() - lastT; // delta time + lastT = System.nanoTime(); // delta time + + // Zu Beginn jeden Schleifendurchlaufs wird die Position von Pac-Man neu + // gesetzt: + player.setLocation(player.getPos('x', dt), player.getPos('y', dt)); + + // Aktualiesieren der Positionen der Geister: + for (int i = 0; i < ghosts.length; i++) { + ghosts[i].setLocation(ghosts[i].getPos('x', dt), ghosts[i].getPos('y', dt)); + } + + player.calcDir(0); // Berechnen wo Pac-Man als nächstes hin soll + + // Kollision von Pac-Man mit Bricks: + for (int i = 0; i < 35; i++) { // für jeden Brick + for (int j = 0; j < 35; j++) { // für jeden Brick + if (Map.bricks[j][i] != null) { // Damit kein Fehler auftritt wegen nicht vorhandenen Bricks + if (player.getPos('x', 0) < Map.bricks[j][i].xPos + 20 + && player.getPos('x', 0) > Map.bricks[j][i].xPos - 20 + && player.getPos('y', 0) < Map.bricks[j][i].yPos + 20 + && player.getPos('y', 0) > Map.bricks[j][i].yPos - 20) { + if (player.left) { + player.setPos('x', Map.bricks[j][i].xPos + 20); + player.left = false; + } else if (player.right) { + player.setPos('x', Map.bricks[j][i].xPos - 20); + player.right = false; + } else if (player.up) { + player.setPos('y', Map.bricks[j][i].yPos + 20); + player.up = false; + } else if (player.down) { + player.setPos('y', Map.bricks[j][i].yPos - 20); + player.down = false; + } + + } + } + } + } + + for (int i = 0; i < ghosts.length; i++) { + if (player.getPos('x', 0) < ghosts[i].getPos('x', 0) + 20 + && player.getPos('x', 0) > ghosts[i].getPos('x', 0) - 20 + && player.getPos('y', 0) < ghosts[i].getPos('y', 0) + 20 + && player.getPos('y', 0) > ghosts[i].getPos('y', 0) - 20) { + + player.lives--; + System.out.println(player.lives); + map.mapping(); + } + } + delay(10); // Ein delay von 10s zum Ende der Hauptschleife + } + } + + // Methode zum verzögern (warten) in ms + public void delay(int time) { + + try { + Thread.sleep(time); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/src/Ghost.class b/src/Ghost.class new file mode 100644 index 0000000000000000000000000000000000000000..9654b176919e9dcc4c556f6915231b5b1956d288 GIT binary patch literal 336 zcmXYsJx;?w5QX13{)vo(gCT(E=n@Ljger(82n1LtQoto>V^+>0vzF{N_o6@u3J$;# zI1FNJXx_|w^UbXG>*wPWzy!NpZ2GXV5&F}6*f_tpAGAD%2aFh`2S@9qVVXU;guAi2&yb;TslPE4yJ}dY*`~T23 zD^(G^_lh0ewc zQ!1TJM+x@P;m-ktJveZ=dh9H8x#I`0#u{*P#2In*4kCJk_0mE;R-Xr8+~sbayWkH) Mh(0^Q2CIeW7ugj;+W-In literal 0 HcmV?d00001 diff --git a/src/Ghost.java b/src/Ghost.java new file mode 100644 index 0000000..6504434 --- /dev/null +++ b/src/Ghost.java @@ -0,0 +1,43 @@ +// Diese Klasse stellt die einzelnen Geister dar. + +public class Ghost extends Picture { // Die übergeordnete Klasse ist Picture + + private static final long serialVersionUID = -5352006665147359473L; + + private int xPos; + private int yPos; + + public Ghost(int index) { + + super("Pinky"); // Aufrufen der übergeordneten Klasse + + //xPos = 150 + 40 * index; + + if (index == 0) { + this.changeSauce("Blinky"); + } else if (index == 2) { + this.changeSauce("Inky"); + } else if (index == 3) { + this.changeSauce("Clyde"); + } + + } + + public int getPos(char coordinate, long dt) { + if (coordinate == 'x') { + return xPos; + } else if (coordinate == 'y') { + return yPos; + } else + return -1; + } + + public void setPos(char coordinate, int newPos) { + if (coordinate == 'x') { + xPos = newPos; + } else if(coordinate == 'y') { + yPos = newPos; + } + } + +} diff --git a/src/Main.class b/src/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..ca256d962c6f09bd7d68f70ce376b9d6e39706c1 GIT binary patch literal 558 zcmZuu%TB^j6r5Wgg@QbaBEDZ6Z~=*NVWM$kqMM>77>sdsfty+a#q?pqXSu>?;s^Lq z#wnN(gI%2I%sn&b^!Drf{S&}34h*DFNntI8bpspN)UjnCfr^f89XkTaGsks;bAed3 z))t6gjCx8SZ#k~I4u>7(-O0{?ifN6ya?qBZ6Y*a$9y~cdGpwd`+*7)TM1gYk(dx?= z*%(OIZnOf=aqZJ-y7X-Jm;O1X*_J~NN?KP$h8e9<=ylbl6OB(t6Y5cD7HJp)ML(SJ zqh5XVtXzA*gun}xj@>NwuumEV5hANVVZPB#r?0xfAE`C=12q)L_$s*d80ZCKfs^Xu zcPuKkMTraOy!hzR!0lnMX2=>uK};M@AYP}(S=QuK)Ud?&?5qJf7AA-Vne4K;mJ-8=D8^5Mx79N?iAm(w0I3O$((-fK-au2nGz^wb4!q0UvI7``6A`icq`e81k<#4ylrne_PQI(D@hWE zUY9XuBkD%|%L1)jX$$l#$=y&e-i*58&A|gd?A`YKn3lqSc6H%dn!*Lc`K z@86Hu-)P?O9K)!s207IzmDoDvqL4#y1dusijYjLU>Mo>een!UCNHtf}KR|D}`j8o#(x@Kr zrAF6CLt3tJz_*__^u2?jH45en)U``Rvc>9K7=?PV{vPIY?|cwBjXs3lNWeqVeHYFu~4Mz7fdPrgu$O3PW)XK7Fa=jwrPHaop}RG;o}=1 OHPf0p=}BrC%>4mXCYVP6 literal 0 HcmV?d00001 diff --git a/src/Map.java b/src/Map.java new file mode 100644 index 0000000..f962dae --- /dev/null +++ b/src/Map.java @@ -0,0 +1,67 @@ +import java.io.BufferedReader; +import java.io.FileReader; + +// Diese Klasse ist zuständig für das Laden der Karte +// In der Textdatei map.txt enthalten im "assets" - Ordner kann man anhand von '#' Positionen von Bricks festlegen. Dort wo sich kein '#' befindet, ist also eine Lücke. + +public class Map { + + public static Brick bricks[][] = new Brick[35][35]; // Zweidimensionales Array für alle Bricks + // Zweidimensionale Arrays siehe + // https://de.wikipedia.org/wiki/Feld_(Datentyp)#Mehrdimensional_/_in-sich-mehrdimensional + + BufferedReader reader; // reader zum Einlesen der Text Datei + + Player player; + Ghost ghosts[]; + + String line; // String in dem eingelsene Zeilen der Datei gespeichert werden + + public Map(Player player, Ghost ghosts[]) { // Erstellen des Konstruktors + + this.ghosts = ghosts; + this.player = player; + + } + + public void mapping(){ + try { + + + reader = new BufferedReader(new FileReader("assets/map.txt")); // Einlesen der .txt Datei + + for (int i = 0; i < 35; i++) { // für die ersten 35 Zeilen der Datei: + String line = reader.readLine(); // Einlesen der jeweiligen Zeile + for (int j = 0; j < 35; j++) { // für die ersten 35 Zeichen der jeweiligen Zeile + try { + if (line.charAt(j) == '#') { // Erkennen ob sich dort ein '#' befindet + bricks[i][j] = new Brick(10 + 20 * j, 10 + 20 * i); // wenn ja, soll an der Stelle ein neuer + // Brick erstellt werden + } else if (line.charAt(j) == 'P') { + player.setPos('x', 10 + 20 * j); + player.setPos('y', 10 + 20 * i); + } else if (line.charAt(j) == '0') { + ghosts[0].setPos('x', 10 + 20 * j); + ghosts[0].setPos('y', 10 + 20 * i); + } else if (line.charAt(j) == '1') { + ghosts[1].setPos('x', 10 + 20 * j); + ghosts[1].setPos('y', 10 + 20 * i); + } else if (line.charAt(j) == '2') { + ghosts[2].setPos('x', 10 + 20 * j); + ghosts[2].setPos('y', 10 + 20 * i); + } else if (line.charAt(j) == '3') { + ghosts[3].setPos('x', 10 + 20 * j); + ghosts[3].setPos('y', 10 + 20 * i); + } + } catch (Exception e) { + + } + } + } + } catch (Exception e) { // Falls etwas mit dem Einlesen der Datei schiefläuft: + System.out.println( + "There seems to be an error with the file of the map. Pls use hashes to indicate positions of Walls. ERROR: " + + e); + } + } +} diff --git a/src/Picture.class b/src/Picture.class new file mode 100644 index 0000000000000000000000000000000000000000..b6bc60976c3413f7b07ad9362d184a76bada1000 GIT binary patch literal 1413 zcmbtU+g1}v6x|gPI%yg&0i78yOh&~CQ4>@YG!T`GPA~{F%&-=ZMN=fLp*yR)BlzkE z_!lmpT}#2s(hrzFn4i(v)oHRaUY_Qqy6V(9`|PvNss8)ZyN>`S@P~Qzq;bo@Z4*av$H1(CIe{aA@*UY+ zQ-0uh?qAh;0kJ4BIOn-RDBW;PHrpz7ef`5fPoJHg5lDtA2n9xJ59MQ7k~?9^*_L%x znr&}wDPL_?^{Fh-Kkc|qSP?ju@3=OlTQ9AKzT?)*V`~JO^EQ>h;hN*B2kq?*<^L%+ znzUqVo=rlMw0Mq<3AIb84wB=Qs>=(zwrYi>%v{N^;RFJi+KOX`ZC|HP1+r~NU=h#W zmt@-5uOJ(4cA+`5I|P}Sk54J=x?kD7%OILT6V@NOyCp~b!w0N^p#}7Vw^BmzZ_$He?Eue0PWG4SzUk;s89>t9oqwqv@sgn zqd~*lSyDm3{PTP`UR_|i2W!sTZh5Y9!*Wj*%Nq}s{U1yG5UOKq_=WFtn9n=G&L6{Z zushM|N3NWOXwSytG;c%KZ=$pBb7kkT);}VW5!V)rD>u&*L&G|GNZW y99O#~oIpR*kCNVb+As1Z&oT;_L9t7Jg7h!O^ebKZ6qeXa literal 0 HcmV?d00001 diff --git a/src/Picture.java b/src/Picture.java new file mode 100644 index 0000000..5569808 --- /dev/null +++ b/src/Picture.java @@ -0,0 +1,57 @@ +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.JOptionPane; + +// Diese Klasse ist die Grundlagee zum Render von Elementen auf dem Frame, anhand der Javax Swing Bibliothek + +public class Picture extends JLabel { // Die übergeordnete Klasse ist JLabel + + private static final long serialVersionUID = 3916370092871263037L; + + BufferedImage pic; // pic ist das eingelesene Bild + + public Picture(String sauce) { // Erstellen des Konstruktors mit der Eingabe sauce --> Name der jeweiligen + // Datei ohne Endung + + super(); // Aufrufen der übergeordneten Klasse + + try { + + pic = ImageIO.read(new File("assets/" + sauce + ".png")); // Einlesen der Datei aus dem "assets" - Ordner + + this.setIcon(new ImageIcon(pic)); // Das eingelesene BufferedImage pic wird auf das JLabel (diese Klasse) + // geladen + + } catch (IOException ex) { + + // Falls es ein Problem mit dem Einlesen der Datei gibt: + JOptionPane.showMessageDialog(null, "Please check your file paths", "Error", JOptionPane.ERROR_MESSAGE); + + } + + } + + // Methode zum auswählen eines anderen Bildes ohne ein neues Objekt erstellen zu + // müssen + public void changeSauce(String newSauce) { + + try { + + pic = ImageIO.read(new File("assets/" + newSauce + ".png")); + + this.setIcon(new ImageIcon(pic)); + + } catch (IOException e) { + + JOptionPane.showMessageDialog(null, "Please check your file paths", "Error", JOptionPane.ERROR_MESSAGE); + + } + + } + +} \ No newline at end of file diff --git a/src/Player.class b/src/Player.class new file mode 100644 index 0000000000000000000000000000000000000000..e333f5af6bc027de67bb42bc389cc025062f77d0 GIT binary patch literal 1741 zcmah~&r@4f6#j0=FOo+agH6jXrC1=OO0d#urKQ#YEf8oV5G|X|Be{hK;l23sQkoeZ zRxY#)H|h*4*|A}x132SCS8n_p-1|p3_QP#IzDKO5BU$evIdA z6mwC`N05(TA%aDLL|wX;SuIJoZaMbK?393*6X?h}cHJ{=uVhvmGW6T(pM#@+EZ-3b zJ}o$P#>`M{YBf}^Nm&sHxz_rIN7pJ{Rr#1|pi!eyh(w!^hk-;oKukk z=kt~=7aQAa(p@&!s#F ziJ3KbysUg8Z7(}7o6|~}P`LzQyIvZ>W{aL#-dZqgt!!~(FUhJjHF%V_U{D8<}MlWyf(VmTh`WA#&`v!nR{Yr{R|6jHUXC`z4R60tJkMS>877M@xz;16T0C zKo5Ei^eOQgdLt+p_y|i86b&q6C4!QHkMW6t%jh@ox)K9Qyn%iN?!)Ctw}FRvAkf}2 zt&sY7&38}v6Ywh$h!m`{*Kk=}_lvaUt-2>|=?YwEv063l^=#2|Eqh(lnb41XYm>p- zoT<}b-xqw2Ehk%Gu*WCT+~%w_K!E(R&>)WOeVu;iLTta6Wn=~*?? zczJ_m$)edPOH$Lx4}=9Eif*KEk@_WmJOOm^M}Di}*0KO%bd1nnn?sUtDCkN!;X81W1<8cK91aW0cQe}cpTTpcy6 zqG*n*(C4Crj>_w(p|dEB#n4l%S9H{nj!N&N&&SeH6dekc8Iz1seYWX7H%T@4i;>_? zQhJFy+{YCj;F1oL!ZD8JCU28m)f}n3Pcj!sW{KWMWTQeBEb?HJg*tio3~%8JjN&U~ z@ikw6gSWAVYxo}5HFqhWpB8syit(dlFUu;z2#yU74)8X1$|zr{iIC-gM-yfMSd$ZZEGkmhq(Pe5ZCYyQ>n%Ii`x+7xtlpcd=IJ2!y_)v5hDFxZa(G?9bl0+ z<3FA??HQ-%T+0(`y`d*`fNtJ8_Ry)&PCY~m^(3C|qn*y+v%{W5)7L}K4g-fQ!5`ZV zbWp#G2>&X&Ihf0s;-AbkCNP6V+`|e7B{7dJzdPD Z+~8Li(8Gu#+}+icipS}Bm+=9-_Ye1lL7o5r literal 0 HcmV?d00001 diff --git a/src/Player.java b/src/Player.java new file mode 100644 index 0000000..857f346 --- /dev/null +++ b/src/Player.java @@ -0,0 +1,246 @@ +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +// Diese Klasse stellt die vom Spieler mit den Pfeiltasten gestuerte Figur --> Pac-Man dar + +public class Player extends Picture implements KeyListener { // extends Picture --> Jeder 'Player' ist auch ein + // 'Picture' + // implements KeyListener --> Benötigt zum Erkennen von + // gedrückten Tasten. + + private static final long serialVersionUID = -4225811153447791553L; + + private float xPos; // Position auf dem Frame in x-Richtung + private float yPos; // Position auf dem Frame in y-Richtung + + public int lives = 3; + + private float speed = 0.00000014f; // Diee Geschwindigkeit von Pac-man. In alle Richtungen gleich. Muss so klein + // sein wegen delta time + + public long timer; // Variable die speichert zu welchem Zeitpunkt eine Änderung der Richtung + // vorgenommen wurde, welche nicht sofort durchgeführt wegen kann, wegen einem + // Brick, welcher im Weg ist. --> siehe boolean hui + public int blob = 1000; // Zeit in ms, nachdem die Richtungsangabe auf einer Geraden zurückgesetzt wird + + public boolean right; // Boolean der speichert, ob sich Pac-Man gerade nach rechts bewegt (Analog für + // links, oben, unten) + public boolean pressed_right; // Boolean der speichert, ob Pac-Man als nächstes nach rechts gehen soll (Analog + // für links, oben, unten) + public boolean left; + public boolean pressed_left; + public boolean up; + public boolean pressed_up; + public boolean down; + public boolean pressed_down; + + private boolean hui; // Boolean zur Abfrage, ob gerade ein Brick im Weg ist, um den aktuellen + // Richtungsbefehl durchzuführen. + + public Player() { // Erstellen des Konstruktors + + super("Pacman_Right"); // Aufrufen der übergeordneten Klasse (Picture) + + } + + public void calcDir(int keyCode) { // Methode zum Errechnen der Richtung in die Pacman gerade geht und als nächstes + // gehen soll mit der Eingabe, welche Taste angeschlagen wurde + + // keyCode = 37 --> Pfeiltaste nach links + // keyCode = 39 --> Pfeiltaste nach rechts + // keyCode = 38 --> Pfeiltaste nach oben + // keyCode = 40 --> Pfeiltaste nach unten + + if (keyCode == 37 || pressed_left && System.currentTimeMillis() - timer <= blob) { + for (int i = 0; i < 35; i++) { // für jeden Brick + for (int j = 0; j < 35; j++) { // für jeden Bick + if (Map.bricks[j][i] != null) { // Damit kein Fehler auftritt wegen nicht vorhandenen Bricks + if (Map.bricks[j][i].xPos + 20 == (int) xPos && (int) yPos < Map.bricks[j][i].yPos + 20 + && (int) yPos > Map.bricks[j][i].yPos - 20) { // wenn Pac-Man gerade rechts an einem + // Brick vorbeistreift: + hui = true; // Pac-Man kann gerade nicht nach links gehen + } + } + } + } + if (!hui) { // wenn links von Pac-Man gerade kein Block ist: + + // bewegt sich Pac-Man nun nach links: + left = true; + right = false; + up = false; + down = false; + + // und Pac-Man hat keine Richtung in die er als nächstes soll: + pressed_left = false; + pressed_right = false; + pressed_up = false; + pressed_down = false; + + // und Pac-Man schaut jetzt nach links + this.changeSauce("Pacman_Left"); + } else { // ansonsten: + + // soll Pac-Man sich sobald er kann nach links bewegen + pressed_left = true; + pressed_right = false; + pressed_up = false; + pressed_down = false; + + if (keyCode == 37) // wenn die Pfeiltaste nach links gedrückt wurde: + timer = System.currentTimeMillis(); // wird der Timer, der angibt, wann der Befehl zum nach links + // Abbiegen eingegeben wurde + } + } + + // Analog für rechts, oben, unten: + + if (keyCode == 39 || pressed_right && System.currentTimeMillis() - timer <= blob) { + for (int i = 0; i < 35; i++) { + for (int j = 0; j < 35; j++) { + if (Map.bricks[j][i] != null) { + if (Map.bricks[j][i].xPos - 20 == (int) xPos && (int) yPos < Map.bricks[j][i].yPos + 20 + && (int) yPos > Map.bricks[j][i].yPos - 20) { + hui = true; + } + } + } + } + if (!hui) { + left = false; + right = true; + up = false; + down = false; + pressed_left = false; + pressed_right = false; + pressed_up = false; + pressed_down = false; + this.changeSauce("Pacman_Right"); + } else { + pressed_left = false; + pressed_right = true; + pressed_up = false; + pressed_down = false; + if (keyCode == 39) + timer = System.currentTimeMillis(); + } + } + + if (keyCode == 38 || pressed_up && System.currentTimeMillis() - timer <= blob) { + for (int i = 0; i < 35; i++) { + for (int j = 0; j < 35; j++) { + if (Map.bricks[j][i] != null) { + if (Map.bricks[j][i].yPos + 20 == (int) yPos && (int) xPos < Map.bricks[j][i].xPos + 20 + && (int) xPos > Map.bricks[j][i].xPos - 20) { + hui = true; + } + } + } + } + if (!hui) { + left = false; + right = false; + up = true; + down = false; + pressed_left = false; + pressed_right = false; + pressed_up = false; + pressed_down = false; + this.changeSauce("Pacman_Up"); + } else { + pressed_left = false; + pressed_right = false; + pressed_up = true; + pressed_down = false; + if (keyCode == 38) + timer = System.currentTimeMillis(); + } + } + + if (keyCode == 40 || pressed_down && System.currentTimeMillis() - timer <= blob) { + for (int i = 0; i < 35; i++) { + for (int j = 0; j < 35; j++) { + if (Map.bricks[j][i] != null) { + if (Map.bricks[j][i].yPos - 20 == (int) yPos && (int) xPos < Map.bricks[j][i].xPos + 20 + && (int) xPos > Map.bricks[j][i].xPos - 20) { + hui = true; + } + } + } + } + if (!hui) { + left = false; + right = false; + up = false; + down = true; + pressed_left = false; + pressed_right = false; + pressed_up = false; + pressed_down = false; + this.changeSauce("Pacman_Down"); + } else { + pressed_left = false; + pressed_right = false; + pressed_up = false; + pressed_down = true; + if (keyCode == 40) + timer = System.currentTimeMillis(); + } + } + hui = false; // Muss zurückgesetzt werden + } + + // Methoden zur Erkennung von Tastenanschlägen: + + public void keyPressed(KeyEvent e) { + + calcDir(e.getKeyCode()); // aufrufen von der Methode calcDir mit der Eingabe e.getKeyCode() --> zuletzt + // angeschlagene Taste + + } + + // Die folgenden 2 Methoden sind zwar leer, müssen jedoch trotzdem existieren, + // damit nicht dauerhaft Fehlermeldungen ausgegeben werden: + + public void keyReleased(KeyEvent e) { + + } + + public void keyTyped(KeyEvent e) { + + } + + // Methode zum Errechnen der aktuellen Position + public int getPos(char coordinate, long dt) { // Hier kommt die zuvor erwähnte delta time ins Spiel + + if (coordinate == 'x') { // Auslesen der 'x' - Koordinate: + if (left && dt != 0) { + xPos -= speed * dt; + } else if (right && dt != 0) { + xPos += speed * dt; + } + return (int) xPos; + } else if (coordinate == 'y') { // Auslesen der 'y' - Koordinate: + if (down && dt != 0) { + yPos += speed * dt; + } else if (up && dt != 0) { + yPos -= speed * dt; + } + return (int) yPos; + } else { + return -1; + } + } + + // Methode zum Setzen einer neuen Position: + public void setPos(char coordinate, int newPos) { + + if (coordinate == 'x') { + this.xPos = newPos; + } else if (coordinate == 'y') { + this.yPos = newPos; + } + + } + +}