slow applet

Hello,
I'm having a problem with an applet, the problem is that is runs slowly when it's on the internet. Someone suggested to create an array with all the classes in the program, so it won't have to download them. I did that and now it runs fast sometimes, but somtimes it still slows down like it's loading something. Can anyone help?

-Thanks
-Daniel Keller

Comments

  • : Hello,
    : I'm having a problem with an applet, the problem is that is runs slowly when it's on the internet. Someone suggested to create an array with all the classes in the program, so it won't have to download them. I did that and now it runs fast sometimes, but somtimes it still slows down like it's loading something. Can anyone help?
    :
    : -Thanks
    : -Daniel Keller
    :
    Have you tried packaging all the class files into a jar file? That way the whole applet must be downloaded by the client, before it can run the applet.
  • Hello,
    Ok I tried putting it all into a jar file. It still is choppy when it is on the interent. When it is run locally it is fine, but when it is on the internet it is choppy. Do you know what else could be wrong?
  • : Hello,
    : Ok I tried putting it all into a jar file. It still is choppy when it is on the interent. When it is run locally it is fine, but when it is on the internet it is choppy. Do you know what else could be wrong?
    :
    What does your applet is doing?

    Does the applet need to recive data from your computer or any other source is there a bandwith or timing problem with recived or needed data ????


  • : The applet is a game. Here is a link to the applet: http://www.fantasystargames.eu/Tetris/new/SpaceShipGame.htm
    :
    i taked a look at the game it is realy slow, why i dont cant tell you..

    only that i have seen in the jvm console that you load realy much files within the game ???? !!

    I think this could be the problem maybe.......on the other hand i dont know how you synchronized the painting thread or generaly the thrads for loading data like files and the painting of this files ???!!!

    But if you said that on your local machine the game runs fast i belive that the problem could realy be the loading of images from the server ! and that there is a synch... problem .....




  • Hello,
    Yes everything is run from the same thread. What is a synch problem? Should I load the files in a different thread?


    http://www.fantasystargames.eu/Tetris/new/SpaceShipGame.htm
    : :
    : i taked a look at the game it is realy slow, why i dont cant tell you..
    :
    : only that i have seen in the jvm console that you load realy much files within the game ???? !!
    :
    : I think this could be the problem maybe.......on the other hand i dont know how you synchronized the painting thread or generaly the thrads for loading data like files and the painting of this files ???!!!
    :
    : But if you said that on your local machine the game runs fast i belive that the problem could realy be the loading of images from the server ! and that there is a synch... problem .....
    :
    :
    :
    :
    :

  • Hello
    Like I said everything is run from the same thread. Is it best to have one thread doing computation and another doing drawing, and another loading files?
  • : Hello
    : Like I said everything is run from the same thread. Is it best to have one thread doing computation and another doing drawing, and another loading files?
    :
    sorry for the long replay....but weekend;-))

    yes normaly i would programm such a game with more threads but iam not a game programmer.....but lets say you need a graphic for your game so you load the graphic at the same time from the server like the user is doing some inputs to the game so you have a delay to the server maybe the package recived from the server is damaged and the TCP/IP protocoll is sending again the same request to the server to get the image or other data so you get a time delay etc.....

    so i think this could be the problem .........
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories