Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3]
  Print  
  Space Invaders 102 - OpenGL  (Read 5983 times)
0 Members and 1 Guest are viewing this topic.
Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #60 on: 2004-05-19 18:34:56 »

Quote
[...]
This is cause by the abrupt way the tutorial exits the game. It calls System.exit(0) at a time when we could be rendering. To prevent it, instead of calling System.exit(0) set a flag and use it to call exit() inside the rendering loop. The problem is that the rendering thread continues even through the window has been destroyed at exit.[...]


1  
2  
3  
4  
5  
6  
boolean running=true;
[...]
while(running)//main loop
{
stuff
}


Or while(!finished), but I like the "positive" version a bit more.

弾幕 ☆ @mahonnaiseblog
Pages: 1 2 [3]
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

obsidian_golem 2012-05-23 10:14:50

Danny02 2012-05-21 17:10:34

Danny02 2012-05-21 17:07:10

Danny02 2012-05-21 16:56:12

davedes 2012-05-21 13:59:23

obsidian_golem 2012-05-20 20:28:41

darkjava55 2012-05-12 16:14:40

Ultroman 2012-05-12 09:36:05

Ultroman 2012-05-11 22:49:53

Ultroman 2012-05-11 22:20:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.081 seconds with 19 queries.