Author Topic: Nightmare  (Read 97933 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Nightmare
« Reply #360 on: September 10, 2012, 01:55:20 pm »
Wohoo. Gotta love OpenGL. And that screen shot looks awesome. Just a comment that when using Java form real-time games, be wary of creating too many objects. If the garbage collector runs while someone is playing the game, it can be really disconcerting. Lol.

I don't get it Binder, Java's Garbage Collector deletes objects which are being used?

EDIT
I just tried with Greenfoot, it either takes more than 10 minutes to load, or it's not loading, because no game is ever loaded :s
« Last Edit: September 10, 2012, 05:15:08 pm by Munchor »

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Nightmare
« Reply #361 on: September 27, 2012, 11:13:20 pm »
No, but when the garbage collector runs, it freezes the rest of the program. If the GC runs while you're playing, it can be really weird to have the game just freeze for a second or two. The fewer objects you create, the less likely the GC is to run while you are playing the game.
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Nightmare
« Reply #362 on: September 28, 2012, 12:01:09 am »
Binder, the Garbage Collector only runs if you have objects which are no longer being used.  I can create any amount of objects I want, as long as I keep references to them until I want them to be erased.  Additionally, when the level changes the area I request the GC to do all it can to collect objects, which helps keep the load off during the actual level. 

Oh and the game should work on the gallery, that was an outdated post saying it did not work.  Additionally many people have been playing it recently so there might be something wrong on your end Munchor.  You have the latest version of java downloaded?  What is your internet speed like?