Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Weird rendering glitch  (Read 2148 times)
0 Members and 1 Guest are viewing this topic.
Offline Jesse_Attard

Senior Newbie





« Posted 2010-03-19 14:48:17 »

Hello,

One of my customers is experiencing a very strange problem when trying to access my game.  It's a Java Applet.  Just to be clear - this is the applet loading screen.  It does it when displaying the game too.  He says it's happening in all 3 browsers (ie, firefox, chrome).  Given that it's happening on the applet load screen I feel like the HTML must be the culprit, but to be honest I'm completely stumped here.

Here's a screenshot:


Here's how it's supposed to look:


Here's another example of the login screen (this is in-game code)



and how it's supposed to look:



Ignore the debug info - was just some stuff I printed to help debug the problem.

Anyone seen this before or have any idea what's going on here?  Most of my customers have no problem.  Website is www.immortal-empire.com
Offline Dathgale

Junior Newbie





« Reply #1 - Posted 2010-03-19 15:55:33 »

It's probably a browser problem. I would ask your customers what browser they're using if I were you. It looks like the applet is not being repainted after it is invalidated. Calling the applet's repaint() method after it loads might fix the login screen. As for the loading screen, consider using this kind of loading screen instead.
Offline Wildern

Junior Devvie





« Reply #2 - Posted 2010-03-19 20:19:24 »

Your load screen appears to just be an animated gif
http://www.immortal-empire.com/ie_loadscreen.gif
How are you displaying it?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jesse_Attard

Senior Newbie





« Reply #3 - Posted 2010-03-20 02:05:54 »

Yeah the browsers are IE, Mozilla, and Chrome.  All 3 it's doing this on his machine.  I've tried all three locally and they all work fine for me.

The applet calls repaint() on the Canvas every frame.  ie. there is a main thread that runs the game and calls the repaint method every X milliseconds.  I add the main Canvas to the JApplet's ContentPane on applet initialization. I can try calling repaint() on the Applet itself... will let you know how that goes.

For the load screen (which I'm less concerned about if the game ends up working fine) the HTML is as follows:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
<html>
<title>Immortal Empire</title>
<link rel="stylesheet" href="iempire.css" type="text/css">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<body>
<TABLE WIDTH=100% border=0 cellpadding=0 cellspacing=0>
<TR ALIGN=CENTER HEIGHT=80%>
<TD ALIGN=CENTER VALIGN=CENTER>
<BR><BR>
<applet code=Main.IsoGame.class width="800" height="600">
<param name="boxbgcolor" value="#000000">
<param name="boxfgcolor" value="#000000">
<param name="progresscolor" value="#9B5000">
<param name="boxborder" value="false">
<param name="image" value="ie_loadscreen.gif">
<param name="cache_archive" value="IsoGame.jar,IsoImages_interface.jar,IsoImages_game.jar,IsoSounds_interface.jar,IsoSounds_game.jar,IsoMusic_bossbattle.jar,IsoMusic_cinematic_standard.jar,IsoMusic_cinematic_vuldreth.jar,IsoMusic_desert.jar,IsoMusic_dialog_dazo.jar,IsoMusic_dialog_elder.jar,IsoMusic_dialog_maielle.jar,IsoMusic_grasslands.jar,IsoMusic_menu_0.jar,IsoMusic_menu_1.jar,IsoMusic_volcanic.jar,IsoLib_jogg.jar,IsoLib_jorbis.jar,IsoLib_tritonius.jar,IsoLib_vorbis.jar">
<param name="cache_option" value="Plugin">
<param name="cache_version" value="0.0.3.4,0.0.1.D,0.0.1.C,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8">
You cannot play this game because you do not have Java installed.  Java is a free download, please acquire it from <A HREF="http://www.java.com" target="_blank">http://www.java.com</A>.
</applet>
</TD>
</TR>
</TABLE>
</body>
</html>


It took me a while to settle on this type of deployment since it handles JAR caching and JAR indexing correctly in all browsers without needing javascript. I don't use JNLP - but maybe I should?
Offline pjt33

« JGO Spiffy Duke »


Medals: 40
Projects: 4
Exp: 7 years



« Reply #4 - Posted 2010-03-20 09:22:40 »

Do you hang on to the Graphics object from the paint/paintComponent call? That can cause interesting problems on Windows.
Offline Jesse_Attard

Senior Newbie





« Reply #5 - Posted 2010-03-20 16:49:40 »

I store the Graphics object of the backbuffer as a member variable of the main frame. It's just an image I use for double buffering to prevent flickering.  I don't store the Graphics object of the paint() method that's passed as a parameter. 
Pages: [1]
  ignore  |  Print  
 
 

 
xxMrPHDxx (13 views)
2017-11-21 16:21:00

xxMrPHDxx (10 views)
2017-11-21 16:14:31

xxMrPHDxx (10 views)
2017-11-21 16:10:57

Ecumene (113 views)
2017-09-30 02:57:34

theagentd (148 views)
2017-09-26 18:23:31

cybrmynd (246 views)
2017-08-02 12:28:51

cybrmynd (242 views)
2017-08-02 12:19:43

cybrmynd (242 views)
2017-08-02 12:18:09

Sralse (257 views)
2017-07-25 17:13:48

Archive (875 views)
2017-04-27 17:45:51
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!