• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision817fa5e711c9d18c981be17b76b3edc04ed92d33 (tree)
Zeit2021-04-26 05:16:36
Autorsebastian_bugiu
Commitersebastian_bugiu

Log Message

Removed prints.

Ändern Zusammenfassung

Diff

diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/blackholedarksun/physics/EntityContactListener.java
--- a/core/src/headwayent/blackholedarksun/physics/EntityContactListener.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/physics/EntityContactListener.java Sun Apr 25 23:16:36 2021 +0300
@@ -201,7 +201,7 @@
201201 if (entityProperties.getHealth() <= 0) {
202202 collisionResolved = false;
203203 entityDestroyed = true;
204- System.out.println("Entity: " + entityProperties.getName() + " destroyed");
204+// System.out.println("Entity: " + entityProperties.getName() + " destroyed");
205205 }
206206
207207 }
diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/blackholedarksun/systems/AISystem.java
--- a/core/src/headwayent/blackholedarksun/systems/AISystem.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/blackholedarksun/systems/AISystem.java Sun Apr 25 23:16:36 2021 +0300
@@ -524,7 +524,7 @@
524524 MainApp.getGame().getWorldManager().createCountermeasures(e);
525525 shipProperties.setAfterburnerActive(true);
526526 shipProperties.setCountermeasuresLastLaunchTime();
527- System.out.println("Creating countermeasure for entity: " + entityProperties.getName());
527+// System.out.println("Creating countermeasure for entity: " + entityProperties.getName());
528528 }
529529 }
530530 EntityProperties projectileEntityProperties = entityPropertiesMapper.get(minDistProjectile);
diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/hotshotengine/ENG_MainThread.java
--- a/core/src/headwayent/hotshotengine/ENG_MainThread.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/hotshotengine/ENG_MainThread.java Sun Apr 25 23:16:36 2021 +0300
@@ -1,5 +1,7 @@
11 package headwayent.hotshotengine;
22
3+import com.badlogic.gdx.Gdx;
4+
35 import headwayent.blackholedarksun.APP_Game;
46 import headwayent.blackholedarksun.MainActivity;
57 import headwayent.blackholedarksun.automationframework.AutomationFramework;
@@ -327,7 +329,24 @@
327329 // long beginFrame = System.currentTimeMillis();
328330 // long endFrame = 0;
329331 // int frameNum = 0;
332+ long lastGCTime = 0;
333+ long averageCycleTime = ENG_Utility.currentTimeMillis();
334+ final int averageStepNum = 100;
335+ int currentStep = 0;
330336 while (true) {
337+ if ((++currentStep) == averageStepNum) {
338+ currentStep = 0;
339+ long currentTime = ENG_Utility.currentTimeMillis();
340+ System.out.println("average FPS: " + ((currentTime - averageCycleTime) / (float) averageStepNum));
341+ averageCycleTime = currentTime;
342+ }
343+// if (ENG_Utility.hasTimePassed(lastGCTime, 5000)) {
344+// lastGCTime = ENG_Utility.currentTimeMillis();
345+//// System.gc();
346+// System.out.println("System.gc() duration: " +
347+// (ENG_Utility.currentTimeMillis() - lastGCTime) + " java heap: " + Gdx.app.getJavaHeap() + " native heap: " + Gdx.app.getNativeHeap());
348+// }
349+
331350 // long mainLoopBeginTime = currentTimeMillis();
332351 // if (MainApp.getApplicationMode() == MainApp.Mode.SERVER) {
333352 // if (MainApp.getGame().isGameEnded()) {
diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/hotshotengine/audio/ENG_SoundManager.java
--- a/core/src/headwayent/hotshotengine/audio/ENG_SoundManager.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/hotshotengine/audio/ENG_SoundManager.java Sun Apr 25 23:16:36 2021 +0300
@@ -94,7 +94,7 @@
9494 public static final int MAX_CONCURRENT_SOUNDS = 16;
9595 public static final int MAX_SOUND_VOLUME = 100;
9696 public static final int SOUND_LOWEST_PRIORITY = 999;
97- private static final boolean DEBUG = true;
97+ private static final boolean DEBUG = false;
9898 public static final boolean IGNORE_SOUND = false; // For faster loading on mobile
9999 public static final boolean FORCE_PLAY = true;
100100 private final HashMap<String, SoundInternal> sounds = new HashMap<>();
@@ -230,13 +230,17 @@
230230 // Remove sounds that have finished playing from the active sounds list.
231231 removeFinishedSounds();
232232
233- System.out.println("Current active sounds num: " + activeSounds.size());
234- System.out.println("Attempting to play " + soundToBePlayed.getName() + " with default priority " + soundToBePlayed.getPriority());
233+ if (DEBUG) {
234+ System.out.println("Current active sounds num: " + activeSounds.size());
235+ System.out.println("Attempting to play " + soundToBePlayed.getName() + " with default priority " + soundToBePlayed.getPriority());
236+ }
235237
236238 // If we still have all sounds playing we need to try to make room for the new
237239 // sound based on priority.
238240 if (activeSounds.size() == MAX_CONCURRENT_SOUNDS) {
239- System.out.println("Max concurrent sounds " + MAX_CONCURRENT_SOUNDS + " reached");
241+ if (DEBUG) {
242+ System.out.println("Max concurrent sounds " + MAX_CONCURRENT_SOUNDS + " reached");
243+ }
240244 ActiveSound activeSoundWithLowestPriority = null;
241245 for (ActiveSound activeSound : activeSounds) {
242246 if (activeSoundWithLowestPriority == null ||
@@ -248,16 +252,20 @@
248252 // then we selected the one longest playing. If the new sound has the same
249253 // priority then we evict the one with the same priority but longest playing.
250254 if (activeSoundWithLowestPriority.getCurrentPriority() >= soundToBePlayed.getPriority()) {
251- System.out.println("Evicting sound " +
252- activeSoundWithLowestPriority.getSound().getName() +
253- " with lowest priority " +
254- activeSoundWithLowestPriority.getCurrentPriority() +
255- " to make room for " + soundToBePlayed.getName() +
256- " with priority " + soundToBePlayed.getPriority());
255+ if (DEBUG) {
256+ System.out.println("Evicting sound " +
257+ activeSoundWithLowestPriority.getSound().getName() +
258+ " with lowest priority " +
259+ activeSoundWithLowestPriority.getCurrentPriority() +
260+ " to make room for " + soundToBePlayed.getName() +
261+ " with priority " + soundToBePlayed.getPriority());
262+ }
257263 activeSounds.remove(activeSoundWithLowestPriority);
258264 stopSound(activeSoundWithLowestPriority.getSound(), activeSoundWithLowestPriority.getPlayId());
259265 } else {
260- System.out.println("Sound " + soundToBePlayed.getName() + " with default priority " + soundToBePlayed.getPriority() + " could not be played");
266+ if (DEBUG) {
267+ System.out.println("Sound " + soundToBePlayed.getName() + " with default priority " + soundToBePlayed.getPriority() + " could not be played");
268+ }
261269 return false;
262270 }
263271 }
@@ -418,9 +426,12 @@
418426 for (Iterator<ActiveSound> iterator = activeSounds.iterator(); iterator.hasNext(); ) {
419427 ActiveSound activeSound = iterator.next();
420428 if (activeSound.getPlayId() == id) {
421- System.out.println("Removing sound by stopping " + activeSound.getSound().getName() +
422- " with play id " + activeSound.getPlayId() +
423- " and priority " + activeSound.getCurrentPriority());
429+ if (DEBUG) {
430+ System.out.println("Removing sound by stopping " + activeSound.getSound().getName() +
431+ " with play id " + activeSound.getPlayId() +
432+ " and" +
433+ " priority " + activeSound.getCurrentPriority());
434+ }
424435 iterator.remove();
425436 }
426437 }
diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/hotshotengine/renderer/ENG_SceneManager.java
--- a/core/src/headwayent/hotshotengine/renderer/ENG_SceneManager.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/hotshotengine/renderer/ENG_SceneManager.java Sun Apr 25 23:16:36 2021 +0300
@@ -419,12 +419,12 @@
419419 if (MainActivity.isDebugmode()) {
420420 if (nativeObject instanceof ENG_MovableObject) {
421421 ENG_MovableObject movableObject = (ENG_MovableObject) nativeObject;
422- System.out.println("Ptr: " + ptr + " linked to movable object: " + movableObject.getName());
422+// System.out.println("Ptr: " + ptr + " linked to movable object: " + movableObject.getName());
423423 } else if (nativeObject instanceof ENG_Item) {
424424 ENG_Item item = (ENG_Item) nativeObject;
425- System.out.println("Ptr: " + ptr + " linked to item: " + item.getName());
425+// System.out.println("Ptr: " + ptr + " linked to item: " + item.getName());
426426 } else {
427- System.out.println("Ptr: " + ptr + " linked to nativeObject class: " + nativeObject.getClass().getName());
427+// System.out.println("Ptr: " + ptr + " linked to nativeObject class: " + nativeObject.getClass().getName());
428428 }
429429 }
430430 if (put != null) {
@@ -434,7 +434,7 @@
434434 ". Trying to add the same pointer with movable object: " + movableObject.getName());
435435 } else if (nativeObject instanceof ENG_Item) {
436436 ENG_Item item = (ENG_Item) nativeObject;
437- System.out.println("Ptr: " + ptr + " linked to item: " + item.getName());
437+// System.out.println("Ptr: " + ptr + " linked to item: " + item.getName());
438438 } else {
439439 throw new IllegalArgumentException("Ptr: " + ptr +
440440 " already linked to native object. nativeObject class: " + nativeObject.getClass().getName());
@@ -451,12 +451,12 @@
451451 if (MainActivity.isDebugmode()) {
452452 if (remove instanceof ENG_MovableObject) {
453453 ENG_MovableObject movableObject = (ENG_MovableObject) remove;
454- System.out.println("removing Ptr: " + ptr + " linked to movable object: " + movableObject.getName());
454+// System.out.println("removing Ptr: " + ptr + " linked to movable object: " + movableObject.getName());
455455 } else if (remove instanceof ENG_Item) {
456456 ENG_Item item = (ENG_Item) remove;
457- System.out.println("removing Ptr: " + ptr + " linked to item: " + item.getName());
457+// System.out.println("removing Ptr: " + ptr + " linked to item: " + item.getName());
458458 } else {
459- System.out.println("removing ptr: " + ptr + " nativeObject class: " + remove.getClass().getName());
459+// System.out.println("removing ptr: " + ptr + " nativeObject class: " + remove.getClass().getName());
460460 }
461461 }
462462 if (remove == null) {
diff -r 2cf76c2f1e77 -r 817fa5e711c9 core/src/headwayent/hotshotengine/renderer/nativeinterface/pipeline/ENG_RenderingThread.java
--- a/core/src/headwayent/hotshotengine/renderer/nativeinterface/pipeline/ENG_RenderingThread.java Sun Apr 25 09:58:23 2021 +0300
+++ b/core/src/headwayent/hotshotengine/renderer/nativeinterface/pipeline/ENG_RenderingThread.java Sun Apr 25 23:16:36 2021 +0300
@@ -537,6 +537,7 @@
537537 try {
538538 if (shouldSleepRenderingThread) {
539539 shouldSleepRenderingThread = false;
540+// System.out.println("Releasing rendering thread");
540541 sleepRenderingThreadSemaphore.release();
541542 }
542543
diff -r 2cf76c2f1e77 -r 817fa5e711c9 desktop/raw/robovm.ini
--- a/desktop/raw/robovm.ini Sun Apr 25 09:58:23 2021 +0300
+++ b/desktop/raw/robovm.ini Sun Apr 25 23:16:36 2021 +0300
@@ -1,2 +1,1 @@
1-ms256M
2-EnableGCHeapStats
\ No newline at end of file
1+ms256M
\ No newline at end of file