Applet

5 replies [Last post]
Offline
Joined: 01/06/2011

Can you run a gui as applet where the gui contain the game...

KMacKenzie's picture
Offline
Joined: 12/10/2010
      The answer to your

 
 
 
The answer to your question is yes and no.
 
You can export your game which includes a GUI into a stand-alone format similar to an applet, but its technically no longer an applet. 
 
Make sure you have the latest version of the Env3d directory in your project folder as this is a relatively new feature. (To update your directory simply download the newest env3d_template directory then extract it and move all contents of it into your project directory, when asked about duplicate files simply select "replace")
 
Once you have the latest version installed, and so long as your classes are named properly and your Game class has a main method that looks something like...
 
    /** 
     * Main method to launch the program. 
     */
    public static void main(String args[]) { 
        Game game = new Game();
        new UI(game);
 }
(keep in mind at the end of your GUI class it needs to call game.play();
 
then you will have the option to deploy -> "Upload to Env3d.org as Webstart". (found in the same menu you would upload an applet)
 
It should deploy like this...
 
http://www.env3d.org/beta/node/208
 
 

Offline
Joined: 01/06/2011
another question it seem my

another question it seem my applet is missing texture which is ok when i run it on bluej but not on applet
http://env3d.org/beta/node/211

Offline
Joined: 12/13/2010
Spelling is important when

Spelling is important when games are deployed as webstart or applet.  Windows like to make file extensions uppercase, check those.