| View previous topic :: View next topic |
| Author |
Message |
zeroone Regular
Joined: 09 Dec 2009 Posts: 104
|
Posted: Sat Jan 23, 2010 8:26 pm Post subject: Stickvania |
|
|
Here's my first attempt at a Slick game:
http://meatfighter.com/stickvania/
Thanks for everyone's help answering my coding questions. |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sat Jan 23, 2010 9:12 pm Post subject: |
|
|
| doesn't work here, just get a blank screen after applet finishes downloading, no error or extra output on the java console. |
|
| Back to top |
|
 |
zeroone Regular
Joined: 09 Dec 2009 Posts: 104
|
Posted: Sat Jan 23, 2010 9:18 pm Post subject: |
|
|
Kappa,
You may need to click on it. |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sat Jan 23, 2010 9:20 pm Post subject: |
|
|
| zeroone wrote: | Kappa,
You may need to click on it. |
sorry no luck.
I'm on linux 64 bit, just got someone else to test it on mac, they have the same problem. |
|
| Back to top |
|
 |
TheMatrix154 Regular
Joined: 19 Jun 2007 Posts: 183 Location: Germany
|
Posted: Sat Jan 23, 2010 10:10 pm Post subject: |
|
|
No problems on my macbook pro os x 10.6.2 java 6 64 bit. _________________ Blog | Astroiz | ConK |
|
| Back to top |
|
 |
kdnewton Regular

Joined: 07 May 2009 Posts: 123 Location: Okanagan, BC, Canadia
|
Posted: Sun Jan 24, 2010 5:41 am Post subject: |
|
|
No luck here, either. I'm using Ubuntu 9.10 x86. The applet goes through the download of the packages and I'm left with a blank/black screen.
Up until then, everything looks great. I like the intro graphic Like Nosferatu creeping up stairs.
EDIT: Correction. I tried again, since the material would have been cached. It worked the second time. _________________ Linux and free software enthusiast.
 |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sun Jan 24, 2010 11:29 am Post subject: |
|
|
| still no luck here, really odd problem though, you could try to put a few System.out.println() in the code, various places in the init( ) and update() methods, from there we can see how far in game it gets before it freezes on the black screen. |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sun Jan 24, 2010 11:54 am Post subject: |
|
|
doing some more testing, i found that the problem is somewhere in your AppletGameContainer2 class, i switch the html code over to use org.newdawn.slick.AppletGameContainer and it works without the freeze on the blank screen.
btw cool game  |
|
| Back to top |
|
 |
zeroone Regular
Joined: 09 Dec 2009 Posts: 104
|
Posted: Sun Jan 24, 2010 5:32 pm Post subject: |
|
|
| Quote: | i found that the problem is somewhere in your AppletGameContainer2 class, i switch the html code over to use org.newdawn.slick.AppletGameContainer and it works without the freeze on the blank screen.
btw cool game |
Thanks for your help Kappa. I'll investigate. I wanted to use ScalableGame because I found the game seems to run best in the native resolution of the monitor and AppletGameContainer would not let me set the target resolution. |
|
| Back to top |
|
 |
jattra
Joined: 11 Jan 2010 Posts: 68
|
Posted: Sun Jan 24, 2010 5:38 pm Post subject: |
|
|
| kdnewton wrote: | No luck here, either. I'm using Ubuntu 9.10 x86. The applet goes through the download of the packages and I'm left with a blank/black screen.
Up until then, everything looks great. I like the intro graphic Like Nosferatu creeping up stairs.
EDIT: Correction. I tried again, since the material would have been cached. It worked the second time. |
I have same problem here on Ubuntu 9.04. Not working on second try either. _________________ Jattra |
|
| Back to top |
|
 |
zeroone Regular
Joined: 09 Dec 2009 Posts: 104
|
Posted: Sun Jan 24, 2010 7:02 pm Post subject: |
|
|
I just updated the game based off of Kappa's advice. Hopefully, it will work better now.
But, I had to clear my WebStart cache (javaws -viewer) before it would work though. Any idea how to avoid that? I didn't sign my application jar. Is that necessary?
Also, I noticed that GameContainer.hasFocus() always returns true now. The bug may have been related to gaining focus after it was loaded. I had a check that would stop the game from updating if it were not in focus. |
|
| Back to top |
|
 |
jattra
Joined: 11 Jan 2010 Posts: 68
|
Posted: Sun Jan 24, 2010 7:27 pm Post subject: |
|
|
Working. Nice game zeroone. _________________ Jattra |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sun Jan 24, 2010 7:51 pm Post subject: |
|
|
works great now, really impressive work.
yes about the focus thing, by default slick will not render anything if it does not have focus, so good practice for applets is to set
container.setAlwaysRender(true);
so that it always renders even when it doesn't have focus. |
|
| Back to top |
|
 |
kappa Oldbie

Joined: 12 Nov 2006 Posts: 353
|
Posted: Sun Jan 24, 2010 7:52 pm Post subject: |
|
|
fullscreen doesn't work here though, i get the following error in the console
| Code: | org.newdawn.slick.SlickException: Failed to find value mode: 0x0 fs=true
at stickvania.AppletGameContainer2$Container.setDisplayMode(AppletGameContainer2.java:502)
at stickvania.Main.update(Main.java:869)
at stickvania.Main.update(Main.java:842)
at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657)
at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:604)
at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:235)
at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:94)
org.newdawn.slick.SlickException: Game.update() failure - check the game code.
at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:663)
at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:604)
at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:235)
at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:94)
|
|
|
| Back to top |
|
 |
zeroone Regular
Joined: 09 Dec 2009 Posts: 104
|
Posted: Sun Jan 24, 2010 8:14 pm Post subject: |
|
|
| Quote: | | fullscreen doesn't work here though, i get the following error in the console |
Thanks. I'll investigate. |
|
| Back to top |
|
 |
|