Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMr Purple

Posted 26 December 2012 - 10:22 AM

I am currently writing a library, and this library currently has 1 Main game thread, and it gets started by creating an instance of a Room: 

Room room1 = new Room1();

 

Well, what other types and how many threads should a game have?

 

package SpaceShooters;

import JGame.Game.Game;
import JGame.Room.Room;
import SpaceShooters.Rooms.Room1;
import javax.swing.JFrame;

public class Main extends JFrame{

    public static void main(String[] args){
        Game game = new Game("Test Game");
        game.startWindowed(800, 600);

        // This starts the main game thread by extending "Room"
        // It tests for key pressings mouse clicks, and repaints the screen
        Room room1 = new Room1();
        game.setRoom(room1);
    }
}

 

 


#1Mr Purple

Posted 26 December 2012 - 10:10 AM

I am currently writing a library, and this library currently has 1 Main game thread, and it gets started by creating an instance of a Room: 

Room room1 = new Room1();

 

Well, what other types and how many threads should a game have?

 

package SpaceShooters;

import JGame.Game.Game;
import JGame.Room.Room;
import SpaceShooters.Rooms.Room1;
import javax.swing.JFrame;

public class Main extends JFrame{

    public static void main(String[] args){
        Game game = new Game("Test Game");
        game.startWindowed(800, 600);

        // This starts the main game thread by extending "Room"
        // It tests for key pressings mouse clicks, and repaints the screen
        Room room1 = new Room1();
        game.setRoom(room1);
    }
}

 

 


PARTNERS