Slick Forums

Discuss the Slick 2D Library
It is currently Sun Apr 20, 2014 12:37 am

All times are UTC




Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Stickvania
PostPosted: Sat Jan 23, 2010 8:26 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 135
Here's my first attempt at a Slick game:

http://meatfighter.com/stickvania/

Thanks for everyone's help answering my coding questions.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 23, 2010 9:12 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
doesn't work here, just get a blank screen after applet finishes downloading, no error or extra output on the java console.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 23, 2010 9:18 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 135
Kappa,

You may need to click on it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 23, 2010 9:20 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 23, 2010 10:10 pm 
Offline
Regular

Joined: Tue Jun 19, 2007 7:35 am
Posts: 233
Location: Germany
No problems on my macbook pro os x 10.6.2 java 6 64 bit.

_________________
Embero Games | Astroiz | ConK | From Outa Space


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 5:41 am 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
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.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 11:29 am 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 11:54 am 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
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 :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 5:32 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 135
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 5:38 pm 
Offline

Joined: Mon Jan 11, 2010 10:37 pm
Posts: 68
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 7:02 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 135
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 7:27 pm 
Offline

Joined: Mon Jan 11, 2010 10:37 pm
Posts: 68
Working. Nice game zeroone.

_________________
Jattra


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 7:51 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 7:52 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 582
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)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 8:14 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 135
Quote:
fullscreen doesn't work here though, i get the following error in the console


Thanks. I'll investigate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group