From cea77cd081a17bcfb42d69017e2382968288b222 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 18 Nov 2014 12:11:22 +0100 Subject: [PATCH 1/5] quick debug helper hack --- src/de/teamteamteam/spacescooter/thread/TimedThread.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/thread/TimedThread.java b/src/de/teamteamteam/spacescooter/thread/TimedThread.java index e2bd386..cbb4c15 100644 --- a/src/de/teamteamteam/spacescooter/thread/TimedThread.java +++ b/src/de/teamteamteam/spacescooter/thread/TimedThread.java @@ -18,6 +18,11 @@ public abstract class TimedThread extends Thread { */ private long workTime; + /** + * This is a quick hack :) + */ + private long runloops; + /** * This method sets the actual working interval based on hz. * @@ -32,6 +37,7 @@ public abstract class TimedThread extends Thread { */ public final void run() { while (true) { + this.runloops++; long workStart = System.nanoTime(); // do the actual work this.work(); @@ -41,8 +47,9 @@ public abstract class TimedThread extends Thread { long timeToWait = this.workInterval - workTime; //in case we are already running late, just print a warning and carry on! - if(timeToWait < 0) { + if(timeToWait < 0 && this.runloops > 50) { // runloops for filtering out game start delays System.err.println("[" + this.getName() + "] workTime exceeds workInterval!:" + this.workTime + " > " + this.workInterval); + runloops = 100; // overflow protect continue; } long msToWait = timeToWait / 1000000; From 440325022bfb2cee29f72fae47b0148b335d0309 Mon Sep 17 00:00:00 2001 From: Licht Date: Tue, 18 Nov 2014 12:18:44 +0100 Subject: [PATCH 2/5] Added Image for Heal Power-Up --- res/images/items/item3.png | Bin 310 -> 370 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/res/images/items/item3.png b/res/images/items/item3.png index 9c1c635089688d3e2b976f4590739bd7b36bae11..5aaaf657a7b2a76e33c6c1bfe822b3b83229a506 100644 GIT binary patch delta 246 zcmV!Wm0u wT#biWky&ds>y*U9-_6*xbZfS@IgPOAPi!`4DkoTb(EtDd07*qoM6N<$f&rm#IRF3v delta 186 zcmV;r07d`u0=5E>UZ83FlE5mS+9D1VVjL_t(o!|j(r4!|G?1Y!UG=k2v=tQJ8u zDcogNxG+jmETy8|2NbHQ-zHwH4{Ef!>R zA^Z2wDV#BZouxwIuP0CeDnJE*^@fWq3bj^%nNvFQP(5b_nNzs4;IWzrM}SwYyeEQ! o2*2~#5uzk>R?W_q(+oYo0Fx(3C@Uh`MF0Q*07*qoM6N<$f?YpNRsaA1 From e8122b50fb44669b162743d4b372b33e9028bf7d Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 18 Nov 2014 12:46:18 +0100 Subject: [PATCH 3/5] disable one expensive anti aliasing option. look is still good, performance++ --- src/de/teamteamteam/spacescooter/GameFrame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/GameFrame.java b/src/de/teamteamteam/spacescooter/GameFrame.java index b2b16d6..55a3d49 100644 --- a/src/de/teamteamteam/spacescooter/GameFrame.java +++ b/src/de/teamteamteam/spacescooter/GameFrame.java @@ -156,9 +156,10 @@ public class GameFrame extends JFrame { /** * Apply rendering hints to the given Graphics2D. + * KEY_ANTIALIASING is very expensive and doesn't do much more over KEY_TEXT_ANTIALIASING */ private void applyRenderingHints(Graphics2D bufferedGraphics) { - bufferedGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + //bufferedGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); bufferedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); } From 4e3964c31c7b7c48952dabf78f913e568607dc4c Mon Sep 17 00:00:00 2001 From: Licht Date: Tue, 18 Nov 2014 13:08:08 +0100 Subject: [PATCH 4/5] Updated Items and added the first advanced Item-Icons --- res/images/items/item3.png | Bin 370 -> 1297 bytes res/images/items/item4.png | Bin 310 -> 1464 bytes .../spacescooter/entity/Player.java | 8 ++++++++ .../spacescooter/entity/item/Item.java | 12 ++++++------ .../spacescooter/entity/item/TestItem1.java | 2 +- .../spacescooter/entity/item/TestItem3.java | 2 +- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/res/images/items/item3.png b/res/images/items/item3.png index 5aaaf657a7b2a76e33c6c1bfe822b3b83229a506..2d12ab2343359353f6f41105b5158c442988041a 100644 GIT binary patch delta 1194 zcmV;b1XcU;0+9-kHwg*=4*+?Qb}f66Kp_VUHUo8FR@9MbCw~NNNklb z6vlsRuan(T5j2zRodiKq*5q12lzj@377i{V6od-a>mZCMBFk)&1l2{%OdKp zKEP_yq*(-plQ8-t?CgD3gZ**#e($|{-=qVF^R>@j&wAEcdp}FejCl@s>JLLZOck61 z*MTayc-oWK$$vca$$9|j@~?)|WK==Bbam0_3mWFjyOc4SV0SI;M45 zwRDbgHhgI{4B;IE^%zz`xkJ~Gr1{1`jtKQ^8>{=TXG z^TNsd*Z#r#l+-cjA_Kug2#D{Q-f?&?0JFv~yZeR6HbV~~;4CMO?_)It&vf(a{9lLV z1b<9ncjEgddo6fm@Ju(qcFBpJd*B3MiWXl6i1$oyKeW2> zd*6+v*Y_@@BDeH^V8*zrDfq&VM80ma7_<pvyRl@d^@TFC5^6>G-_+c7J>Y%ZtIZJW;_B!IK-12azr{V>l5W6_->?ppxZ`Q5 z{G=`7&S+`XT~(4TEG}6=nb41VukyGSt3|wKtymVYlSF2$GHO7EhIDwR`oWTTX4WP1YEzrSDB-Ix>* zSz>32Uh2QA5;Tvg8WtUyF;)80&&%Ac*}~$I34ln`memc2RSjw*+bc!=&&Myxf9efa z4~e#+k-BH7yXB6HXAWOkbGj;+yLMTfRBin$7r%LDE`jhbvk|Il4K*S(01E&B07*qo IM6N<$f(U3wLI3~& delta 259 zcmV+e0sQ`v3i1MwHwpg${{a7>y{D6rKp_VTD+=-w=v$F!Cw~CVNkl#r4U=kf2}zXslpjcW?YSjS&><5HS3hb!{5!=v~+8>wmFTk=TB@lXDTOHd(i*@002ov JPD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c0G~}pdIw`4^wVmH*}s3RKAQCHptBBMe<^;2rz4XL;= za-+B{pC7F+DMMmzaICL7Tjkoq0z)Ii%nc7yb6);hu9@{gC>jhMn8{gx@zs9`Z++@x z;Nr{6tlN|VTp6t|Z9CSpCA6U(eP6EQ`TI}*{MjEmd&!pX+miqK+VZXc8ATEx_MADq z*gwz@z`a|ycC>3*(Aa!dXRBN|Jke^^FTJ^Z`@d$}j`eJb4%u_&@M3JQy{D6rKp+SN3>g@mB)OB3XeWOFkx4{BR9M69mq8A| zAP59u|NrOhwP~ytK{P4cWmdQ_N>VJPD%}U9sHxwV03)a;OgF$R*b)S*;iFzy4IlMH z2E5lBS@1UoGT|*2WOE_=_s=PuF@c?>BIK_pPys4H1%UO2i!4&KR)CpPI`U9GX9by4 zxU=A~ng~aLSFI?#f`SOY^VkuhBy(2H&X&^*J-+~@CP*lFlNW;k0000 Date: Tue, 18 Nov 2014 13:14:21 +0100 Subject: [PATCH 5/5] Updatet a little change in the Items --- src/de/teamteamteam/spacescooter/entity/item/TestItem1.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/entity/item/TestItem1.java b/src/de/teamteamteam/spacescooter/entity/item/TestItem1.java index 1735360..cd400b0 100644 --- a/src/de/teamteamteam/spacescooter/entity/item/TestItem1.java +++ b/src/de/teamteamteam/spacescooter/entity/item/TestItem1.java @@ -6,7 +6,7 @@ public class TestItem1 extends Item { public TestItem1(int x, int y) { super(x, y); - this.setImage("images/items/item4.png"); + this.setImage("images/items/item.png"); } @Override